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

DNM: WIP dagger integration. #905

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

dlorenc
Copy link
Contributor

@dlorenc dlorenc commented Dec 26, 2023

Melange Pull Request Template

Functional Changes

  • This change can build all of Wolfi without errors (describe results in notes)

Notes:

SCA Changes

  • Examining several representative APKs show no regression / the desired effect (details in notes)

Notes:

Linter

  • The new check is clean across Wolfi
  • The new check is opt-in or a warning

Notes:

Signed-off-by: Dan Lorenc <dlorenc@chainguard.dev>
@dlorenc dlorenc marked this pull request as draft December 26, 2023 14:18
return err
}

// TestUsability determines if the Bubblewrap runner can be used
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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")
Copy link
Member

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.

Copy link
Contributor Author

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 {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants