Skip to content

PMM-15360: Add the OpenManager settings flag - #5866

Open
plebioda wants to merge 3 commits into
PMM-15299-open-managerfrom
PMM-15360-om-switch-flag
Open

PMM-15360: Add the OpenManager settings flag#5866
plebioda wants to merge 3 commits into
PMM-15299-open-managerfrom
PMM-15360-om-switch-flag

Conversation

@plebioda

Copy link
Copy Markdown
Collaborator

Recreated after #5851 was merged by mistake and reverted on PMM-15299-open-manager (see #5851 for the original description and discussion).

Same two commits as the original PR, unchanged:

  • Add the OpenManager settings flag
  • Regenerate the server/v1 swagger and JSON client for om_enabled

Adds Settings.OpenManager.Enabled to pmm-managed and an Advanced
Settings toggle for it, default off like every other technical-preview
flag (Azure Discover, Access Control). PMM_ENABLE_OM seeds it the same
way PMM_ENABLE_NOMAD/PMM_ENABLE_AZURE_DISCOVER do, and reuses
validateChangeSettingsRequest's existing env-var-wins precedence check
rather than adding a new mechanism.

This only exposes and stores the flag; nothing reads it yet to gate
OpenManager's own behavior. That's the follow-up PR, once this and
PMM-15326-om-backend / PMM-15326-om-ui-nav are all available to stack
on.

Signed-off-by: Pawel Lebioda <pawel.lebioda@percona.com>
@plebioda
plebioda force-pushed the PMM-15360-om-switch-flag branch from 68eea37 to 839e3dc Compare August 31, 2026 10:37
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.94%. Comparing base (772fbbe) to head (9bac502).

Files with missing lines Patch % Lines
managed/utils/envvars/parser.go 0.00% 6 Missing ⚠️
managed/models/settings.go 75.00% 1 Missing ⚠️
managed/services/server/server.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           PMM-15299-open-manager    #5866      +/-   ##
==========================================================
- Coverage                   46.98%   46.94%   -0.05%     
==========================================================
  Files                         430      430              
  Lines                       45395    45409      +14     
==========================================================
- Hits                        21331    21318      -13     
- Misses                      22004    22030      +26     
- Partials                     2060     2061       +1     

☔ 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.

@plebioda
plebioda force-pushed the PMM-15360-om-switch-flag branch 2 times, most recently from 1de5337 to be40598 Compare August 31, 2026 11:13
@plebioda

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The change adds OpenManager configuration to the v1 API and server settings model. It supports updates through enable_om, reports status through om_enabled, and parses PMM_ENABLE_OM. The server returns the status in full and read-only settings responses. The advanced settings UI adds an OpenManager toggle, tooltip, documentation link, form mapping, and update payload support. Tests cover disabling and re-enabling the setting.

Merge Risk: 🟡 Moderate · up to be405

The OpenManager setting is exposed through the API and UI, but the current update path does not persist the toggle, so users may see a successful change without the server state changing. The persistence mapping should be fixed before merging; the remaining accessibility and URL cleanup are non-blocking.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the recreation context and summarizes the two commits, but it omits the required ticket number, feature build, and API documentation checklist from the repository template. Add the required template sections: provide the ticket number, feature build, and confirm whether the API documentation was updated. Keep the existing change summary and related PR references.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding the OpenManager settings flag.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Some tools did not complete. Review the errors below.

🔧 Buf (1.72.0)
api/server/v1/server.proto

fatal: unable to access 'https://github.com/percona/pmm.git/': Failed to connect to github.com port 443 via 127.0.0.1 after 0 ms: Could not connect to server
fatal: could not fetch 0fe88df85d9b04db305499c56ee0f4add0fccb04 from promisor remote


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
ui/apps/pmm/src/pages/settings/Settings.messages.ts (1)

51-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move openManagerLink to the shared URL constants.

This line hardcodes a URL in Settings.messages.ts. Define the URL in src/lib/constants.ts and reference that constant here.

As per coding guidelines, ui/apps/pmm/**/*.{js,jsx,ts,tsx} must not hardcode URLs; use constants from src/lib/constants.ts.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: adfff729-cedd-4345-a7dd-1199eea48e13

📥 Commits

Reviewing files that changed from the base of the PR and between 67e509e and be40598.

⛔ Files ignored due to path filters (1)
  • api/server/v1/server.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (19)
  • api/server/v1/json/client/server_service/change_settings_responses.go
  • api/server/v1/json/client/server_service/get_read_only_settings_responses.go
  • api/server/v1/json/client/server_service/get_settings_responses.go
  • api/server/v1/json/v1.json
  • api/server/v1/server.pb.validate.go
  • api/server/v1/server.proto
  • api/swagger/swagger-dev.json
  • api/swagger/swagger.json
  • managed/models/settings.go
  • managed/models/settings_helpers.go
  • managed/models/settings_helpers_test.go
  • managed/services/server/server.go
  • managed/utils/envvars/parser.go
  • ui/apps/pmm/src/pages/settings/Settings.messages.ts
  • ui/apps/pmm/src/pages/settings/components/advanced/AdvancedSettingsForm.schema.ts
  • ui/apps/pmm/src/pages/settings/components/advanced/AdvancedSettingsForm.tsx
  • ui/apps/pmm/src/pages/settings/components/advanced/AdvancedSettingsForm.utils.ts
  • ui/apps/pmm/src/types/settings.types.ts
  • ui/apps/pmm/src/utils/testUtils.tsx
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • percona/pmm-qa (manual)
  • percona/pmm (manual)

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.

Comment thread api/server/v1/server.proto
Comment thread ui/apps/pmm/src/pages/settings/components/advanced/AdvancedSettingsForm.tsx Outdated
…abled

make gen does more than buf generate -- it also regenerates the
swagger/OpenAPI JSON (api/server/v1/json/v1.json, the merged
api/swagger/swagger*.json) and the generated JSON API client
(api/server/v1/json/client/server_service/*.go) from the same proto.
The earlier commit only ran buf generate directly and hand-curated its
output against unrelated toolchain drift elsewhere in api/, which
missed these -- they're make gen's job, not buf generate's.

Also picks up the same protoc-gen-go import-grouping drift on
server.pb.go/server.pb.validate.go that affects unrelated proto
packages across the tree; taking make gen's own output here (rather my
earlier hand-curated one) is what actually matches what CI's own gen
step produces, so this and CI won't disagree again.

The generated client's field names are OmEnabled/EnableOm here,
matching this branch's own api/Makefile: --additional-initialism=om
was added to the swagger client generator's flag list by
PMM-15326-om-api, but that commit hasn't reached this branch's base
(PMM-15299-open-manager) yet, so "om" isn't a registered initialism
here and go-swagger capitalizes it as an ordinary word. Branches that
already have that flag (PMM-15326-om-backend and its descendants) will
correctly want OMEnabled/EnableOM instead -- each PR's generated code
has to match its own base's Makefile, not a single "right" answer
across the stack.

Found because CI's "make gen; git diff --exit-code" check failed on
this exact mismatch, on all three of this ticket's PRs.

Signed-off-by: Pawel Lebioda <pawel.lebioda@percona.com>
@plebioda
plebioda force-pushed the PMM-15360-om-switch-flag branch from be40598 to 04f695f Compare August 31, 2026 12:57
@plebioda
plebioda marked this pull request as ready for review August 31, 2026 13:31
@plebioda
plebioda requested review from a team as code owners August 31, 2026 13:31
@plebioda
plebioda requested review from 4nte, JiriCtvrtka, fabio-silva and matejkubinec and removed request for a team August 31, 2026 13:31
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