Skip to content

refactor: big string literals to separate files#3388

Merged
knative-prow[bot] merged 2 commits intoknative:mainfrom
matejvasek:refactor-tasks
Jan 23, 2026
Merged

refactor: big string literals to separate files#3388
knative-prow[bot] merged 2 commits intoknative:mainfrom
matejvasek:refactor-tasks

Conversation

@matejvasek
Copy link
Contributor

@matejvasek matejvasek commented Jan 22, 2026

Changes

  • Added basic tests for the tasks: we validate that the yaml contains valid task.
  • Moved big yaml string literals (tekton tasks) into separate files and then use go:embed on these.
  • Use Go templates instead of fmt.Sprintf().
  • Re-formatted the tekton tasks using yq.

@knative-prow
Copy link

knative-prow bot commented Jan 22, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matejvasek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 22, 2026
@knative-prow knative-prow bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 22, 2026
@matejvasek matejvasek requested review from gauron99, lkingland and twoGiants and removed request for dsimansk and jrangelramos January 22, 2026 17:01
@matejvasek
Copy link
Contributor Author

PTAL @gauron99 @lkingland

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.53%. Comparing base (f8dd264) to head (076c91b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/pipelines/tekton/tasks.go 69.23% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3388      +/-   ##
==========================================
- Coverage   54.74%   54.53%   -0.22%     
==========================================
  Files         173      173              
  Lines       20112    19694     -418     
==========================================
- Hits        11011    10740     -271     
+ Misses       7992     7833     -159     
- Partials     1109     1121      +12     
Flag Coverage Δ
e2e 37.95% <69.23%> (+14.98%) ⬆️
e2e go 33.57% <69.23%> (-1.81%) ⬇️
e2e node 29.29% <69.23%> (-1.88%) ⬇️
e2e python 33.13% <69.23%> (-1.78%) ⬇️
e2e quarkus 29.44% <69.23%> (-1.88%) ⬇️
e2e rust 28.84% <69.23%> (-1.90%) ⬇️
e2e springboot 27.26% <69.23%> (-1.94%) ⬇️
e2e typescript 29.40% <69.23%> (-1.88%) ⬇️
integration 16.62% <69.23%> (-2.03%) ⬇️
unit macos-14 43.29% <69.23%> (-1.39%) ⬇️
unit macos-latest 43.29% <69.23%> (-1.39%) ⬇️
unit ubuntu-24.04-arm 43.62% <69.23%> (-1.20%) ⬇️
unit ubuntu-latest 44.21% <69.23%> (-1.37%) ⬇️
unit windows-latest 43.32% <69.23%> (-1.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
Reformat yamls using "yq -i '.'" so if we need to patch them in future
we can do "semantic" patching using yq and still have nice diff.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
@gauron99
Copy link
Contributor

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jan 23, 2026
@knative-prow knative-prow bot merged commit 58da24e into knative:main Jan 23, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments