Skip to content

PMM-15051 Wait for settings endpoint to be ready after public address update#5366

Merged
matejkubinec merged 7 commits into
v3from
PMM-15051-pmm-address-update
May 22, 2026
Merged

PMM-15051 Wait for settings endpoint to be ready after public address update#5366
matejkubinec merged 7 commits into
v3from
PMM-15051-pmm-address-update

Conversation

@matejkubinec
Copy link
Copy Markdown
Contributor

@matejkubinec matejkubinec commented May 14, 2026

@matejkubinec matejkubinec marked this pull request as ready for review May 14, 2026 17:18
@matejkubinec matejkubinec requested a review from a team as a code owner May 14, 2026 17:18
@matejkubinec matejkubinec requested review from fabio-silva and mattiasimonato and removed request for a team May 14, 2026 17:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates settings retrieval so the UI can wait for the settings endpoint to become available after changing the PMM public address.

Changes:

  • Adds Axios request config support to getSettings.
  • Passes optional Axios config through useSettings.
  • Adds post-update polling in useUpdateSettings when the public address changes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ui/apps/pmm/src/types/api.types.ts Adds React Query option typing for Axios config.
ui/apps/pmm/src/hooks/api/useSettings.ts Uses Axios config in settings queries and waits for settings readiness after public address changes.
ui/apps/pmm/src/api/settings.ts Allows getSettings to receive Axios request config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/apps/pmm/src/types/api.types.ts Outdated
@matejkubinec
Copy link
Copy Markdown
Contributor Author

@copilot fix the following issue with the type imports for the UseQueryDetails:

4

/home/runner/work/pmm/pmm/ui/apps/pmm/src/types/api.types.ts
Error:   18:5  error  'TError' is defined but never used     @typescript-eslint/no-unused-vars
Error:   19:5  error  'TData' is defined but never used      @typescript-eslint/no-unused-vars
Error:   20:5  error  'TQueryKey' is defined but never used  @typescript-eslint/no-unused-vars

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

@copilot fix the following issue with the type imports for the UseQueryDetails:

4
...

Fixed in afd0ad8. Prefixed the unused type parameters (TError, TData, TQueryKey) with underscore to indicate they're intentionally unused, which satisfies the TypeScript linter.

@it-percona-cla
Copy link
Copy Markdown
Contributor

it-percona-cla commented May 15, 2026

CLA assistant check
All committers have signed the CLA.

@fabio-silva
Copy link
Copy Markdown
Contributor

@copilot remove unused imports

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

@copilot remove unused imports

Fixed in d2fc92f. Added missing imports for DefaultError and QueryKey types from @tanstack/react-query that are referenced in the module augmentation.

@matejkubinec matejkubinec force-pushed the PMM-15051-pmm-address-update branch from 886a380 to d736969 Compare May 22, 2026 05:43
@matejkubinec matejkubinec requested review from a team, JiriCtvrtka and Nailya as code owners May 22, 2026 05:43
@matejkubinec matejkubinec requested review from 4nte and ademidoff and removed request for a team May 22, 2026 05:43
@github-actions github-actions Bot added the documentation Documentation changes label May 22, 2026
@matejkubinec matejkubinec removed request for a team, 4nte, JiriCtvrtka, Nailya and ademidoff May 22, 2026 05:44
@matejkubinec matejkubinec force-pushed the PMM-15051-pmm-address-update branch from c07b4c3 to af33b50 Compare May 22, 2026 05:47
@matejkubinec matejkubinec merged commit 3a587ee into v3 May 22, 2026
8 checks passed
@matejkubinec matejkubinec deleted the PMM-15051-pmm-address-update branch May 22, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants