Skip to content

CLDSRV-1084: Name the KMS in the logs of failed KMS requests - #6390

Open
dvasilas wants to merge 1 commit into
development/9.6from
improvement/CLDSRV-1084-name-kms-in-failure-logs
Open

dvasilas wants to merge 1 commit into
development/9.6from
improvement/CLDSRV-1084-name-kms-in-failure-logs

Conversation

@dvasilas

Copy link
Copy Markdown
Contributor

When a KMS request fails, show the KMS provider name and the key ARN in cloudserver logs, so support can identify which KMS and key failed.

@bert-e

bert-e commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Hello dvasilas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.05263% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.79%. Comparing base (c89adac) to head (6580c8b).
⚠️ Report is 14 commits behind head on development/9.6.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/kms/wrapper.js 71.05% 11 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/kms/wrapper.js 89.67% <71.05%> (-0.78%) ⬇️

... and 2 files with indirect coverage changes

@@                 Coverage Diff                 @@
##           development/9.6    #6390      +/-   ##
===================================================
- Coverage            90.86%   90.79%   -0.07%     
===================================================
  Files                  208      208              
  Lines                39275    39309      +34     
===================================================
+ Hits                 35686    35691       +5     
- Misses                3589     3618      +29     
Flag Coverage Δ
checksums-disabled-tests 46.27% <26.31%> (-0.02%) ⬇️
file-ft-tests 75.73% <26.31%> (-0.05%) ⬇️
file-ft-tests-null-compat 76.21% <26.31%> (-0.07%) ⬇️
kmip-ft-tests 43.91% <26.31%> (-0.02%) ⬇️
mongo-v0-ft-tests 76.77% <26.31%> (-0.12%) ⬇️
mongo-v1-ft-tests 76.80% <26.31%> (-0.02%) ⬇️
multiple-backend 44.49% <26.31%> (-0.02%) ⬇️
s3c-ft-tests-v0 71.59% <26.31%> (-0.04%) ⬇️
s3c-ft-tests-v0-null-compat 71.65% <26.31%> (-0.04%) ⬇️
s3c-ft-tests-v1 71.57% <26.31%> (-0.08%) ⬇️
sur-tests 45.02% <26.31%> (-0.02%) ⬇️
sur-tests-inflights 48.38% <26.31%> (-0.02%) ⬇️
unit 80.81% <71.05%> (-0.01%) ⬇️
utapi-v2-tests 45.19% <26.31%> (-0.02%) ⬇️

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread lib/kms/wrapper.js Outdated
* @param {string} [keyId] - KeyId the request used, from getClientForKey
* @returns {object} `{ provider, keyArn }`, without `keyArn` if no key was used or the KMS is internal
*/
function kmsFailureFields(kmsClient, keyId) {

@jonathan-gramain jonathan-gramain Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't we log the same info in regular logs, not just failure logs? I mean I would rather name the function kmsLogFields (or kmsCommonLogFields to imply there can be more fields logged on a case-by-case basis), sounds more natural to me for its purpose.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to kmsLogFields.

Key creation and deletion failures are now logged at error level, like data key failures.
@dvasilas
dvasilas force-pushed the improvement/CLDSRV-1084-name-kms-in-failure-logs branch from 14c8cef to 6580c8b Compare November 23, 2026 08:28

This branch has not been deployed

No deployments
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.

4 participants