-
Notifications
You must be signed in to change notification settings - Fork 72
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 Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #657 +/- ##
==========================================
- Coverage 52.82% 52.54% -0.29%
==========================================
Files 80 80
Lines 6065 6113 +48
==========================================
+ Hits 3204 3212 +8
- Misses 2434 2471 +37
- Partials 427 430 +3
🚀 New features to boost your workflow:
|
/test lint |
/test all |
@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! |
FYI @nephomaniac , we recently merged the singleton OCM connection with a timeout. Does this resolve the original issue? |
Hi @samanthajayasinghe thanks for the heads up. It's possible the PR: #785 can help a little, but at first glance I think it may also introduce new areas for OCM connection inconsistencies(?). (IMO) It would be ideal to separate the config/building-config functions from those that create connections with the config. Allowing the consumer to persist a desired OCM config throughout the life of a BP OcmInterface impl. It appears that with PR: #785 an OCM connection's config can be inadvertently changed to a completely different connection context/env during the active/ongoing use of the OCM itfc impl (ie due to the timeouts, auto-recreation of the underlying connection)? |
@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. |
/label tide/merge-method-squash |
Thanks for the info, @nephomaniac. As I understand it, this PR fundamentally addresses switching the OCM environment since stage/int Hive clusters are on the production environment. |
@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.21.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. |
Thanks. I've updated the PR description with an example. This PR allows consumers of backplane-cli to create backplane client connections with a provided ocm sdk connection, ...which allows the consumer to separate the ocm config building portions from backplane-cli.
|
@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.21.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.21.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.21.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.21.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.21.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.21.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. |
IIUC, this PR just implemented to create 2 connections ( Also, FedRAMP env should be already isolated with different OCM URLs/infra, looks like this PR doesn't change FedRamp works but just btw, I may miss some context about #785, it should just reuse a single OCM connection and add auto-cleanup while this PR #657 implement to support multiple connection to different OCM env. So, the 2 PRs could be seen as complementary rather than conflicts? cc: @nephomaniac @samanthajayasinghe |
Thanks @xiaoyu74 and @nephomaniac for your thoughts and for updating the PR desc. If this PR is only for osdctl multi-ocm-env, then let's merge this PR. |
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.
This PR is an attempt at the least intrusive method of allowing a consumer to build and persist an OCM config/connection throughout the lifecycle of a BP-client connection.
Example:
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)