Skip to content

PMM-7 Several build/dev fixes#5290

Merged
ademidoff merged 12 commits intov3from
PMM-7-several-build-fixes
Apr 24, 2026
Merged

PMM-7 Several build/dev fixes#5290
ademidoff merged 12 commits intov3from
PMM-7-several-build-fixes

Conversation

@ademidoff
Copy link
Copy Markdown
Member

@ademidoff ademidoff commented Apr 23, 2026

PMM-7

Link to the Feature Build: SUBMODULES-4320

This pull request introduces several improvements and fixes across the development environment, CI/CD workflows, and build configurations. The most notable changes involve updating test coverage collection to be per-package, enhancing the GitHub Actions merge gatekeeper workflow for better container registry integration, and refining Dockerfile and RPM packaging configurations for improved security and maintainability.

CI/CD and Build Process Improvements:

  • Updated the Merge Gatekeeper GitHub Actions workflow to use the latest Ubuntu runner, added pull_request_target trigger, enabled package read permissions, and switched to running the gatekeeper via a container image from GitHub Container Registry with explicit login.
  • Changed test coverage commands in all Makefiles (admin/Makefile, agent/Makefile, managed/Makefile, vmproxy/Makefile) to collect per-package coverage instead of cross-package coverage, simplifying the coverage process and potentially making results more accurate for each package. [1] [2] [3] [4]

Development Environment Configuration:

  • Modified the PostgreSQL setup in .devcontainer/setup.py to allow both trust and scram-sha-256 authentication methods from all hosts for easier development, improving flexibility for local testing.

Docker and Packaging Adjustments:

  • In build/docker/server/Dockerfile.el9, switched cache mount points for DNF/YUM, ensured microdnf is removed after installing dnf, and adjusted build steps for better caching and image cleanliness.
  • In build/docker/client/Dockerfile.el9, removed the redundant -r flag from the useradd command for pmm-agent, as the user is not a system user.
  • Changed file ownership for certain UI and dashboard directories in the RPM spec (pmm-managed.spec) to root instead of pmm, increasing security of installed files.

Note

The test failures are unrelated to this PR, they probably originate from new releases of MySQL.

&& rm -rf /var/cache/*

RUN groupadd -g 1002 pmm-agent && \
useradd -u 1002 -r -g pmm-agent -s /sbin/nologin \
Copy link
Copy Markdown
Member Author

@ademidoff ademidoff Apr 23, 2026

Choose a reason for hiding this comment

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

This is useless for UIDs above 1000 and it produces a warning.

Comment thread .devcontainer/setup.py
# Configure pg_hba.conf for password authentication from all hosts (dev environment only)
# Note: In dev, we allow both trust and scram-sha-256 for convenience
"echo 'host all all 0.0.0.0/0 trust' >> /srv/postgres14/pg_hba.conf",
"echo 'host all all 0.0.0.0/0 scram-sha-256' >> /srv/postgres14/pg_hba.conf",
Copy link
Copy Markdown
Member Author

@ademidoff ademidoff Apr 23, 2026

Choose a reason for hiding this comment

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

Since we added scram-sha-256, this was missed.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.05%. Comparing base (ae2bf6f) to head (fb4e30d).
⚠️ Report is 2 commits behind head on v3.

Additional details and impacted files
@@            Coverage Diff             @@
##               v3    #5290      +/-   ##
==========================================
- Coverage   47.78%   42.05%   -5.74%     
==========================================
  Files         410      410              
  Lines       41992    41992              
==========================================
- Hits        20066    17658    -2408     
- Misses      19948    22547    +2599     
+ Partials     1978     1787     -191     
Flag Coverage Δ
admin 34.89% <ø> (-0.91%) ⬇️
agent 48.91% <ø> (-4.43%) ⬇️
managed 40.61% <ø> (-7.10%) ⬇️
vmproxy 72.09% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run Merge Gatekeeper
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Upstream used to rebuild the image on every run, which was a waste.

@ademidoff ademidoff marked this pull request as ready for review April 23, 2026 18:27
@ademidoff ademidoff requested a review from a team as a code owner April 23, 2026 18:27
@ademidoff ademidoff requested review from JiriCtvrtka and maxkondr and removed request for a team April 23, 2026 18:27
@ademidoff ademidoff merged commit e552840 into v3 Apr 24, 2026
37 of 43 checks passed
@ademidoff ademidoff deleted the PMM-7-several-build-fixes branch April 24, 2026 11:47
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.

3 participants