Skip to content
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

feat(zones): Migrate zones to APIv3 MAASENG-3405 #5580

Conversation

abuyukyi101198
Copy link
Contributor

@abuyukyi101198 abuyukyi101198 commented Jan 16, 2025

Done

  • Added @tanstack/react-query plugin
  • Generated types, sdk, react-query files in @app/apiclient
  • Implemented react-query methods for Zones with generated types
  • Replaced v2 Zone calls with v3

QA steps

  • Verify the AZs table correclty displays the AZ records*
  • Ensure the 'Add AZ' form successfully adds a new AZ, and immediately refreshes the table to show the new row
  • Verify the AZ details are displayed correclty when an AZ is 'Name' is clicked
  • Ensure the 'Edit' form successfully updates the AZ, the detail page immediately refreshes to display the changes, and when navigated to the AZs view, the update is displayed properly
  • Ensure the 'Delete AZ' button successfully removes the AZ, and immediately navigates to the AZs view, with the deleted AZ's row now removed

Fixes

Resolves:

MAASENG-4264
MAASENG-4261
MAASENG-3408
MAASENG-4262
MAASENG-4263

Notes

*Some columns will not have data because the backend models currently lack the corresponding fields.

Additionally, the existing tests assume Redux stores for data fetching, however, since v3 now uses React Query instead of stores, the tests use actual fetching for zones. Since Zones have missing fields as mentioned, and are not mocked as expected, the tests fail. Migrating the tests to v3 by mocking queries after necessary fields are added to the Zones API should resolve the issue.

@webteam-app
Copy link

abuyukyi101198 is not a collaborator of the repo

@abuyukyi101198 abuyukyi101198 changed the title feat(api): Migrate zones to APIv3 MAASENG-3405 feat(zones): Migrate zones to APIv3 MAASENG-3405 Jan 16, 2025
…Response type, added missing fields to the type locally (will be overwritten once regenerated)
@abuyukyi101198 abuyukyi101198 deleted the feat-migrate-zones-to-apiv3-MAASENG-3405 branch January 29, 2025 07:24
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.

2 participants