Skip to content

PMM-15130 Validate connection on agent params change#5618

Merged
4nte merged 19 commits into
mainfrom
PMM-15130-validate-connection-on-agent-params-update
Jul 15, 2026
Merged

PMM-15130 Validate connection on agent params change#5618
4nte merged 19 commits into
mainfrom
PMM-15130-validate-connection-on-agent-params-update

Conversation

@4nte

@4nte 4nte commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

PMM-15130

Feature Build

When a change touches connection parameters (username, password, TLS options, etc.), pmm-managed now verifies the new settings by having the pmm-agent connect to the service (with changed params). If the check fails, the change is rolled back and the agent keeps its previous working config.

User has an option to opt-out via --skip-connection-check to bypass validation.

4nte and others added 2 commits July 8, 2026 16:21
…s-update

Resolve conflicts between skip_connection_check (this PR) and main's new
connection_timeout field/flag on the Change* exporter messages and CLI:
- agents.proto: keep both fields; move skip_connection_check to 14
  (ChangeProxySQLExporterParams) and 17 (ChangeValkeyExporterParams) to avoid
  colliding with connection_timeout at 13/16.
- 5 change_agent_*_exporter.go CLI files: keep both ConnectionTimeout and
  SkipConnectionCheck wiring.
- Regenerate inventory generated files (agents.pb.go, change_agent_responses.go,
  v1.json, swagger.json, swagger-dev.json) from the merged proto.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.68493% with 288 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.44%. Comparing base (31318c7) to head (7b656b7).
⚠️ Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
managed/services/inventory/agents.go 44.61% 255 Missing and 33 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5618      +/-   ##
==========================================
+ Coverage   43.59%   44.44%   +0.84%     
==========================================
  Files         415      416       +1     
  Lines       43134    43136       +2     
==========================================
+ Hits        18804    19170     +366     
+ Misses      22454    22091     -363     
+ Partials     1876     1875       -1     
Flag Coverage Δ
admin 34.96% <100.00%> (+0.17%) ⬆️
agent 50.16% <ø> (+1.11%) ⬆️
managed 43.81% <46.66%> (+0.82%) ⬆️
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.

@4nte 4nte marked this pull request as ready for review July 10, 2026 06:29
@4nte 4nte requested a review from a team as a code owner July 10, 2026 06:29
@4nte 4nte requested review from JiriCtvrtka, ademidoff and maxkondr and removed request for a team July 10, 2026 06:29
Comment thread managed/services/inventory/agents.go Outdated
Comment thread managed/services/inventory/agents.go Outdated
Comment thread managed/services/inventory/agents.go Outdated
Comment thread managed/services/inventory/agents.go Outdated
@ademidoff

Copy link
Copy Markdown
Member

I think we need to document well this feature for those who's agent 1) lost the password or 2) is in the maintenance window or just down for some reason.

Clearly, the agent won't be able to verify the password, so documenting something like "please pass the skipConnectionCheck = true " if such case would be great.

Comment thread api/inventory/v1/agents.proto
Comment thread managed/services/inventory/agents.go Outdated
Comment thread managed/services/inventory/agents.go Outdated
@4nte 4nte requested a review from maxkondr July 13, 2026 11:10
@ademidoff ademidoff temporarily deployed to PMM-15130-validate-connection-on-agent-params-update - pmm-doc-3 PR #5618 July 15, 2026 10:21 — with Render Destroyed
@4nte 4nte merged commit a1ebbbd into main Jul 15, 2026
30 checks passed
@4nte 4nte deleted the PMM-15130-validate-connection-on-agent-params-update branch July 15, 2026 10:37
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.

4 participants