Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move credentials to API V2 #554

Merged
merged 4 commits into from
Dec 17, 2024
Merged

Move credentials to API V2 #554

merged 4 commits into from
Dec 17, 2024

Conversation

mirekdlugosz
Copy link
Collaborator

Let Camayoc use API V2 for credentials.

This is just enough changes needed to make entire Camayoc pass locally. Admittedly, this is not the best time to introduce it, as we are already in the middle of UI transition, where Camayoc is in awkward spot where it still supports old UI. If support for old UI is removed first, it will most likely conflict with changes here.

qpc tests need qpc credentials-v2 branch. Both qpc PR and that one will need to be merged close to each other, and we will have to rely on standalone jobs for tests results until then. Obviously this is not backwards-compatible, so it will wreak havoc on downstream pipeline. I would suggest to let downstream run at least few times before we merge that.

See individual commits for detailed changes. I separated them to tell a story, and would prefer to merge them without squashing.

@mirekdlugosz mirekdlugosz requested review from a team December 5, 2024 16:12
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.15%. Comparing base (e3601e0) to head (2d3d196).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #554      +/-   ##
==========================================
+ Coverage   76.85%   77.15%   +0.29%     
==========================================
  Files           7        7              
  Lines         700      709       +9     
==========================================
+ Hits          538      547       +9     
  Misses        162      162              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The client assumed that the entire API will be under versioned path. Not
a terrible assumption to make, but doesn't account for phased updates -
where certain endpoints are moved to a new version, while others stay
under old version.
Port qpc credentials tests to API v2. New API also requires SSH key
content, as opposed to path to key file - this change is big enough to
warrant a separate commit.
Port qpc credentials tests to API v2 - paste content of SSH key file
where path was used in the past.
In qpc_model representing credential, move from ssh_keyfile to ssh_key.
This also changes the meaning of the field - it used to represent path,
now it represents the content of the file.

However, when creating model from config definition, it still takes the
path and reads the content automatically. This way we don't have to
modify existing configuration files. And storing entire keys in
configuration files is going to be cumbersome.

However, at some point in the future we should probably streamline all
that and remove the cruft built around backwards compatibility and past
solutions.
@infinitewarp infinitewarp marked this pull request as ready for review December 17, 2024 18:51
@infinitewarp infinitewarp merged commit 0cb990a into main Dec 17, 2024
8 of 9 checks passed
@infinitewarp infinitewarp deleted the credentials-api-v2 branch December 17, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants