Skip to content
Merged
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
2 changes: 1 addition & 1 deletion pkg/runtime/depot.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (d *depot) Track(artifact *buildplan.Artifact, deploy *deployment) error {
d.config.Cache[id].LastAccessTime = time.Now().Unix()

// For dynamically imported artifacts, also include artifact metadata.
if artifact != nil {
if len(artifact.Ingredients) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if len(artifact.Ingredients) > 0 {
if artifact != nil && len(artifact.Ingredients) > 0 {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nil check still seems important.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not anymore. All calls to this function now pass non-nil artifacts.

d.config.Cache[id].Namespace = artifact.Ingredients[0].Namespace
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The panic was here for camel ingredients that apparently have no ingredients.

d.config.Cache[id].Name = artifact.Name()
d.config.Cache[id].Version = artifact.Version()
Expand Down
Loading