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(pipeline)!: add warnings to pipelines that use legacy YAML lib or have dupl anchors in map #1232

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

ecrupper
Copy link
Contributor

Added warnings field to pipelines that will aggregate non-breaking but call-out worthy YAML transgressions.

@ecrupper ecrupper requested a review from a team as a code owner December 31, 2024 03:00
@@ -391,9 +391,9 @@
}

//nolint:lll // ignore long line length due to input arguments
func (c *client) mergeTemplate(bytes []byte, tmpl *yaml.Template, step *yaml.Step) (*yaml.Build, error) {
func (c *client) mergeTemplate(bytes []byte, tmpl *yaml.Template, step *yaml.Step) (*yaml.Build, []string, error) {
switch tmpl.Format {
case constants.PipelineTypeGo, "golang", "":

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string golang has 3 occurrences, make it a constant (goconst)

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 68.84058% with 43 lines in your changes missing coverage. Please review.

Project coverage is 56.66%. Comparing base (90cd347) to head (5bab7ad).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
compiler/template/starlark/render.go 40.00% 24 Missing ⚠️
internal/yaml.go 64.70% 6 Missing ⚠️
compiler/native/parse.go 82.60% 4 Missing ⚠️
compiler/template/native/render.go 86.36% 3 Missing ⚠️
database/types/pipeline.go 66.66% 2 Missing and 1 partial ⚠️
compiler/native/expand.go 66.66% 2 Missing ⚠️
api/pipeline/template.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1232      +/-   ##
==========================================
+ Coverage   56.61%   56.66%   +0.04%     
==========================================
  Files         626      626              
  Lines       35495    35541      +46     
==========================================
+ Hits        20096    20139      +43     
- Misses      14720    14722       +2     
- Partials      679      680       +1     
Files with missing lines Coverage Δ
api/types/pipeline.go 100.00% <100.00%> (ø)
compiler/native/compile.go 69.35% <100.00%> (+0.14%) ⬆️
database/pipeline/table.go 100.00% <ø> (ø)
database/testutils/api_resources.go 94.87% <100.00%> (+0.01%) ⬆️
mock/server/pipeline.go 0.00% <ø> (ø)
api/pipeline/template.go 0.00% <0.00%> (ø)
compiler/native/expand.go 67.68% <66.66%> (ø)
compiler/template/native/render.go 88.00% <86.36%> (+1.43%) ⬆️
database/types/pipeline.go 92.56% <66.66%> (-2.09%) ⬇️
compiler/native/parse.go 85.12% <82.60%> (+0.12%) ⬆️
... and 2 more

database/types/pipeline.go Outdated Show resolved Hide resolved
Copy link
Contributor

@plyr4 plyr4 left a comment

Choose a reason for hiding this comment

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

awesome!

@wass3rw3rk wass3rw3rk merged commit 4c9e836 into main Jan 6, 2025
13 of 16 checks passed
@wass3rw3rk wass3rw3rk deleted the feat/pipeline-warnings branch January 6, 2025 17:59
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.

3 participants