Skip to content

0.17 backport source filters - #1208

Draft
cpuguy83 wants to merge 4 commits into
project-dalec:release/0.17from
cpuguy83:0.17_backport_source_filters
Draft

0.17 backport source filters#1208
cpuguy83 wants to merge 4 commits into
project-dalec:release/0.17from
cpuguy83:0.17_backport_source_filters

Conversation

@cpuguy83

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #

Special notes for your reviewer:

Add a source-options context that can provide a YAML source filter
config at build time. The config currently supports global_excludes
which can be used to filter out paths from all sources.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 3713d39)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit ff5f3f6)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Faithful backport of c3dc024, which couldn't be directly cherry-picked
due to file conflicts.

(cherry picked from commit c3dc024)

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 9f620a3)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This is required per rulesets.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 9a577dd)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 6cf868c)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit b556dec)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Backports configurable build-time source filtering across Dalec source loading, generators, and RPM packaging.

Changes:

  • Loads global exclusion patterns from a build context.
  • Applies filters to regular and generated sources with tests and documentation.
  • Updates RPM, strip-test, and CI behavior.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
source_filter.go Implements source-filter configuration and LLB filtering.
source.go Integrates filters and modifies patch handling.
source_inline.go Prefixes inline-source filter paths.
generator_gomod.go Filters generated Go modules.
generator_cargohome.go Filters generated Cargo dependencies.
generator_pip.go Filters generated Pip dependencies.
generator_nodemodules.go Filters generated Node dependencies.
frontend/request.go Loads and decodes filter configuration.
frontend/gateway.go Lazily attaches filters to source options.
load.go Recognizes filter build arguments.
packaging/linux/rpm/buildroot.go Propagates filters into RPM specs.
packaging/linux/rpm/template.go Documents filters and Pip sources.
packaging/linux/rpm/template_test.go Tests RPM source output.
spec_test.go Tests filter configuration decoding.
source_test.go Tests filter-generated LLB operations.
test/source_test.go Adds end-to-end source-filter tests.
test/linux_target_test.go Revises strip tests.
test/target_almalinux_test.go Enables AlmaLinux strip testing.
test/target_rockylinux_test.go Enables Rocky Linux strip testing.
website/docs/sources.md Documents source-filter configuration.
.github/workflows/codeql.yml Extends CodeQL to release branches.
.github/workflows/ci.yml Adjusts workflow exclusions and example builds.

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread source.go
sourceState = worker.Run(
llb.AddMount("/patch", patchState, llb.Readonly, llb.SourcePath(patchPath)),
llb.Dir(filepath.Join("src", subPath)),
llb.Dir("src"),
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