Skip to content

Revert registerUserKeys back to a synchronous API - #13896

Open
winterhazel wants to merge 3 commits into
apache:mainfrom
winterhazel:registeruserkeys-regression
Open

Revert registerUserKeys back to a synchronous API#13896
winterhazel wants to merge 3 commits into
apache:mainfrom
winterhazel:registeruserkeys-regression

Conversation

@winterhazel

Copy link
Copy Markdown
Member

Description

#9504 made the registerUserKeys API asynchronous without a valid reason. This PR reverts it to a synchronous API, in order to avoid changing how it is consumed.

Additionally, the deleteUserKeys API, introduced in #9504, was also made synchronous, as there's no reason for it being asynchronous.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  • I registered a few API key pairs via the UI, and verified that it still works.
  • I deleted a few API key pairs via the UI, and verified that it also still works.

@winterhazel

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.65%. Comparing base (dbee809) to head (faabcc0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...tack/api/command/admin/user/DeleteUserKeysCmd.java 0.00% 1 Missing ⚠️
...ck/api/command/admin/user/RegisterUserKeysCmd.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #13896   +/-   ##
=========================================
  Coverage     19.64%   19.65%           
- Complexity    19784    19792    +8     
=========================================
  Files          6368     6368           
  Lines        574889   574859   -30     
  Branches      70353    70350    -3     
=========================================
+ Hits         112935   112976   +41     
+ Misses       449684   449610   -74     
- Partials      12270    12273    +3     
Flag Coverage Δ
uitests 3.41% <ø> (+<0.01%) ⬆️
unittests 20.92% <0.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18874

@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@bernardodemarco
could you please review and test it ? thanks

@bernardodemarco

Copy link
Copy Markdown
Member

@bernardodemarco
could you please review and test it ? thanks

@weizhouapache, sure!!!

@bernardodemarco

Copy link
Copy Markdown
Member

@winterhazel, could you also remove this ending period from the following label, please?

"label.action.bulk.delete.api.keys": "Apagar em massa as chaves de acesso \u00e0 API.",

image

@winterhazel

Copy link
Copy Markdown
Member Author

@winterhazel, could you also remove this ending period from the following label, please?

"label.action.bulk.delete.api.keys": "Apagar em massa as chaves de acesso \u00e0 API.",

image

@bernardodemarco ok. I'll also remove some API keypair-related UI labels that are not used anymore due to the latest changes.

@winterhazel

Copy link
Copy Markdown
Member Author

Last commit only included label changes. We can merge this one after the smoke tests in #13896 (comment) and a build success.

@bernardodemarco bernardodemarco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, tested the registerUserKeys and deleteUserKeys commands from both the CLI and UI

}).catch(error => {
eventBus.emit('update-resource-state', { selectedItems: this.selectedItems, resource: keypair.id, state: 'failed' })
}
this.$notifyError(error)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@winterhazel, should we return the plain error here? Or should we return a more generic message, similar to the error handling performed for the registerUserKeys command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants