-
Notifications
You must be signed in to change notification settings - Fork 71
OSD-28241: Allow building backplane config, login with provided OCM connections #657
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
base: main
Are you sure you want to change the base?
Conversation
@nephomaniac: This pull request references OSD-28241 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set. 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. |
Skipping CI for Draft Pull Request. |
@nephomaniac: This pull request references OSD-28241 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set. 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. |
@nephomaniac: This pull request references OSD-28241 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: nephomaniac 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 |
/test all |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #657 +/- ##
==========================================
- Coverage 47.55% 47.36% -0.20%
==========================================
Files 90 90
Lines 7068 7257 +189
==========================================
+ Hits 3361 3437 +76
- Misses 3299 3405 +106
- Partials 408 415 +7
🚀 New features to boost your workflow:
|
/test lint |
/test all |
@nephomaniac: all tests passed! 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-sigs/prow repository. I understand the commands that are listed here. |
@nephomaniac: This pull request references OSD-28241 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set. 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. |
@nephomaniac: This pull request references OSD-28241 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set. 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. |
@nephomaniac: This pull request references OSD-28241 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a detailed review and not a blocker for this PR:
given recent discussions, we really need a refactor the logic we share across tools out of /cmd/ into /pkg/ - and changes to these functions with care and knowledge around their consumers (CAD, osdctl).
Hi @nephomaniac , could you check the comments by @samanthajayasinghe when you have capacity? Thanks! |
Let's hold this PR for now |
/hold |
Hi @samanthajayasinghe sorry for the delay on this. I took some time to investigate a larger refactor, but not sure it's appropriate for this specific change/benefit. Please let me know if there's anything I can do to move this (or similar/smaller change forward). Thank you! |
What type of PR is this?
What this PR does / Why we need it?
This PR allows an OCM connection to be provided to the config building and login functions. ie adding new '*WithConn()' function variants allowing the caller to provide the OCM connection. This PR attempts to allow utils sharing backplane code to interact with clusters which reside in different OCM envs within the same executable. The most relevant use case is testing/developing within pre-production STAGE and INTEGRATION OCM envs, that are serviced by Hive clusters which exist in OCM Production environment(s)
Today as part of the client connection setup/code-path, it is not possible to create a clean separation of OCM config to be provided to multiple backplane connections within a single executable. It appears that through a chain of functions, the use of env vars prevents this from working as desired.
These changes also help avoid rebuilding/tearing down multiple OCM connections during the config + login phases.
This may make the build/login path more consistent with regard to the OCM attributes they use. Rebuilding/refetching OCM attributes may introduce (small) windows for race conditions.
Which Jira/Github issue(s) does this PR fix?
SREP-164, SREP-183
Special notes for your reviewer
After initial draft review, additional unit tests should be added.
Unit Test Coverage
Waiting for initial draft review, before adding remaining unit tests.
I've manually tested this branch against OSDCTL using both legacy backplane functions, and new OCM sdk connection fed backplane functions. I've connected to clusters using each path, as well as mixing these within a single util. I've also tested basic ocm-backplane login cli connections in the terminal.
Guidelines
Test coverage checks
Pre-checks (if applicable)