fix: downgrade decrypt failure log from warn to info#13324
Merged
nic-6443 merged 2 commits intoapache:masterfrom Apr 30, 2026
Merged
fix: downgrade decrypt failure log from warn to info#13324nic-6443 merged 2 commits intoapache:masterfrom
nic-6443 merged 2 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts APISIX plugin configuration encryption/decryption logging to reduce expected log noise during upgrades when encrypt_fields changes, while still highlighting unexpected encryption failures.
Changes:
- Downgrades decrypt failure logs from
warntoinfo. - Appends an upgrade/resolution hint to decrypt failure logs.
- Keeps encrypt failure logs at
warn.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
During upgrades, when new fields are added to encrypt_fields, existing plaintext data in etcd will fail to decrypt. This is a normal and expected scenario, but the warn-level log generates noise that may alarm users. Downgrade the log level from warn to info for decrypt operations and add a hint message suggesting users re-save the configuration via Admin API to encrypt the plaintext values.
fddf305 to
20c200b
Compare
Use 'This can happen' instead of 'This is expected' and add a note about verifying the data_encryption keyring for genuine failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nic-chen
approved these changes
Apr 30, 2026
membphis
approved these changes
Apr 30, 2026
Baoyuantop
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During upgrades, when new fields are added to
encrypt_fields, existing plaintext data in etcd will fail to decrypt. This is a normal and expected scenario — the plaintext value is preserved as-is and still works. However, thewarn-level log generates noise that may alarm users.This change:
warntoinfowarn(those are unexpected)Before:
After: