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

CLI Phase 1 - add UpgradeableTo field to update functionality #3844

Merged

Conversation

slawande2
Copy link
Collaborator

@slawande2 slawande2 commented Sep 16, 2024

Which issue this PR addresses:

ARO-9607

What this PR does / why we need it:

Add support for Cx to provide the value of the OpenShift version they want to upgrade to using UpgradeableTo field during update such that the backend can validate platform workload identities for the current and upgradeableTo minor versions and federate the upgradeableTo version identities.

Test plan for issue:

  • Unit tests for validating the --upgradeable-to argument have been added to account for update scenarios
  • az aro update against a MIWI cluster results in an API call being made to the RP with the necessary fields populated

Is there any documentation that needs to be updated for this PR?

Not yet

How do you know this will function as expected in production?

Preview extension-only change. We will perform comprehensive testing before releasing this extension to users.

tsatam
tsatam previously requested changes Sep 16, 2024
Copy link
Collaborator

@tsatam tsatam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! We just need to make sure we add unit tests for this and complete functional testing before merge.

Copy link
Collaborator

@rajdeepc2792 rajdeepc2792 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some change request comments regarding the functionality.
There are no comments now that impacts functionality, just some suggestions.

@cadenmarchese cadenmarchese added work-in-progress chainsaw Pull requests or issues owned by Team Chainsaw labels Sep 17, 2024
Copy link
Contributor

@kimorris27 kimorris27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the most part! I left one suggestion for additional validation, but I'd appreciate if someone else would verify that it's needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me like we should also disallow the combination of refresh-credentials with upgradeable-to.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Kipp's argument here, should we also disallow refresh-credentials with enable_managed_identity and platform_workload_identities?
I would wait for @tsatam backing on this though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to worry about enable_managed_identity. It's not possible to specify it together with refresh_credentials, since the former can only be passed to az aro create and the latter can only be passed to az aro update.

As for the other two suggestions in this thread:

  1. Disallow refresh_cluster_credentials together with upgradeable_to
  2. Disallow refresh_cluster_credentials together with platform_workload_identities

@slawande2 could definitely do 1, but 2 is technically out of scope for this PR; we missed it when #3709 was in review. Maybe it's worth putting 2 in its own little PR?

Copy link
Collaborator

@shubhadapaithankar shubhadapaithankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added needs-rebase branch needs a rebase and removed ready-for-review labels Sep 27, 2024
Copy link

Please rebase pull request.

@slawande2 slawande2 force-pushed the slawande/ARO-9607-wimi-cli-p1-add-UpgradeableTo branch from 3f3e175 to 2fa2721 Compare September 27, 2024 18:49
@github-actions github-actions bot removed the needs-rebase branch needs a rebase label Sep 27, 2024
@tsatam tsatam dismissed their stale review September 27, 2024 20:10

changes applied

@kimorris27
Copy link
Contributor

/azp run

kimorris27
kimorris27 previously approved these changes Sep 27, 2024
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Collaborator

@cadenmarchese cadenmarchese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still an outstanding issue with the python lint - I think that this should fix it.

Running flake8 on extensions...
ERROR: /__w/1/go/src/github.com/Azure/ARO-RP/python/az/aro/azext_aro/tests/latest/unit/test_validators.py:822:7: W291 trailing whitespace
/__w/1/go/src/github.com/Azure/ARO-RP/python/az/aro/azext_aro/tests/latest/unit/test_validators.py:827:7: W291 trailing whitespace
/__w/1/go/src/github.com/Azure/ARO-RP/python/az/aro/build/lib/azext_aro/tests/latest/unit/test_validators.py:822:7: W291 trailing whitespace
/__w/1/go/src/github.com/Azure/ARO-RP/python/az/aro/build/lib/azext_aro/tests/latest/unit/test_validators.py:827:7: W291 trailing whitespace
4     W291 trailing whitespace

@slawande2
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@cadenmarchese cadenmarchese merged commit 9375d82 into master Oct 2, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chainsaw Pull requests or issues owned by Team Chainsaw
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants