Skip to content

fix: don't write files if secret values unchanged#557

Closed
ThirdEyeSqueegee wants to merge 2 commits intomainfrom
writefile
Closed

fix: don't write files if secret values unchanged#557
ThirdEyeSqueegee wants to merge 2 commits intomainfrom
writefile

Conversation

@ThirdEyeSqueegee
Copy link
Member

Issue #, if available:
N/A

Description of changes:
There is a bug in writeFile which causes it to write secret files unconditionally every poll interval regardless of whether a secret has been rotated/updated. This breaks applications which use file watchers to execute logic when the mounted secret file is modified.

The bug manifests when the rotation reconciler is enabled.

  • Fix the bug: check file content before writing

Validated e2e, no unnecessary rewrites when secret value unchanged:

Screenshot 2026-01-27 at 2 10 22 PM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ThirdEyeSqueegee ThirdEyeSqueegee requested a review from a team as a code owner January 28, 2026 21:44
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.72%. Comparing base (072ee2d) to head (cb8142d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #557      +/-   ##
==========================================
+ Coverage   61.56%   61.72%   +0.15%     
==========================================
  Files          11       11              
  Lines         752      755       +3     
==========================================
+ Hits          463      466       +3     
  Misses        274      274              
  Partials       15       15              

☔ 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.

@ThirdEyeSqueegee ThirdEyeSqueegee deleted the writefile branch January 29, 2026 19:57
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.

1 participant