Skip to content

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

Open
matejkubinec wants to merge 11 commits into
v3from
PMM-15051-pmm-address-update
Open

PMM-15051 Wait for settings endpoint to be ready after public address update#5366
matejkubinec wants to merge 11 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
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@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

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ matejkubinec
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@fabio-silva
Copy link
Copy Markdown
Contributor

@copilot remove unused imports

Agent-Logs-Url: https://github.com/percona/pmm/sessions/1336d981-0808-4bce-9846-9eb9cb52f1f7

Co-authored-by: fabio-silva <4190654+fabio-silva@users.noreply.github.com>
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.

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.

6 participants