Skip to content

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

Merged
plebioda merged 2 commits into
PMM-15299-open-managerfrom
PMM-15360-om-switch-flag
Aug 31, 2026
Merged

PMM-15360: Add the OpenManager settings flag#5851
plebioda merged 2 commits into
PMM-15299-open-managerfrom
PMM-15360-om-switch-flag

Conversation

@plebioda

@plebioda plebioda commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

What

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 (#TBD), once this and PMM-15326-om-backend / PMM-15326-om-ui-nav are all available to stack on.

Ticket: PMM-15360

First of three PRs for PMM-15360

  1. This one — the flag itself (base: this branch, the epic)
  2. Gate OpenManager's service on the switch — base: PMM-15326-om-backend (PMM-15326: Implement the OM service in pmm-managed #5816)
  3. Gate OpenManager's nav and page on the switch — base: PMM-15326-om-ui-nav (PMM-15326: Mount OM in the PMM app and its navigation #5818)

PRs 2 and 3 both merge this branch in (rather than depending on the non-PR PMM-15326-om-integration branch), so their diffs will show this PR's changes inline until it merges.

Feature build: N/A on its own — this only adds a setting nothing reads yet.

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 8 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (PMM-15299-open-manager@36698e0). Learn more about missing BASE report.

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    #5851   +/-   ##
=========================================================
  Coverage                          ?   46.66%           
=========================================================
  Files                             ?      431           
  Lines                             ?    45640           
  Branches                          ?        0           
=========================================================
  Hits                              ?    21296           
  Misses                            ?    22267           
  Partials                          ?     2077           
Flag Coverage Δ
admin 34.93% <ø> (?)
agent 51.41% <ø> (?)
managed 46.78% <42.85%> (?)
vmproxy 72.22% <ø> (?)

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

☔ 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 db6d354 to dd26130 Compare August 31, 2026 06:51
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>
…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 dd26130 to 68eea37 Compare August 31, 2026 08:18
@plebioda
plebioda marked this pull request as ready for review August 31, 2026 10:25
@plebioda
plebioda requested review from a team as code owners August 31, 2026 10:25
@plebioda
plebioda requested review from 4nte, ademidoff and matejkubinec and removed request for a team August 31, 2026 10:25
@plebioda
plebioda merged commit e6bd813 into PMM-15299-open-manager Aug 31, 2026
30 checks passed
@plebioda
plebioda deleted the PMM-15360-om-switch-flag branch August 31, 2026 10:25
plebioda added a commit that referenced this pull request Aug 31, 2026
@plebioda
plebioda restored the PMM-15360-om-switch-flag branch August 31, 2026 10:34
@plebioda

Copy link
Copy Markdown
Collaborator Author

This was merged by mistake. The changes have been reverted on PMM-15299-open-manager (revert commit 67e509e), and a fresh PR with the same changes has been opened at #5866.

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.

1 participant