POC | feat: break common repo into sub modules #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Since we introduced aws sdk v2 into ROSA CLI and subsequently ocm-common as part of the unified CI efforts we have created a dependency issue between ROSA CLI, OCM-Common and CAPA, as CAPA is still on aws sdk v1.
Solution
This POC proposes splitting the current common repo in sub modules, to enable clients to selectively import the package they require with out taking on the extra dependency bloat.
The current struct looks like
This splits the current pkg into 3 sub modules and one parent module:
The project also maintains a parent module, currently is only scoped to utility functions shared across modules, to reduce the need of sub modules importing each other. It is important to keep submodules from being dependant on each other.
Versioning of sub modules will be following what it outlined in go-modules-by-example - https://github.com/go-modules-by-example/index/blob/master/009_submodules/README.md