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

Bundle Creation Failure #478

Closed
beholdenkey opened this issue Feb 28, 2024 · 7 comments
Closed

Bundle Creation Failure #478

beholdenkey opened this issue Feb 28, 2024 · 7 comments
Labels
possible-bug Something may not be working

Comments

@beholdenkey
Copy link
Contributor

Environment

Device and OS: macos
App version: Sonoma 14.3.1
Kubernetes distro being used: N/A
Other:

Steps to reproduce

1.create bundles/demo --confirm --no-progress

---
# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/uds-cli/main/uds.schema.json
kind: UDSBundle
metadata:
  name: example
  description: an example UDS bundle
  version: 0.0.1

packages:
  - name: init
    repository: ghcr.io/defenseunicorns/packages/init
    ref: v0.32.4
    optionalComponents:
      - git-server
  - name: podinfo
    repository: ghcr.io/defenseunicorns/uds-cli/podinfo
    ref: 0.0.1

Expected result

Previously, the bundle would create

Actual Result

uds create bundles/demo --confirm --no-progress

 NOTE  Saving log file to
       /var/folders/6j/cn07plcd3kbghwc8l1kckddw0000gn/T/uds-2024-02-28-11-09-17-2045085123.log

                                                                                                      
  🎁 BUNDLE DEFINITION                                                                                
                                                                                                      


kind: UDSBundle
metadata:
  name: example
  description: an example UDS bundle
  version: 0.0.1
packages:
- name: init
  repository: ghcr.io/defenseunicorns/packages/init
  ref: v0.32.4
  optionalComponents:
  - git-server
- name: podinfo
  repository: ghcr.io/defenseunicorns/uds-cli/podinfo
  ref: 0.0.1

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  •  Validating bundle
panic: no ':' separator in digest ""

goroutine 1 [running]:
github.com/opencontainers/go-digest.Digest.sepIndex({0x0, 0x0})
        /home/runner/go/pkg/mod/github.com/opencontainers/go-digest@v1.0.0/digest.go:153 +0x90
github.com/opencontainers/go-digest.Digest.Encoded(...)
        /home/runner/go/pkg/mod/github.com/opencontainers/go-digest@v1.0.0/digest.go:137
github.com/defenseunicorns/uds-cli/src/pkg/bundle.(*Bundle).ValidateBundleResources(0x14001800000, 0x14001800008, 0x0?)
        /home/runner/work/uds-cli/uds-cli/src/pkg/bundle/common.go:149 +0x1150
github.com/defenseunicorns/uds-cli/src/pkg/bundle.(*Bundle).Create(0x14001800000)
        /home/runner/work/uds-cli/uds-cli/src/pkg/bundle/create.go:47 +0x108
github.com/defenseunicorns/uds-cli/src/cmd.glob..func9(0x10b9657a0?, {0x1400176e2a0, 0x1, 0x1074ec2fe?})
        /home/runner/work/uds-cli/uds-cli/src/cmd/uds.go:60 +0xec
github.com/spf13/cobra.(*Command).execute(0x10b9657a0, {0x1400176e240, 0x3, 0x3})
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x10b9668e0)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/defenseunicorns/uds-cli/src/cmd.Execute()
        /home/runner/work/uds-cli/uds-cli/src/cmd/root.go:60 +0x24
main.main()
        /home/runner/work/uds-cli/uds-cli/main.go:19 +0x4c

Visual Proof (screenshots, videos, text, etc)

Screenshot 2024-02-28 at 11 12 55 AM

Severity/Priority

Additional Context

Add any other context or screenshots about the technical debt here.

@beholdenkey beholdenkey added the possible-bug Something may not be working label Feb 28, 2024
@UncleGedd
Copy link
Collaborator

UncleGedd commented Feb 28, 2024

Hey @beholdenkey thanks for the issue! Can you confirm what uds version you are using? There was a breaking change a few versions ago that would've led to the error you're seeing. I just created the same bundle with the latest UDS CLI version and it appears to be working

 /tmp  uds create                                                                                             ✔ │ base Py

 NOTE  Saving log file to
       /var/folders/sf/_jrk8zgs5tg33r_h1gzh_6t40000gn/T/uds-2024-02-28-15-13-28-4292722898.log


  🎁 BUNDLE DEFINITION



kind: UDSBundle
metadata:
  name: example
  description: an example UDS bundle
  version: 0.0.1
packages:
- name: init
  repository: ghcr.io/defenseunicorns/packages/init
  ref: v0.32.4
  optionalComponents:
  - git-server
- name: podinfo
  repository: ghcr.io/defenseunicorns/uds-cli/podinfo
  ref: 0.0.1

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

? Create this bundle? Yes
  ✔  Bundle Validated


  🐕 Fetching Packages


  ⠸  Fetching init package layer metadata (package 1 of 2) (1s)
  ✔  Successfully pulled package: init (125.32 MBs)
  ⠹  Fetching podinfo package layer metadata (package 2 of 2) (0s)
  ✔  Successfully pulled package: podinfo (149.21 MBs)
  ✔  Fetched package: podinfo

  🚧 Building Bundle


  ✔  Created bundle archive at: /tmp/uds-bundle-example-arm64-0.0.1.tar.zst

@UncleGedd
Copy link
Collaborator

UncleGedd commented Feb 28, 2024

Noting that our error messaging is total nonsense there, we have another issue to fix that

@beholdenkey
Copy link
Contributor Author

beholdenkey commented Mar 5, 2024

@UncleGedd let me try to update my bundle config and see if that works.

> uds version
v0.9.2

@beholdenkey
Copy link
Contributor Author

@UncleGedd, I tried it with one of the bundle configurations within the test and am still getting the same error.

@UncleGedd
Copy link
Collaborator

Just tried again and it seems to be working on our end, see: https://vhs.charm.sh/vhs-18l8NO7PNeKtYgBLkhc0rb.gif

If that doesn't help, we'll need some more details about the steps to reproduce

@beholdenkey
Copy link
Contributor Author

@UncleGedd tried again with the same configuration, and it worked. I also rotated the password I used to log in to the GitHub container registry, and that fixed my second issue, which was that I wasn't able to pull the packages from GitHub. Everything is good on my end. Thank you for your time and patience.

@UncleGedd
Copy link
Collaborator

fixed my second issue, which was that I wasn't able to pull the packages from GitHub.

Glad everything worked out. I'm sure the error messaging probably wasn't the most helpful. If you have any ideas on improving that error messaging for your particular issues, feel free to open follow-up issues (we also welcome PRs!)

Closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible-bug Something may not be working
Projects
None yet
Development

No branches or pull requests

2 participants