-
Notifications
You must be signed in to change notification settings - Fork 97
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
DNM: WIP dagger integration. #905
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Dan Lorenc <dlorenc@chainguard.dev>
return err | ||
} | ||
|
||
// TestUsability determines if the Bubblewrap runner can be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bubblewrap?
} | ||
|
||
// TerminatePod terminates a pod if necessary. Not implemented | ||
// for Bubblewrap runners. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bubblewrap again
return nil, nil | ||
} | ||
|
||
// WorkspaceTar implements Runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong method name
return "", err | ||
} | ||
|
||
ref, err := name.ParseReference("melange:latest") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could see having a fixed name here creating races in the load/run phase when performing multiple builds locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is just at throwaway name but could be wrong.
} | ||
|
||
tarPath := filepath.Join(d.tmpDir, imageTarName) | ||
if err := tarball.WriteToFile(tarPath, ref, img); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be really inefficient. I need to look to see if dagger exposes a better interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I know. I think the only better option is to round trip through a registry. I looked and couldn't find much else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OR change the entire setup so dagger also invokes apko for us.
// TestUsability determines if the Bubblewrap runner can be used | ||
// as a container runner. | ||
func (d *daggerRunner) TestUsability(ctx context.Context) bool { | ||
return true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the sdk exposes a simple health check somewhere we could leverage here
Melange Pull Request Template
Functional Changes
Notes:
SCA Changes
Notes:
Linter
Notes: