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

OCPBUGS-28244: Account for endpoint not being rerturned when building cloud configuration #112

Conversation

theobarberbany
Copy link

@theobarberbany theobarberbany commented Mar 4, 2024

This change updates AzureCloudConfigFromURL to check that the URL
(ResourceManagerEndpoint) that is used to build the config has been
returned. If it has not, it sets it using the URL provided.

This avoids the case where the endpoint is used to build config, but
does not return it's self - causing the created configuration to fail.

To make this work, we must update go.mod to replace the vendored package
with the one in the fork, and revendor. If we do not revendor, the
changes in the fork are not propagated to the /vendor directory and are
silently ignored.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 4, 2024
Copy link

openshift-ci bot commented Mar 4, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

openshift-ci bot commented Mar 4, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joelspeed for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@theobarberbany theobarberbany force-pushed the unset-resourcemanagerendpoint branch 3 times, most recently from 1068010 to 6c71772 Compare March 5, 2024 11:40
@theobarberbany theobarberbany changed the title [WIP] Unset ResourceManagerEndpoint before calling NewAuthProvider [WIP] Account for endpoint not being rerturned when building cloud config Mar 5, 2024
@theobarberbany theobarberbany changed the title [WIP] Account for endpoint not being rerturned when building cloud config [WIP] Account for endpoint not being rerturned when building cloud configuration Mar 5, 2024
@theobarberbany theobarberbany force-pushed the unset-resourcemanagerendpoint branch 3 times, most recently from 1c86db7 to 6e9e005 Compare March 6, 2024 15:14
@sunzhaohua2
Copy link

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Mar 7, 2024
@theobarberbany theobarberbany changed the title [WIP] Account for endpoint not being rerturned when building cloud configuration OCPBUGS-28244: Account for endpoint not being rerturned when building cloud configuration Mar 7, 2024
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Mar 7, 2024
@openshift-ci-robot
Copy link

@theobarberbany: This pull request references Jira Issue OCPBUGS-28244, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @sunzhaohua2

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from sunzhaohua2 March 7, 2024 11:34
@theobarberbany theobarberbany force-pushed the unset-resourcemanagerendpoint branch 2 times, most recently from 357a220 to 9ef0cc6 Compare March 7, 2024 12:22
@openshift-ci-robot
Copy link

@theobarberbany: This pull request references Jira Issue OCPBUGS-28244, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @sunzhaohua2

In response to this:

This change updates AzureCloudConfigFromURL to check that the URL
(ResourceManagerEndpoint) that is used to build the config has been
returned. If it has not, it sets it using the URL provided.

This avoids the case where the endpoint is used to build config, but
does not return it's self - causing the created configuration to fail.

To make this work, we must update go.mod to replace the vendored package
with the one in the fork, and revendor.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@theobarberbany theobarberbany marked this pull request as ready for review March 7, 2024 12:26
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 7, 2024
Copy link

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

this looks good to me, is there any unit testing we could add to confirm the behavior?

e.g. could we add something to existing tests, i don't think we need to make a new test suite for this.

@theobarberbany
Copy link
Author

theobarberbany commented Mar 8, 2024

@elmiko I've added a test in a separate commit.

In order to do this i've had to update the azclient module go.mod and , which leaves us with a pretty huge diff (any change requires a revendor) :(

I'm not sure if there's another approach here that is nicer / more flexible. It feels insane for this to be a 1000+ file change for what is actually changing a single file and it's test... :/ Perhaps if i drop the klog addition, we won't have such a large diff?

@elmiko
Copy link

elmiko commented Mar 8, 2024

I'm not sure if there's another approach here that is nicer / more flexible. It feels insane for this to be a 1000+ file change for what is actually changing a single file and it's test... :/ Perhaps if i drop the klog addition, we won't have such a large diff?

agreed, it doesn't feel good to force this large of a dependency update. i'd say try it out without the klog change just to see if it does reduce the amount of change.

the test itself looks good to me, but do we need a negative assertion as well?

…ding cloud configuration

This change updates AzureCloudConfigFromURL to check that the URL
(ResourceManagerEndpoint) that is used to build the config has been
returned. If it has not, it sets it using the URL provided.

This avoids the case where the endpoint is used to build config, but
does not return it's self - causing the created configuration to fail.

To make this work, we must update go.mod to replace the vendored package
with the one in the fork, and revendor. If we do not revendor, the
changes in the fork are not propagated to the /vendor directory and are
silently ignored.
Copy link

openshift-ci bot commented Mar 11, 2024

@theobarberbany: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify-git-history fef370b link false /test verify-git-history
ci/prow/e2e-azure-ovn-upgrade fef370b link true /test e2e-azure-ovn-upgrade
ci/prow/verify-commits fef370b link false /test verify-commits

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@theobarberbany
Copy link
Author

Closing this, as we've taken the issue upstream :

kubernetes-sigs#5643

kubernetes-sigs#5651

@openshift-ci-robot
Copy link

@theobarberbany: This pull request references Jira Issue OCPBUGS-28244. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state.

In response to this:

This change updates AzureCloudConfigFromURL to check that the URL
(ResourceManagerEndpoint) that is used to build the config has been
returned. If it has not, it sets it using the URL provided.

This avoids the case where the endpoint is used to build config, but
does not return it's self - causing the created configuration to fail.

To make this work, we must update go.mod to replace the vendored package
with the one in the fork, and revendor. If we do not revendor, the
changes in the fork are not propagated to the /vendor directory and are
silently ignored.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants