Skip to content

Remove noop from change key provider #283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

AndersAstrand
Copy link
Collaborator

GetKeyProviderByName() will not be able to find a match if the name it's supposed to search for is longer than allowed.

GetKeyProviderByName() will not be able to find a match if the name it's
supposed to search for is longer than allowed.
@AndersAstrand AndersAstrand force-pushed the tde/remove-noop-from-change-key-provider branch from d26ae0f to 8cbfc11 Compare April 29, 2025 11:59
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.95%. Comparing base (0ac9bc0) to head (8cbfc11).
Report is 2 commits behind head on TDE_REL_17_STABLE.

❌ Your project status has failed because the head coverage (78.95%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           TDE_REL_17_STABLE     #283      +/-   ##
=====================================================
+ Coverage              78.93%   78.95%   +0.01%     
=====================================================
  Files                     22       22              
  Lines                   2464     2461       -3     
  Branches                 385      384       -1     
=====================================================
- Hits                    1945     1943       -2     
+ Misses                   444      443       -1     
  Partials                  75       75              
Components Coverage Δ
access 81.54% <ø> (ø)
catalog 86.39% <100.00%> (+0.06%) ⬆️
common 92.50% <ø> (ø)
encryption 71.90% <ø> (ø)
keyring 72.07% <ø> (ø)
src 55.73% <ø> (ø)
smgr 98.01% <ø> (ø)
transam ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -235,7 +228,7 @@ pg_tde_change_key_provider_internal(PG_FUNCTION_ARGS, Oid dbOid)
/* Struct will be saved to disk so keep clean */
memset(&provider, 0, sizeof(provider));
provider.provider_id = keyring->keyring_id;
memcpy(provider.provider_name, provider_name, nlen);
memcpy(provider.provider_name, provider_name, strlen(provider_name));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we instead copy from keyring.provider_name to make the intent clearer plus not change the case just because we change the values?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes we should. but changing that behavior is out of scope for this PR. I intended to do that separately as well, but with a test for it included. Just didn't have time before the standup.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This PR was mostly to protect #267 from questions about why an unrelated error message wasn't updated 😆 .

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would have done it as part of this PR if I were you but this is an improvment either way.

@AndersAstrand AndersAstrand merged commit 1b2512a into percona:TDE_REL_17_STABLE Apr 29, 2025
15 checks passed
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.

3 participants