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

fix(compiler): validate yaml.Build post-expansion and fully validate step image #1036

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

ecrupper
Copy link
Contributor

Closes go-vela/community#899

I think the real error in the issue is the fact that the pipeline passes validation more so than the repo counter not being updated. By not immediately validating the pipeline after unmarshaling, and rather waiting for the final expansion to validate, we don't need to specify && len(step.Template.Name) == 0 .

This should result in an audit error rather than a build error — thus, no build.

@ecrupper ecrupper requested a review from a team as a code owner January 11, 2024 19:56
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (78eca51) 67.04% compared to head (99b65f8) 67.03%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1036      +/-   ##
==========================================
- Coverage   67.04%   67.03%   -0.01%     
==========================================
  Files         330      330              
  Lines       14092    14088       -4     
==========================================
- Hits         9448     9444       -4     
  Misses       4165     4165              
  Partials      479      479              
Files Coverage Δ
compiler/native/compile.go 67.56% <ø> (-0.35%) ⬇️
compiler/native/validate.go 96.42% <100.00%> (ø)

@ecrupper ecrupper merged commit 45f5ad3 into main Jan 12, 2024
10 of 12 checks passed
@ecrupper ecrupper deleted the fix/compiler/validate-post-expansion branch January 12, 2024 21:17
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.

fix: update repo counter with missing template
3 participants