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

OCM-12919 | chore: Migrates config package for ocm tools #78

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

iamkirkbater
Copy link
Contributor

@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

@iamkirkbater
Copy link
Contributor Author

Rebased.

@iamkirkbater iamkirkbater changed the title Migrates config package for ocm tools OCM-12919 | chore: Migrates config package for ocm tools Dec 3, 2024
This commit migrates the config, connection-builder and properties
packages from the ocm CLI to be shared across ocm-using codebases for
consistency.
@hunterkepley
Copy link
Contributor

/lgtm

@hunterkepley hunterkepley merged commit dec28d7 into openshift-online:main Dec 3, 2024
5 checks passed
@iamkirkbater iamkirkbater deleted the config branch December 3, 2024 20:23
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