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

Add service and manager flags to backplane session #144

Merged

Conversation

mrbarge
Copy link
Contributor

@mrbarge mrbarge commented Jul 8, 2023

What type of PR is this?

Feature

What this PR does / Why we need it?

This adds the same --service and --manager flags to ocm backplane session that are already in place for ocm backplane login in order to establish a backplane session to the cluster's service or management cluster respectively.

I use backplane session almost exclusively these days, but I miss these flags from backplane login quite a lot.

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR

@mrbarge mrbarge force-pushed the backplane-session-manager branch from 158066c to e9c50a0 Compare July 8, 2023 05:18
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 8, 2023

@mrbarge: 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/test-infra repository. I understand the commands that are listed here.

@codecov-commenter
Copy link

Codecov Report

Merging #144 (e9c50a0) into main (38d58b1) will increase coverage by 0.00%.
The diff coverage is 44.44%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #144   +/-   ##
=======================================
  Coverage   48.85%   48.86%           
=======================================
  Files          51       51           
  Lines        3242     3266   +24     
=======================================
+ Hits         1584     1596   +12     
- Misses       1387     1397   +10     
- Partials      271      273    +2     
Impacted Files Coverage Δ
pkg/cli/session/session.go 50.44% <0.00%> (-2.83%) ⬇️
cmd/ocm-backplane/session/session.go 80.43% <100.00%> (+6.90%) ⬆️

@@ -373,17 +396,17 @@ func (e *BackplaneSession) initClusterLogin(cmd *cobra.Command) error {
// Setting up the flags
err := login.LoginCmd.Flags().Set("multi", "true")
if err != nil {
return fmt.Errorf("error occered when setting multi flag %v", err)
return fmt.Errorf("error occurred when setting multi flag %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch :)

false,
"Login to service cluster for the given hosted cluster or mgmt cluster.",
)

Copy link
Contributor

Choose a reason for hiding this comment

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

next time, We should move these two flags to globalOpts and reuse them via login , session and multi-login

@samanthajayasinghe
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrbarge, samanthajayasinghe, supreeth7

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2023
@openshift-merge-robot openshift-merge-robot merged commit 897c064 into openshift:main Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants