Skip to content

add middleware version as image label#3408

Merged
knative-prow[bot] merged 1 commit intoknative:mainfrom
gauron99:push-runkoqysruuy
Jan 30, 2026
Merged

add middleware version as image label#3408
knative-prow[bot] merged 1 commit intoknative:mainfrom
gauron99:push-runkoqysruuy

Conversation

@gauron99
Copy link
Copy Markdown
Contributor

@gauron99 gauron99 commented Jan 30, 2026

Add the middleware-version image label to function images built by S2I and Pack builders to preserve complete the implementation. OCI already implements this (only added unit test since we can inspect the actual blobs/files created)

  • label is only set when non-empty
  1. func build --builder=s2i --push
  2. Docker inspect...
  3. Labels contain: "middleware-version": "v0.21.3",

PS:
some pack tests needed proper directory root because middleware fetch uses actual path detection for those templates (so it needs proper function root)

PSS: the s2i was added prior by Christoph but removed by me in the XXL scaffolding PR. Re-adding it here.

/kind enhancement
/fixes #3406

All function images now include the `middleware-version` label build by standard deployment

@knative-prow knative-prow Bot added the kind/enhancement Feature additions or improvements to existing label Jan 30, 2026
@knative-prow knative-prow Bot added approved 🤖 PR has been approved by an approver from all required OWNERS files. size/L 🤖 PR changes 100-499 lines, ignoring generated files. labels Jan 30, 2026
@gauron99 gauron99 requested review from lkingland and matejvasek and removed request for dsimansk and jrangelramos January 30, 2026 15:17
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.65%. Comparing base (7d24048) to head (542458f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/buildpacks/builder.go 57.14% 2 Missing and 1 partial ⚠️
pkg/s2i/builder.go 62.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3408      +/-   ##
==========================================
+ Coverage   54.61%   54.65%   +0.04%     
==========================================
  Files         173      173              
  Lines       19814    19826      +12     
==========================================
+ Hits        10821    10836      +15     
+ Misses       7861     7857       -4     
- Partials     1132     1133       +1     
Flag Coverage Δ
e2e 39.30% <60.00%> (+0.01%) ⬆️
e2e go 33.43% <60.00%> (+0.01%) ⬆️
e2e node 29.24% <60.00%> (+0.14%) ⬆️
e2e python 32.93% <30.00%> (-0.01%) ⬇️
e2e quarkus 29.39% <60.00%> (+0.16%) ⬆️
e2e rust 28.79% <10.00%> (+0.13%) ⬆️
e2e springboot 27.18% <30.00%> (+0.10%) ⬆️
e2e typescript 29.37% <60.00%> (+0.16%) ⬆️
integration 16.57% <0.00%> (+0.02%) ⬆️
unit macos-14 43.15% <60.00%> (+0.01%) ⬆️
unit macos-latest 43.15% <60.00%> (+0.01%) ⬆️
unit ubuntu-24.04-arm 43.47% <60.00%> (-0.01%) ⬇️
unit ubuntu-latest 44.06% <60.00%> (+0.01%) ⬆️
unit windows-latest 43.17% <60.00%> (+0.01%) ⬆️

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.

@matejvasek
Copy link
Copy Markdown
Contributor

/approve
/lgtm

@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label Jan 30, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Jan 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gauron99, 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:
  • OWNERS [gauron99,matejvasek]

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 merged commit d601180 into knative:main Jan 30, 2026
43 checks passed
@creydr
Copy link
Copy Markdown
Member

creydr commented Feb 2, 2026

@gauron99 can we backport this fix to 1.21?

@gauron99
Copy link
Copy Markdown
Contributor Author

gauron99 commented Feb 2, 2026

/cherry-pick release-1.21

@knative-prow-robot
Copy link
Copy Markdown

@gauron99: new pull request created: #3410

Details

In response to this:

/cherry-pick release-1.21

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. kind/enhancement Feature additions or improvements to existing lgtm 🤖 PR is ready to be merged. size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add middleware-version image label to all builders

4 participants