Apply source filters without requiring build args - #1182
Open
cpuguy83 wants to merge 3 commits into
Open
Conversation
✅ Deploy Preview for dalec ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This is much simpler when all you want to do is read the content of some file. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
cpuguy83
force-pushed
the
relax_exclude_args
branch
from
August 5, 2026 23:10
2d0722c to
d96d778
Compare
The way we detect if the global filter should be loaded now is just by checking if the context exists. The args are used purely for override (similar to how dockerfile handles such things). Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This didn't need to be exported. We also ended up with some accidental duplication, so cleaned this up. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
cpuguy83
force-pushed
the
relax_exclude_args
branch
from
August 5, 2026 23:15
d96d778 to
674f493
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The build-time source filter previously only loaded if
DALEC_SOURCE_FILTER_CONFIG_PATHwas set, so a build context carrying a filterconfig was silently ignored unless every caller also passed the arg.
Presence of the
dalec-source-optionsbuild context is now what enablesfiltering, and the config is read from
source-filter.ymlin it. The two buildargs become overrides for the path and context name, the way dockerfile handles
similar knobs. Setting either arg without supplying the context is an error,
since the build clearly expected one.
Supporting changes:
bkfsimplementsfs.ReadFileFS, which is all the filter config load needsand avoids the open/stat/read dance.
parallel code paths for the same operation; collapsed into one.