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

Fetch Backplane API URL via OCM environment #281

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

samanthajayasinghe
Copy link
Contributor

@samanthajayasinghe samanthajayasinghe commented Dec 6, 2023

What type of PR is this?

feature

What this PR does / Why we need it?

This PR automatically detect the backplane URL via OCM env and users don't need set BP API URL in the config file

Which Jira/Github issue(s) does this PR fix?

https://issues.redhat.com/browse/OSD-19188
Resolves #

Special notes for your reviewer

How to test

step 1

  • delete the URL setting from config file
  • Login prod/stg/int env clusters and check other bp-cli commands ( eg cloud console)

step2

  • Keep URL setting in the config file
  • It will override via ocm env URL and warn users

step3

  • Set BP API URL via env vars ( for ISV's )
  • env BP API has high priority over OCM env

Pre-checks (if applicable)

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

@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2023

Codecov Report

Merging #281 (da7e96c) into main (4f63014) will increase coverage by 0.08%.
The diff coverage is 59.37%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
+ Coverage   46.83%   46.91%   +0.08%     
==========================================
  Files          53       53              
  Lines        3540     3568      +28     
==========================================
+ Hits         1658     1674      +16     
- Misses       1621     1633      +12     
  Partials      261      261              
Files Coverage Δ
pkg/cli/config/config.go 64.38% <82.60%> (+3.27%) ⬆️
pkg/ocm/ocmWrapper.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

@supreeth7 supreeth7 left a comment

Choose a reason for hiding this comment

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

Overall nicely done! 💯
Requested a few changes/refinements.

pkg/ocm/ocmWrapper.go Show resolved Hide resolved
pkg/ocm/ocmWrapper.go Outdated Show resolved Hide resolved
pkg/ocm/ocmWrapper.go Outdated Show resolved Hide resolved
pkg/cli/config/config.go Outdated Show resolved Hide resolved
pkg/cli/config/config.go Outdated Show resolved Hide resolved
pkg/cli/config/config.go Outdated Show resolved Hide resolved
pkg/cli/config/config.go Outdated Show resolved Hide resolved
pkg/cli/config/config.go Outdated Show resolved Hide resolved
pkg/cli/config/config.go Outdated Show resolved Hide resolved
pkg/cli/config/config.go Outdated Show resolved Hide resolved
Copy link
Contributor

@supreeth7 supreeth7 left a comment

Choose a reason for hiding this comment

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

Tested it locally and everything checks out.
A few UI/UX improvement suggestions and this will be good to be merged.

pkg/cli/config/config.go Outdated Show resolved Hide resolved
pkg/cli/config/config.go Outdated Show resolved Hide resolved
Fetch Backplane URL via OCM environment
Copy link
Contributor

openshift-ci bot commented Dec 11, 2023

@samanthajayasinghe: 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.

Copy link
Contributor

@supreeth7 supreeth7 left a comment

Choose a reason for hiding this comment

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

/lgtm

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

openshift-ci bot commented Dec 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 Dec 12, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 36e3db6 into openshift:main Dec 12, 2023
7 checks passed
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.

3 participants