Skip to content

fix: compare labels and annotations in EnsureSecretExist#3191

Merged
knative-prow[bot] merged 1 commit intoknative:mainfrom
intojhanurag:fix/secret-labels-annotations-comparison
Nov 25, 2025
Merged

fix: compare labels and annotations in EnsureSecretExist#3191
knative-prow[bot] merged 1 commit intoknative:mainfrom
intojhanurag:fix/secret-labels-annotations-comparison

Conversation

@intojhanurag
Copy link
Copy Markdown
Member

Previously, EnsureSecretExist only compared Secret.Data when deciding
whether to create or update a Kubernetes Secret. This caused updates
to be skipped if only labels or annotations changed, which could
break Knative function deployments relying on metadata.

Changes:

  • Compares Labels and Annotations using DeepEqual
  • Normalizes nil maps to empty maps to avoid spurious updates
  • Keeps Data comparison using DeepDerivative (existing behavior)

@knative-prow knative-prow Bot added size/M 🤖 PR changes 30-99 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels Nov 16, 2025
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Nov 16, 2025

Hi @intojhanurag. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 16, 2025

Codecov Report

❌ Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.75%. Comparing base (b039190) to head (be20318).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
pkg/k8s/secrets.go 0.00% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3191      +/-   ##
==========================================
- Coverage   51.81%   51.75%   -0.06%     
==========================================
  Files         162      162              
  Lines       19131    19156      +25     
==========================================
+ Hits         9912     9915       +3     
- Misses       8241     8264      +23     
+ Partials      978      977       -1     
Flag Coverage Δ
integration 17.88% <0.00%> (-0.01%) ⬇️
unit macos-14 44.31% <0.00%> (-0.06%) ⬇️
unit macos-latest 44.31% <0.00%> (-0.06%) ⬇️
unit ubuntu-24.04-arm 44.51% <0.00%> (-0.06%) ⬇️
unit ubuntu-latest 45.24% <0.00%> (-0.08%) ⬇️
unit windows-latest 44.34% <0.00%> (-0.06%) ⬇️

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.

@intojhanurag
Copy link
Copy Markdown
Member Author

Hey @gauron99 , Please can you review this PR , If you have a moment. I got confuse that tests are failing in general or it is my issue ? becaues in that period I opened so many PRs and tests are failing in all PRs.

@lkingland
Copy link
Copy Markdown
Member

lkingland commented Nov 21, 2025

Thanks for the PR @intojhanurag

If this rerun of tests doesn't work, you can rebase main to get improved E2E tests.

/retest

@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label Nov 21, 2025
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Nov 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: intojhanurag, lkingland

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 🤖 PR has been approved by an approver from all required OWNERS files. label Nov 21, 2025
@lkingland lkingland added ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test 🤖 Needs an org member to approve testing labels Nov 21, 2025
@intojhanurag intojhanurag force-pushed the fix/secret-labels-annotations-comparison branch from cc37630 to be20318 Compare November 21, 2025 07:36
@knative-prow knative-prow Bot removed the lgtm 🤖 PR is ready to be merged. label Nov 21, 2025
@intojhanurag
Copy link
Copy Markdown
Member Author

Hey @gauron99 , pls this one also. last one :)

@gauron99
Copy link
Copy Markdown
Contributor

/lgtm

@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label Nov 25, 2025
@knative-prow knative-prow Bot merged commit 429d3dc into knative:main Nov 25, 2025
42 checks passed
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. lgtm 🤖 PR is ready to be merged. ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. size/M 🤖 PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants