Skip to content

Supporting changes for envbuilder#234 #16

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

Merged
merged 3 commits into from
Jun 24, 2024
Merged

Supporting changes for envbuilder#234 #16

merged 3 commits into from
Jun 24, 2024

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Jun 23, 2024

Part of coder/envbuilder#234

  • Adds workaround for CreateFile that would previously fail with ETXTBSY when copying running binary to image
  • Add AllowedPaths to IgnoreListEntry to allow selectively copying ignored paths

@johnstcn johnstcn self-assigned this Jun 23, 2024
johnstcn added a commit to coder/envbuilder that referenced this pull request Jun 23, 2024
@johnstcn johnstcn requested a review from mtojek June 24, 2024 08:46
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Nice hacking 👍

}

var defaultIgnoreList = []IgnoreListEntry{
{
Path: filepath.Clean(config.KanikoDir),
PrefixMatchOnly: false,
AllowedPaths: make(map[string]struct{}),
Copy link
Member

Choose a reason for hiding this comment

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

nit: I would wrap IgnoreListEntry{} with NewIgnoreListEntry/CreateIgnoreListEntry, and set AllowedPaths there.

Copy link
Member Author

@johnstcn johnstcn Jun 24, 2024

Choose a reason for hiding this comment

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

It might actually be simpler to just use a []string instead; I don't anticipate having more than 10 entries here ever. Assigning to a nil map panics, while appending to / ranging over a nil slice is fine.

@johnstcn johnstcn merged commit dc26a92 into main Jun 24, 2024
9 checks passed
@mafredri mafredri deleted the cj/embed-binary branch September 25, 2024 12:35
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.

2 participants