-
Notifications
You must be signed in to change notification settings - Fork 270
fix: skeleton packages drop non-host-arch components #5020
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
ae13e0d
aebfb85
9760ab8
61859b1
09a5480
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,8 @@ type DefinitionOptions struct { | |
| IsInteractive bool | ||
| // SkipVersionCheck skips version requirement validation | ||
| SkipVersionCheck bool | ||
| // Skeleton retains all architecture variants instead of filtering to the build host arch | ||
| Skeleton bool | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd like to avoid tying I think something like below would be a better abstraction. It would also aid the work that @chaospuppy is doing in #4783.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just pushed a commit to address this, let me know any feedback you have |
||
| types.RemoteOptions | ||
| } | ||
|
|
||
|
|
@@ -75,7 +77,11 @@ func PackageDefinition(ctx context.Context, packagePath string, opts DefinitionO | |
| if err != nil { | ||
| return DefinedPackage{}, err | ||
| } | ||
| pkg.Metadata.Architecture = config.GetArch(pkg.Metadata.Architecture) | ||
| if opts.Skeleton { | ||
| pkg.Metadata.Architecture = v1alpha1.SkeletonArch | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still don't want the load package to know about skeletons, instead of setting the architecture, and checking for a skeleton architecture we should pass the variant dimensions into validate and import |
||
| } else { | ||
| pkg.Metadata.Architecture = config.GetArch(pkg.Metadata.Architecture) | ||
| } | ||
| opts.CachePath, err = utils.ResolveCachePath(opts.CachePath) | ||
| if err != nil { | ||
| return DefinedPackage{}, err | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test shouldn't be focused on skeletons (publish_test.go is handling that). Make this test ensure that the variant dimensions work separately and together