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

panic: interface conversion: name.Reference is name.Digest, not name.Tag #192

Closed
aanm opened this issue Nov 4, 2022 · 4 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/release Categorizes an issue or PR as relevant to SIG Release.

Comments

@aanm
Copy link

aanm commented Nov 4, 2022

The following command

bom generate -o sbom_ci_pr_docker-plugin_dee90ec522b992efa8962579f9e0e9be243388cd.spdx \
  bom generate -o sbom_ci_pr_docker-plugin_dee90ec522b992efa8962579f9e0e9be243388cd.spdx \
  --dirs=. \
  --image=quay.io/cilium/docker-plugin-ci@sha256:b6a2934ca71557db04e88e42548e26cf8f907eadc0eb2fd7c0abc232215b54aa
  bom generate -o sbom_ci_pr_race_docker-plugin_dee90ec522b992efa8962579f9e0e9be243388cd.spdx \
  --dirs=. \
  --image=quay.io/cilium/docker-plugin-ci@sha256:8348cf7c457e4261469f7313889b51d0976645e4fdb762910639ad569cca555c
  bom generate -o sbom_ci_pr_unstripped_docker-plugin_dee90ec522b992efa8962579f9e0e9be243388cd.spdx \
  --dirs=. \
  --image=quay.io/cilium/docker-plugin-ci@sha256:2b454f79a725e060602806202126576b45b676e380be502ff4cef24659dab334

results in

panic: interface conversion: name.Reference is name.Digest, not name.Tag

goroutine 1 [running]:
sigs.k8s.io/bom/pkg/spdx.refInfoFromIndex(0xc0020a7540)
	sigs.k8s.io/bom/pkg/spdx/implementation.go:253 +0xed3
sigs.k8s.io/bom/pkg/spdx.getImageReferences({0xc0000308c0, 0x67})
	sigs.k8s.io/bom/pkg/spdx/implementation.go:211 +0x25d
sigs.k8s.io/bom/pkg/spdx.(*spdxDefaultImplementation).PullImagesToArchive(0x0?, {0xc0000308c0?, 0x973a03?}, {0xc00835f6a0, 0x19})
	sigs.k8s.io/bom/pkg/spdx/implementation.go:359 +0x4c
sigs.k8s.io/bom/pkg/spdx.(*spdxDefaultImplementation).ImageRefToPackage(0xc0000a2000?, {0xc0000308c0, 0x67}, 0x1e?)
	sigs.k8s.io/bom/pkg/spdx/implementation.go:698 +0x172
sigs.k8s.io/bom/pkg/spdx.(*SPDX).ImageRefToPackage(...)
	sigs.k8s.io/bom/pkg/spdx/spdx.go:253
sigs.k8s.io/bom/pkg/spdx.(*defaultDocBuilderImpl).GenerateDoc(0x0?, 0xd82b00, 0xc00009cfc0)
	sigs.k8s.io/bom/pkg/spdx/builder.go:234 +0xb6a
sigs.k8s.io/bom/pkg/spdx.(*DocBuilder).Generate(0xc0000b9b50?, 0x1?)
	sigs.k8s.io/bom/pkg/spdx/builder.go:96 +0xb5
sigs.k8s.io/bom/cmd/bom/cmd.generateBOM(0xc00009cea0)
	sigs.k8s.io/bom/cmd/bom/cmd/generate.go:341 +0x3db
sigs.k8s.io/bom/cmd/bom/cmd.AddGenerate.func1(0xc000178000?, {0xc000167100?, 0x4?, 0x4?})
	sigs.k8s.io/bom/cmd/bom/cmd/generate.go:146 +0xe8
github.com/spf13/cobra.(*Command).execute(0xc000178000, {0xc0001670c0, 0x4, 0x4})
	github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xd7a3e0)
	github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.6.1/command.go:968
sigs.k8s.io/bom/cmd/bom/cmd.Execute()
	sigs.k8s.io/bom/cmd/bom/cmd/root.go:71 +0x25
main.main()
	./main.go:24 +0x17

Version v0.4.1/bom-linux-amd64

as seen in https://github.com/cilium/cilium/actions/runs/3392808891/jobs/5640821590#step:22:202
cc @sandipanpanda @puerco

@aanm aanm added kind/bug Categorizes issue or PR as related to a bug. sig/release Categorizes an issue or PR as relevant to SIG Release. labels Nov 4, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 2, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 4, 2023
@puerco
Copy link
Member

puerco commented Mar 13, 2023

@aanm I think this was fixed in #225 but let us know if not!

/close

@k8s-ci-robot
Copy link
Contributor

@puerco: Closing this issue.

In response to this:

@aanm I think this was fixed in #225 but let us know if not!

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/release Categorizes an issue or PR as relevant to SIG Release.
Projects
None yet
Development

No branches or pull requests

4 participants