Skip to content

Conversation

@sureshanaparti
Copy link
Contributor

@sureshanaparti sureshanaparti commented Jul 30, 2025

Description

This PR updates UI to use GET request method for list API calls.

Earlier some API calls (in generic methods) from UI are using POST request method for the list calls, added here: #10899. This PR updates these call to use the GET request method.

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)
  • build/CI
  • test (unit or integration test code)

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?

Verified the request method (in browser's inspect window) of some list API calls from the CloudStack UI.

How did you try to break this feature and the system with this change?

@sureshanaparti
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11354 (QA-JID-707)

} from '@/store/mutation-types'

const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
const addlGetAPICommandsList = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const addlGetAPICommandsList = [
const addGetAPICommandsList = [

Copy link
Contributor Author

@sureshanaparti sureshanaparti Jul 30, 2025

Choose a reason for hiding this comment

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

sry, it's for additional get api list, will update to otherGetAPICommandsList, fine @nvazquez ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh sure @sureshanaparti, I thought it was a typo 👍🏼

Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe also: additionalGetAPICommandsList

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

@sureshanaparti could you please explain how did we get this list of additional APIs?

Copy link
Contributor Author

@sureshanaparti sureshanaparti Jul 30, 2025

Choose a reason for hiding this comment

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

@Pearl1594 all these additional APIs are the read calls from DB or the configuration (added regex for regular list/get cmds, these doesn't match with regular list, so, added them as additional). I've checked the execute() calls of these API cmds while working on this - #10899.

@codecov
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.17%. Comparing base (7124922) to head (6808cc3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##              main   #11354       +/-   ##
============================================
+ Coverage     3.76%   17.17%   +13.41%     
- Complexity       0    15007    +15007     
============================================
  Files          436     5869     +5433     
  Lines        35575   521737   +486162     
  Branches      6455    63511    +57056     
============================================
+ Hits          1338    89609    +88271     
- Misses       34077   422071   +387994     
- Partials       160    10057     +9897     
Flag Coverage Δ
uitests 3.77% <ø> (+0.01%) ⬆️
unittests 18.15% <ø> (?)

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

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

@sureshanaparti
Copy link
Contributor Author

@blueorangutan ui

@Pearl1594
Copy link
Contributor

code lgtm - just have a query regarding the list of additional APIs.

@sureshanaparti
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11354 (QA-JID-709)

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

LGTM

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@sureshanaparti sureshanaparti force-pushed the ui-get-request-method-for-list-calls branch from 790baa1 to d4f2bbd Compare July 31, 2025 04:37
@blueorangutan
Copy link

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

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM, Tested manually by checking the deploy vm form

Before fix, the api calls like list hosts, list service offerings list disk offerings were POST

Screenshot 2025-07-31 at 2 50 30 PM Screenshot 2025-07-31 at 2 50 23 PM Screenshot 2025-07-31 at 2 50 12 PM

After fix , the api calls are GET

Screenshot 2025-07-31 at 2 53 02 PM Screenshot 2025-07-31 at 2 52 54 PM Screenshot 2025-07-31 at 2 52 28 PM

@sureshanaparti sureshanaparti merged commit f58372e into apache:main Jul 31, 2025
23 of 26 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.21.0 Jul 31, 2025
@DaanHoogland DaanHoogland deleted the ui-get-request-method-for-list-calls branch July 31, 2025 10:04
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 6, 2025
* [UI] Use GET request method for list API calls

* Updated UI unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants