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

cli: move cli/internal libraries #2623

Merged
merged 4 commits into from
Nov 22, 2023
Merged

Conversation

msanft
Copy link
Contributor

@msanft msanft commented Nov 21, 2023

Context

We want to transition to a Constellation library that can be consumed by both the CLI and the Terraform provider. The CLI should only contain code that directly interacts with the user and should consume everything else through the library's API. A first step towards this is moving the packages that do not fall under this category from cli/internal to internal.

Proposed change(s)

  • Move all packages from cli/internal to internal that will also be used by the Terraform provider.
  • Create the internal/constellation package.

Additional info

Checklist

  • Add labels (e.g., for changelog category)
  • Is PR title adequate for changelog?
  • Link to Milestone

Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
@msanft msanft added the no changelog Change won't be listed in release changelog label Nov 21, 2023
@msanft msanft added this to the v2.14.0 milestone Nov 21, 2023
Copy link

netlify bot commented Nov 21, 2023

Deploy Preview for constellation-docs canceled.

Name Link
🔨 Latest commit 28fc5a9
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/655cb2d0f0c99e0008f3d887

@katexochen katexochen removed their request for review November 21, 2023 12:36
Signed-off-by: Moritz Sanft <[email protected]>
Copy link
Member

@daniel-weisse daniel-weisse left a comment

Choose a reason for hiding this comment

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

Annotated some files of packages I think should be kept in cli/internal.

While we are already in the process of moving files, should we consider moving the Helm charts to their own (more globally visible) directory similar to the Terraform files?
I feel that it can sometimes be a bit of hassle to have them deeply nested somewhere in our Go helm code.

cli/internal/pathprefix/pathprefix.go Outdated Show resolved Hide resolved
internal/cloudcmd/BUILD.bazel Outdated Show resolved Hide resolved
internal/featureset/BUILD.bazel Show resolved Hide resolved
internal/libvirt/BUILD.bazel Outdated Show resolved Hide resolved
internal/terraform/BUILD.bazel Outdated Show resolved Hide resolved
@msanft msanft requested a review from daniel-weisse November 21, 2023 13:38
Copy link
Contributor

Coverage report

Package Old New Trend
cli/internal/cloudcmd 68.40% 68.40% ↔️
cli/internal/cmd 54.60% 54.60% ↔️
cli/internal/libvirt [no test files] [no test files] 🚧
cli/internal/terraform 72.30% 72.30% ↔️
hack/gocoverage 59.20% 59.20% ↔️
internal/constellation 0.00% [no test files] 🚨
internal/featureset 0.00% [no test files] 🚨
internal/helm 0.00% 54.30% 🆕
internal/helm/imageversion 0.00% [no test files] 🚨
internal/kubecmd 0.00% 64.60% 🆕
internal/state 0.00% 94.60% 🆕

@msanft msanft requested a review from 3u13r November 21, 2023 13:50
Copy link
Member

@3u13r 3u13r left a comment

Choose a reason for hiding this comment

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

LGTM

@msanft msanft merged commit 968cdc1 into main Nov 22, 2023
9 checks passed
@msanft msanft deleted the feat/cli/move-constellation-library branch November 22, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Change won't be listed in release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants