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

feat: injector config loader API #391

Merged
merged 11 commits into from
Nov 18, 2024

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Nov 12, 2024

Adds a new internal/injector/config package that provides features to load injector configuration, and also to inspect whether packages contain such configuration (so it can be used to implement orchestrion pin's -prune and -validate features.

@RomainMuller RomainMuller requested a review from a team as a code owner November 12, 2024 17:46
@RomainMuller RomainMuller self-assigned this Nov 12, 2024
instrument/orchestrion.yml Outdated Show resolved Hide resolved
internal/injector/builtin/generated_deps.go Outdated Show resolved Hide resolved
internal/injector/builtin/all.yml Show resolved Hide resolved
internal/injector/builtin/orchestrion.yml Show resolved Hide resolved
internal/injector/config/schema.json Outdated Show resolved Hide resolved
internal/injector/config/config-go.go Show resolved Hide resolved
internal/injector/config/config-yml.go Show resolved Hide resolved
internal/injector/config/config-yml.go Outdated Show resolved Hide resolved
internal/jobserver/buildid/version.go Outdated Show resolved Hide resolved
internal/injector/config/config-go.go Outdated Show resolved Hide resolved
@RomainMuller RomainMuller added this pull request to the merge queue Nov 18, 2024
Merged via the queue into main with commit 9cae407 Nov 18, 2024
25 checks passed
@RomainMuller RomainMuller deleted the romain.marcadier/APPSEC-55160/config-loader branch November 18, 2024 14:33
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 56.04027% with 131 lines in your changes missing coverage. Please review.

Project coverage is 60.47%. Comparing base (e6d1010) to head (a4a7af4).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
internal/injector/config/config-yml.go 45.36% 42 Missing and 11 partials ⚠️
internal/injector/config/config-go.go 56.47% 31 Missing and 6 partials ⚠️
internal/pin/pin.go 59.57% 17 Missing and 2 partials ⚠️
internal/injector/config/config.go 69.44% 9 Missing and 2 partials ⚠️
internal/injector/config/validate.go 61.11% 4 Missing and 3 partials ⚠️
internal/injector/builtin/generator/main.go 63.63% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
- Coverage   60.86%   60.47%   -0.40%     
==========================================
  Files         175      179       +4     
  Lines       12343    12593     +250     
==========================================
+ Hits         7513     7615     +102     
- Misses       4349     4481     +132     
- Partials      481      497      +16     
Components Coverage Δ
Generators 76.72% <63.63%> (-0.19%) ⬇️
Instruments 88.05% <ø> (ø)
Go Driver 73.94% <ø> (ø)
Toolexec Driver 70.66% <ø> (ø)
Aspects 71.88% <100.00%> (+0.03%) ⬆️
Injector 72.21% <55.02%> (-1.53%) ⬇️
Job Server 64.58% <ø> (+0.56%) ⬆️
Integration Test Suite 54.24% <ø> (ø)
Other 60.47% <56.04%> (-0.40%) ⬇️
Files with missing lines Coverage Δ
internal/cmd/pin.go 100.00% <100.00%> (ø)
internal/injector/aspect/aspect.go 52.45% <100.00%> (+1.61%) ⬆️
internal/pin/auto.go 69.35% <100.00%> (ø)
internal/injector/builtin/generator/main.go 73.78% <63.63%> (-0.73%) ⬇️
internal/injector/config/validate.go 61.11% <61.11%> (ø)
internal/injector/config/config.go 69.44% <69.44%> (ø)
internal/pin/pin.go 47.71% <59.57%> (-10.16%) ⬇️
internal/injector/config/config-go.go 56.47% <56.47%> (ø)
internal/injector/config/config-yml.go 45.36% <45.36%> (ø)

... and 3 files with indirect coverage changes

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