Skip to content

Commit

Permalink
WIP: adding a note
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleGedd committed May 28, 2024
1 parent c236b2c commit 32361fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pkg/bundler/fetcher/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ func filterPkgPaths(pkgPaths *layout.PackagePaths, includeLayers []string, optio
// include all paths that aren't in the blobs dir
if !strings.Contains(path, config.BlobsDir) {
// only grab req'd + specified optional components
if strings.HasPrefix(path, "components/") {
if strings.Contains(path, "/components/") {
if shouldInclude := utils.IncludeComponent(path, optionalComponents); shouldInclude {
filteredPaths = append(filteredPaths, path)
continue
}
} else {
filteredPaths = append(filteredPaths, path)
}
filteredPaths = append(filteredPaths, path)
}
// include paths that are in the blobs dir and are in includeLayers
for _, layer := range includeLayers {
Expand Down
4 changes: 4 additions & 0 deletions src/test/e2e/bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ func TestBundleOptionalComponents(t *testing.T) {
createLocal(t, bundleDir, e2e.Arch)
publishInsecure(t, bundlePath, "localhost:888")

// todo: look through bundle contents to make sure only the selected components are present
// local pkgs will a correct pkg manifest (missing non-selected optional component tarballs)
// remote pkgs will not, because they already have a pkg manifest and we don't want to rewrite it

t.Run("test local deploy", func(t *testing.T) {
deploy(t, bundlePath)
remove(t, bundlePath)
Expand Down

0 comments on commit 32361fc

Please sign in to comment.