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

dockerfile: additional expansions #1241

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hdonnay
Copy link
Member

@hdonnay hdonnay commented Feb 7, 2024

Saw some errors on quayio's instance related to variable expansions.
Checking the buildkit dockerfile frontend, it supports the whole compliment of POSIX expansions and bash-style replace (${var/pat/word/}).

This PR implements all the POSIX expansions and reports a dedicated error for the slash pattern replacement.


  • Check changes after finding an exemplar problematic Dockerfile

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 56.30%. Comparing base (e8f9aff) to head (29d187a).

Files Patch % Lines
rhel/dockerfile/vars.go 85.10% 19 Missing and 2 partials ⚠️
rhel/dockerfile/dockerfile.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1241      +/-   ##
==========================================
+ Coverage   55.76%   56.30%   +0.53%     
==========================================
  Files         265      265              
  Lines       16562    16675     +113     
==========================================
+ Hits         9236     9389     +153     
+ Misses       6365     6323      -42     
- Partials      961      963       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hdonnay
Copy link
Member Author

hdonnay commented Feb 8, 2024

I've run this through the fuzzer for a while, with no crashers being reported.

fuzz: elapsed: 30m1s, execs: 121110401 (0/sec), new interesting: 51 (total: 388)

This makes things much simpler, IMO.

Signed-off-by: Hank Donnay <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant