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

Migrates config package for ocm tools #78

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iamkirkbater
Copy link

@iamkirkbater iamkirkbater commented Nov 15, 2024

This PR aims to migrate the pkg/config contents from openshift-online/ocm-cli to ocm-common.

This was tested by removing the pkg/ocm/config directory from openshift-online/ocm-cli, running a sed command to replace all instances of config, and adding the following lines to go.mod. I then built the CLI tool, saw no build errors, ran a login and spot checked a few other commands with no issues.

find cmd -type f -print0 | xargs -0 gsed -i s#github.com/openshift-online/ocm-cli/pkg/config#github.com/openshift-online/ocm-common/pkg/ocm/config#

^ Note this uses gsed because I'm on a Mac, linux users will just need sed

require github.com/openshift-online/ocm-common v0.0.13
replace github.com/openshift-online/ocm-common v0.0.13 => /Users/kbater/Projects/openshift-online/ocm-com
mon

Additional testing was performed with migrating openshift/osdctl#632 to use these packages, using a similar require/replace methodology in the go.mod to test against this package locally.

@hunterkepley
Copy link
Contributor

I see no issues here;

  1. initial test by @iamkirkbater worked
  2. Package structure/file structure looks good to me
  3. Any issues can be resolved when needed if there are some minor ones (I.E. bumping SDK or whatever module's version)

@hunterkepley
Copy link
Contributor

/lgtm

@xueli181114
Copy link
Contributor

@iamkirkbater Do you mind to fix the failures?

@xueli181114
Copy link
Contributor

@iamkirkbater too many commits. You have to run git rebase -i HEAD~n to squash the commits

This commit migrates the config, connection-builder and properties
packages from the ocm CLI to be shared across ocm-using codebases for
consistency.
@iamkirkbater
Copy link
Author

Rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants