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

chore: update uds to zarf v0.32.5 #511

Merged
merged 8 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b
github.com/defenseunicorns/maru-runner v0.0.2
github.com/defenseunicorns/zarf v0.32.4
github.com/defenseunicorns/zarf v0.32.5
github.com/fsnotify/fsnotify v1.7.0
github.com/goccy/go-yaml v1.11.3
github.com/mholt/archiver/v3 v3.5.1
Expand Down Expand Up @@ -86,7 +86,7 @@ require (
github.com/alibabacloud-go/tea-xml v1.1.3 // indirect
github.com/aliyun/credentials-go v1.3.1 // indirect
github.com/anchore/bubbly v0.0.0-20231115134915-def0aba654a9 // indirect
github.com/anchore/clio v0.0.0-20240209204744-cb94e40a4f65 // indirect
github.com/anchore/clio v0.0.0-20240301210832-abcb7197da84 // indirect
github.com/anchore/fangs v0.0.0-20231201140849-5075d28d6d8b // indirect
github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a // indirect
github.com/anchore/go-macholibre v0.0.0-20220308212642-53e6d0aaf6fb // indirect
Expand Down Expand Up @@ -212,7 +212,7 @@ require (
github.com/go-git/go-git/v5 v5.11.0 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.1 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.22.0 // indirect
Expand Down Expand Up @@ -473,7 +473,7 @@ require (
google.golang.org/grpc v1.61.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/evanphx/json-patch.v5 v5.6.0 // indirect
gopkg.in/go-jose/go-jose.v2 v2.6.1 // indirect
gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
Expand Down
17 changes: 8 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ github.com/aliyun/credentials-go v1.3.1 h1:uq/0v7kWrxmoLGpqjx7vtQ/s03f0zR//0br/x
github.com/aliyun/credentials-go v1.3.1/go.mod h1:8jKYhQuDawt8x2+fusqa1Y6mPxemTsBEN04dgcAcYz0=
github.com/anchore/bubbly v0.0.0-20231115134915-def0aba654a9 h1:p0ZIe0htYOX284Y4axJaGBvXHU0VCCzLN5Wf5XbKStU=
github.com/anchore/bubbly v0.0.0-20231115134915-def0aba654a9/go.mod h1:3ZsFB9tzW3vl4gEiUeuSOMDnwroWxIxJelOOHUp8dSw=
github.com/anchore/clio v0.0.0-20240209204744-cb94e40a4f65 h1:u9XrEabKlGPsrmRvAER+kUKkwXiJfLyqGhmOTFsXjX4=
github.com/anchore/clio v0.0.0-20240209204744-cb94e40a4f65/go.mod h1:8Jr7CjmwFVcBPtkJdTpaAGHimoGJGfbExypjzOu87Og=
github.com/anchore/clio v0.0.0-20240301210832-abcb7197da84 h1:z8C0o7URkxvuh6isbZbz3la5m6sINzIOmt6UfZ4ey1o=
github.com/anchore/clio v0.0.0-20240301210832-abcb7197da84/go.mod h1:XEh8WpqQSsNNZZjCZ6xWAk/DoNYfyISjUQ+Bv06xHEc=
github.com/anchore/fangs v0.0.0-20231201140849-5075d28d6d8b h1:L/djgY7ZbZ/38+wUtdkk398W3PIBJLkt1N8nU/7e47A=
github.com/anchore/fangs v0.0.0-20231201140849-5075d28d6d8b/go.mod h1:TLcE0RE5+8oIx2/NPWem/dq1DeaMoC+fPEH7hoSzPLo=
github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a h1:nJ2G8zWKASyVClGVgG7sfM5mwoZlZ2zYpIzN2OhjWkw=
Expand Down Expand Up @@ -600,8 +600,8 @@ github.com/daviddengcn/go-colortext v1.0.0 h1:ANqDyC0ys6qCSvuEK7l3g5RaehL/Xck9EX
github.com/daviddengcn/go-colortext v1.0.0/go.mod h1:zDqEI5NVUop5QPpVJUxE9UO10hRnmkD5G4Pmri9+m4c=
github.com/defenseunicorns/maru-runner v0.0.2 h1:aZ/MCryY3Dp+u14nhGrvOXVnZI3DYY3ytjFdfHnyqY4=
github.com/defenseunicorns/maru-runner v0.0.2/go.mod h1:3K+JeLpud+rb8vC+nPFaTNjhqW40++6qFKKVTBEEzQM=
github.com/defenseunicorns/zarf v0.32.4 h1:3foCaUHUtAu8YId49j3u+EVknaTB8ERaQ9J6Do+bAwc=
github.com/defenseunicorns/zarf v0.32.4/go.mod h1:f4H7al7qnj5VXfkUkB/CcepVW/DA/O5tvAy8TWv9aT8=
github.com/defenseunicorns/zarf v0.32.5 h1:g7hQPCUEd8PlK4s6f+e7naCS9q85ghWLjegEbcgUvPs=
github.com/defenseunicorns/zarf v0.32.5/go.mod h1:dDIYZdh4XGkI/A6EpZHEBzQaQjw0hSbxJs4MQFOSqLc=
github.com/deitch/magic v0.0.0-20230404182410-1ff89d7342da h1:ZOjWpVsFZ06eIhnh4mkaceTiVoktdU67+M7KDHJ268M=
github.com/deitch/magic v0.0.0-20230404182410-1ff89d7342da/go.mod h1:B3tI9iGHi4imdLi4Asdha1Sc6feLMTfPLXh9IUYmysk=
github.com/depcheck-test/depcheck-test v0.0.0-20220607135614-199033aaa936 h1:foGzavPWwtoyBvjWyKJYDYsyzy+23iBV7NKTwdk+LRY=
Expand Down Expand Up @@ -765,8 +765,8 @@ github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs
github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw=
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA=
github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8=
github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
Expand Down Expand Up @@ -1772,7 +1772,6 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
Expand Down Expand Up @@ -2398,8 +2397,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/evanphx/json-patch.v5 v5.6.0 h1:BMT6KIwBD9CaU91PJCZIe46bDmBWa9ynTQgJIOpfQBk=
gopkg.in/evanphx/json-patch.v5 v5.6.0/go.mod h1:/kvTRh1TVm5wuM6OkHxqXtE/1nUZZpihg29RtuIyfvk=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/go-jose/go-jose.v2 v2.6.1 h1:qEzJlIDmG9q5VO0M/o8tGS65QMHMS1w01TQJB1VPJ4U=
gopkg.in/go-jose/go-jose.v2 v2.6.1/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEIoEdZlFBI=
gopkg.in/go-jose/go-jose.v2 v2.6.3 h1:nt80fvSDlhKWQgSWyHyy5CfmlQr+asih51R8PTWNKKs=
gopkg.in/go-jose/go-jose.v2 v2.6.3/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEIoEdZlFBI=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
Expand Down
5 changes: 2 additions & 3 deletions src/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"time"

"github.com/defenseunicorns/uds-cli/src/types"
zarfConfig "github.com/defenseunicorns/zarf/src/config"
zarfTypes "github.com/defenseunicorns/zarf/src/types"
)

Expand Down Expand Up @@ -114,9 +113,9 @@ var (
// could technically remove, but it doesn't hurt anything for now
var DefaultZarfInitOptions = zarfTypes.ZarfInitOptions{
GitServer: zarfTypes.GitServerInfo{
PushUsername: zarfConfig.ZarfGitPushUser,
PushUsername: zarfTypes.ZarfGitPushUser,
},
RegistryInfo: zarfTypes.RegistryInfo{
PushUsername: zarfConfig.ZarfRegistryPushUser,
PushUsername: zarfTypes.ZarfRegistryPushUser,
},
}
8 changes: 5 additions & 3 deletions src/pkg/bundle/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package bundle

import (
"context"
"errors"
"fmt"
"os"
Expand All @@ -21,6 +22,7 @@ import (
"github.com/defenseunicorns/zarf/src/pkg/oci"
"github.com/defenseunicorns/zarf/src/pkg/utils"
"github.com/defenseunicorns/zarf/src/pkg/utils/helpers"
"github.com/defenseunicorns/zarf/src/pkg/zoci"
zarfTypes "github.com/defenseunicorns/zarf/src/types"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand Down Expand Up @@ -139,12 +141,12 @@ func (b *Bundle) ValidateBundleResources(bundle *types.UDSBundle, spinner *messa
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
remote, err := oci.NewOrasRemote(url, platform)
remote, err := zoci.NewRemote(url, platform)
if err != nil {
return err
}
if err := remote.Repo().Reference.ValidateReferenceAsDigest(); err != nil {
manifestDesc, err := remote.ResolveRoot()
manifestDesc, err := remote.ResolveRoot(context.TODO())
if err != nil {
return err
}
Expand Down Expand Up @@ -186,7 +188,7 @@ func (b *Bundle) ValidateBundleResources(bundle *types.UDSBundle, spinner *messa
// todo: need to packager.ValidatePackageSignature (or come up with a bundle-level signature scheme)
publicKeyPath := filepath.Join(b.tmp, config.PublicKeyFile)
if pkg.PublicKey != "" {
if err := utils.WriteFile(publicKeyPath, []byte(pkg.PublicKey)); err != nil {
if err := os.WriteFile(publicKeyPath, []byte(pkg.PublicKey), helpers.ReadWriteUser); err != nil {
return err
}
defer os.Remove(publicKeyPath)
Expand Down
8 changes: 4 additions & 4 deletions src/pkg/bundle/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package bundle

import (
"context"
"encoding/json"
"fmt"
"os"
Expand All @@ -21,6 +20,7 @@ import (
"github.com/defenseunicorns/zarf/src/pkg/message"
"github.com/defenseunicorns/zarf/src/pkg/packager"
"github.com/defenseunicorns/zarf/src/pkg/utils"
"github.com/defenseunicorns/zarf/src/pkg/utils/helpers"
zarfTypes "github.com/defenseunicorns/zarf/src/types"
"github.com/pterm/pterm"
"golang.org/x/exp/slices"
Expand All @@ -36,7 +36,6 @@ var templatedVarRegex = regexp.MustCompile(`\${([^}]+)}`)

// Deploy deploys a bundle
func (b *Bundle) Deploy() error {
ctx := context.TODO()

pterm.Println()
metadataSpinner := message.NewProgressSpinner("Loading bundle metadata")
Expand All @@ -57,7 +56,7 @@ func (b *Bundle) Deploy() error {
}

// create a new provider
provider, err := NewBundleProvider(ctx, b.cfg.DeployOpts.Source, b.tmp)
provider, err := NewBundleProvider(b.cfg.DeployOpts.Source, b.tmp)
if err != nil {
return err
}
Expand Down Expand Up @@ -144,7 +143,7 @@ func deployPackages(packages []types.Package, resume bool, b *Bundle, zarfPackag

publicKeyPath := filepath.Join(b.tmp, config.PublicKeyFile)
if pkg.PublicKey != "" {
if err := utils.WriteFile(publicKeyPath, []byte(pkg.PublicKey)); err != nil {
if err := os.WriteFile(publicKeyPath, []byte(pkg.PublicKey), helpers.ReadWriteUser); err != nil {
return err
}
defer os.Remove(publicKeyPath)
Expand All @@ -159,6 +158,7 @@ func deployPackages(packages []types.Package, resume bool, b *Bundle, zarfPackag
OptionalComponents: strings.Join(pkg.OptionalComponents, ","),
PublicKeyPath: publicKeyPath,
SetVariables: pkgVars,
Retries: 1,
}

valuesOverrides, err := b.loadChartOverrides(pkg, pkgVars)
Expand Down
5 changes: 1 addition & 4 deletions src/pkg/bundle/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
package bundle

import (
"context"

"github.com/defenseunicorns/uds-cli/src/config"
"github.com/defenseunicorns/zarf/src/pkg/utils"
)

// Inspect pulls/unpacks a bundle's metadata and shows it
func (b *Bundle) Inspect() error {
ctx := context.TODO()

// Check that provided oci source path is valid, and update it if it's missing the full path
source, err := CheckOCISourcePath(b.cfg.InspectOpts.Source)
Expand All @@ -23,7 +20,7 @@ func (b *Bundle) Inspect() error {
b.cfg.InspectOpts.Source = source

// create a new provider
provider, err := NewBundleProvider(ctx, b.cfg.InspectOpts.Source, b.tmp)
provider, err := NewBundleProvider(b.cfg.InspectOpts.Source, b.tmp)
if err != nil {
return err
}
Expand Down
14 changes: 8 additions & 6 deletions src/pkg/bundle/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/defenseunicorns/uds-cli/src/types"
"github.com/defenseunicorns/zarf/src/pkg/oci"
"github.com/defenseunicorns/zarf/src/pkg/utils/helpers"
"github.com/defenseunicorns/zarf/src/pkg/zoci"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

Expand Down Expand Up @@ -43,29 +44,30 @@ type Provider interface {
PublishBundle(bundle types.UDSBundle, remote *oci.OrasRemote) error

// getBundleManifest gets the bundle's root manifest
getBundleManifest() (*oci.ZarfOCIManifest, error)
getBundleManifest() (*oci.Manifest, error)

// ZarfPackageNameMap returns a map of the zarf package name specified in the uds-bundle.yaml to the actual zarf package name
ZarfPackageNameMap() (map[string]string, error)
}

// NewBundleProvider returns a new bundler Provider based on the source type
func NewBundleProvider(ctx context.Context, source, destination string) (Provider, error) {
func NewBundleProvider(source, destination string) (Provider, error) {
ctx := context.TODO()
if helpers.IsOCIURL(source) {
op := ociProvider{ctx: ctx, src: source, dst: destination}
op := ociProvider{src: source, dst: destination}
platform := ocispec.Platform{
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
// get remote client
remote, err := oci.NewOrasRemote(source, platform)
remote, err := zoci.NewRemote(source, platform)
if err != nil {
return nil, err
}
op.OrasRemote = remote
op.OrasRemote = remote.OrasRemote

// get root manifest
root, err := op.FetchRoot()
root, err := op.FetchRoot(ctx)
if err != nil {
return nil, err
}
Expand Down
8 changes: 4 additions & 4 deletions src/pkg/bundle/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package bundle

import (
"context"
"fmt"
"os"
"path/filepath"
Expand All @@ -14,6 +13,7 @@ import (
"github.com/defenseunicorns/uds-cli/src/pkg/utils"
"github.com/defenseunicorns/zarf/src/pkg/oci"
zarfUtils "github.com/defenseunicorns/zarf/src/pkg/utils"
"github.com/defenseunicorns/zarf/src/pkg/zoci"
av3 "github.com/mholt/archiver/v3"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand All @@ -24,7 +24,7 @@ func (b *Bundle) Publish() error {

// load bundle metadata into memory
// todo: having the tmp dir be the provider.dst is weird
provider, err := NewBundleProvider(context.TODO(), b.cfg.PublishOpts.Source, b.tmp)
provider, err := NewBundleProvider(b.cfg.PublishOpts.Source, b.tmp)
if err != nil {
return err
}
Expand Down Expand Up @@ -54,11 +54,11 @@ func (b *Bundle) Publish() error {
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
remote, err := oci.NewOrasRemote(fmt.Sprintf("%s/%s:%s", ociURL, bundleName, bundleTag), platform)
remote, err := zoci.NewRemote(fmt.Sprintf("%s/%s:%s", ociURL, bundleName, bundleTag), platform)
if err != nil {
return err
}
err = provider.PublishBundle(b.bundle, remote)
err = provider.PublishBundle(b.bundle, remote.OrasRemote)
if err != nil {
return err
}
Expand Down
13 changes: 8 additions & 5 deletions src/pkg/bundle/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ import (
"github.com/defenseunicorns/zarf/src/pkg/message"
"github.com/defenseunicorns/zarf/src/pkg/oci"
"github.com/defenseunicorns/zarf/src/pkg/utils"
"github.com/defenseunicorns/zarf/src/pkg/utils/helpers"
"github.com/defenseunicorns/zarf/src/pkg/zoci"
"github.com/mholt/archiver/v4"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

// Pull pulls a bundle and saves it locally
func (b *Bundle) Pull() error {
ctx := context.TODO()
// use uds-cache/packages as the dst dir for the pull to get auto caching
// we use an ORAS ocistore to make that dir look like an OCI artifact
cacheDir := filepath.Join(zarfConfig.GetAbsCachePath(), "packages")
Expand All @@ -37,7 +40,7 @@ func (b *Bundle) Pull() error {
}
b.cfg.PullOpts.Source = source

provider, err := NewBundleProvider(context.TODO(), b.cfg.PullOpts.Source, cacheDir)
provider, err := NewBundleProvider(b.cfg.PullOpts.Source, cacheDir)
if err != nil {
return err
}
Expand All @@ -54,13 +57,13 @@ func (b *Bundle) Pull() error {
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
remote, err := oci.NewOrasRemote(b.cfg.PullOpts.Source, platform)
remote, err := zoci.NewRemote(b.cfg.PullOpts.Source, platform)
if err != nil {
return err
}

// fetch the bundle's root descriptor
rootDesc, err := remote.ResolveRoot()
rootDesc, err := remote.ResolveRoot(ctx)
if err != nil {
return err
}
Expand All @@ -79,7 +82,7 @@ func (b *Bundle) Pull() error {
return err
}
indexJSONPath := filepath.Join(b.tmp, "index.json")
if err := utils.WriteFile(indexJSONPath, bytes); err != nil {
if err := os.WriteFile(indexJSONPath, bytes, helpers.ReadWriteUser); err != nil {
return err
}

Expand Down Expand Up @@ -122,7 +125,7 @@ func (b *Bundle) Pull() error {
}

// tarball the bundle
if err := format.Archive(context.TODO(), out, files); err != nil {
if err := format.Archive(ctx, out, files); err != nil {
return err
}

Expand Down
Loading
Loading