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

Comment thread ui/src/components/view/ApiKeyPairsTab.vue
@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-16759)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 100559 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13896-t16759-kvm-ol8.zip
Smoke tests completed. 140 look OK, 16 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_04_dhcp_dns_userdata Error 7.46 test_network_extension_namespace.py
test_05_isolated_network_full_lifecycle Error 8.79 test_network_extension_namespace.py
test_06_vpc_multi_tier_and_restart Error 7.53 test_network_extension_namespace.py
test_07_vpc_network_acl Error 7.38 test_network_extension_namespace.py
test_08_custom_action_policy_based_routing Error 7.57 test_network_extension_namespace.py
test_09_vpc_source_nat_ip_update Error 7.31 test_network_extension_namespace.py
test_10_vpc_custom_action_policy_based_routing Error 7.45 test_network_extension_namespace.py
test_11_ipv6_dualstack_isolated_network Error 8.97 test_network_extension_namespace.py
test_CRUD_operations_userdata Error 1522.07 test_register_userdata.py
test_deploy_vm_with_registered_userdata Error 6.45 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_allow Error 6.61 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_append Error 6.67 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_deny Error 6.47 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_params Error 6.44 test_register_userdata.py
test_link_and_unlink_userdata_to_template Error 7.06 test_register_userdata.py
test_user_userdata_crud Error 9.42 test_register_userdata.py
ContextSuite context=TestResetVmOnReboot>:setup Error 0.00 test_reset_vm_on_reboot.py
ContextSuite context=TestRAMCPUResourceAccounting>:setup Error 0.00 test_resource_accounting.py
test_03_register_template Error 1.13 test_resource_names.py
ContextSuite context=TestRestoreVM>:setup Error 0.00 test_restore_vm.py
ContextSuite context=TestRouterDHCPHosts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDHCPOpts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDns>:setup Error 0.00 test_router_dns.py
ContextSuite context=TestRouterDnsService>:setup Error 0.00 test_router_dnsservice.py
ContextSuite context=TestRouterIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
ContextSuite context=TestVPCIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
ContextSuite context=TestIsolatedNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRedundantIsolateNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRouterServices>:setup Error 0.00 test_routers.py
ContextSuite context=TestCpuCapServiceOfferings>:setup Error 0.00 test_service_offerings.py
ContextSuite context=TestServiceOfferings>:setup Error 0.39 test_service_offerings.py
ContextSuite context=TestSetSourceNatIp>:setup Error 0.00 test_set_sourcenat.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
ContextSuite context=TestSnapshotStandaloneBackup>:setup Error 0.00 test_snapshots.py
ContextSuite context=TestSslOffloading>:setup Error 0.00 test_ssl_offloading.py

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