Skip to content

PMM-7 Improve GH Actions#5531

Open
maxkondr wants to merge 63 commits into
mainfrom
PMM-7-GH-improve
Open

PMM-7 Improve GH Actions#5531
maxkondr wants to merge 63 commits into
mainfrom
PMM-7-GH-improve

Conversation

@maxkondr

@maxkondr maxkondr commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

PMM-7

This pull request introduces significant improvements and refactoring to the GitHub Actions workflows, focusing on standardizing the setup for Go-based projects, improving static checks, and enhancing maintainability. The changes include the introduction of a reusable composite GitHub Action for Go environment setup and caching, reorganization of workflow files for better modularity, and updates to job definitions to use the new action. Several new workflows are also added for API documentation and testing, while some obsolete workflows are removed.

The main idea behind this PR: run GH action granularily depending on component/directory where the changes are introduced. in order to achieve this purpose there were changes introduced primarily in Makefiles - split one upper-level action(like code formatting) into the same by logic and results/impact but with isolated context(per component).

Now the whole list of PMM components rebuild is not executed if there is one-line change in documentation.

Key changes include:

Standardization and Reuse

  • Introduced a new composite GitHub Action .github/actions/setup-go-release to centralize Go environment setup and caching logic, which is now used across all relevant workflows to ensure consistency and reduce duplication.

Workflow Refactoring and Enhancements

  • Refactored major workflows (admin.yml, agent.yml, api.yml, api-tests-static.yml, dashboards.yml) to use the new setup action, improved job structure (separating static checks, build, and test), and updated matrix and notification logic for better reliability and maintainability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

New and Improved Workflows

  • Old API workflow (api.yml) has been renamed to API documentation sync (api-docs.yml) and new one has been introduced for API tests code checks (api-tests-static.yml), and improved existing API test dispatch logic (api-tests.yml). [1] [2] [3] [4]

Cleanup and Removal

  • clean.yml workflow has been renamed to pr-cache-cleanup.yml and reworked - now it cleans up all PR-related caches once the PR is closed/merged/rejected.

Miscellaneous

  • Minor improvements such as using .nvmrc for Node.js versioning in dashboard workflows and updating job environments to ubuntu-latest for consistency. [1] [2] [3] [4]
  • Added workflow for Dependabot PRs.

These changes collectively modernize and streamline the CI/CD setup, making it easier to maintain and extend in the future.

maxkondr added 2 commits June 23, 2026 14:13
- Remove `on.push` triggers as useless
- use `ubuntu-latest` images
@maxkondr maxkondr self-assigned this Jun 23, 2026
@maxkondr maxkondr changed the title Pmm 7 gh improve PMM-7 Improve GH Actions Jun 23, 2026
@maxkondr maxkondr requested a review from Copilot June 23, 2026 14:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 PMM’s GitHub Actions configuration to reduce unnecessary workflow runs and modernize runner/config defaults, while adjusting the “main” workflow to split checks/build/tests into separate jobs.

Changes:

  • Tighten workflow triggers (move many component workflows to pull_request with paths filters; ignore *.md in several workflows).
  • Standardize GitHub Actions YAML headers (---) and migrate runners to ubuntu-latest.
  • Rework parts of CI execution/caching (e.g., separate main.yml jobs; update caches and Go env usage in several workflows).

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
Makefile.include Adjust test-common package filtering used by CI.
.github/workflows/vmproxy.yml Restrict vmproxy CI to PR path filters and update runner/config.
.github/workflows/ui.yml Add YAML doc header and switch runner to ubuntu-latest.
.github/workflows/scorecard.yml Add YAML doc header.
.github/workflows/sbom.yml Add YAML doc header and switch runner to ubuntu-latest.
.github/workflows/release-doc.yml Add YAML doc header and switch runner to ubuntu-latest.
.github/workflows/qan-api2.yml Restrict QAN CI triggers to PR paths and normalize steps/config.
.github/workflows/percona-intelligence.yml Restrict triggers to PR paths and add explicit Go/module/build caching.
.github/workflows/merge-gatekeeper.yml Update ignored checks list for merge gatekeeping.
.github/workflows/managed.yml Restrict Managed workflow triggers to PR paths and revise caching/container setup.
.github/workflows/main.yml Convert to PR-only, split into separate check/build/test jobs, and adjust path filters.
.github/workflows/linkspector.yml Add YAML doc header and switch runner to ubuntu-latest.
.github/workflows/labels.yml Add YAML doc header.
.github/workflows/documentation.yml Add YAML doc header.
.github/workflows/dockerhub-readme.yml Add YAML doc header.
.github/workflows/devcontainer.yml Add YAML doc header and switch runner to ubuntu-latest.
.github/workflows/dependabot.yml Add YAML doc header and rename workflow; switch runner to ubuntu-latest.
.github/workflows/dashboards.yml Normalize YAML header/formatting and switch Node setup to .nvmrc.
.github/workflows/clean.yml Add YAML doc header, switch runner to ubuntu-latest, and reorder steps.
.github/workflows/api.yml Add YAML doc header and exclude *.md from API-doc sync trigger.
.github/workflows/api-tests.yml Add YAML doc header, normalize workflow name, switch runner to ubuntu-latest.
.github/workflows/agent.yml Restrict agent CI triggers to PR paths and switch runner to ubuntu-latest.
.github/workflows/admin.yml Restrict admin CI triggers to PR paths and switch runner to ubuntu-latest.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/managed.yml Outdated
Comment thread .github/workflows/managed.yml
Comment thread .github/workflows/managed.yml Outdated
Comment thread .github/workflows/percona-intelligence.yml Outdated
Comment thread .github/workflows/qan-api2.yml
Comment thread .github/workflows/admin.yml
Comment thread .github/workflows/agent.yml
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
maxkondr and others added 5 commits June 23, 2026 17:39
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/workflows/percona-intelligence.yml Outdated
maxkondr and others added 3 commits June 23, 2026 17:50
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.

Comment thread .github/workflows/main.yml
Comment thread .github/workflows/main.yml
Comment thread .github/workflows/api.yml Outdated
Comment thread .github/workflows/admin.yml
Comment thread .github/workflows/agent.yml
Comment thread .github/workflows/qan-api2.yml
Comment thread .github/workflows/managed.yml
maxkondr and others added 2 commits June 23, 2026 18:03
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.54%. Comparing base (13d77b0) to head (5412c8c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5531      +/-   ##
==========================================
+ Coverage   43.03%   43.54%   +0.51%     
==========================================
  Files         414      544     +130     
  Lines       43050    45398    +2348     
  Branches        0      590     +590     
==========================================
+ Hits        18525    19768    +1243     
- Misses      22679    23693    +1014     
- Partials     1846     1937      +91     
Flag Coverage Δ
admin 34.78% <ø> (ø)
agent 49.14% <ø> (+2.61%) ⬆️
managed 43.05% <ø> (+<0.01%) ⬆️
unittests 41.31% <ø> (?)
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 69 out of 75 changed files in this pull request and generated 3 comments.

Files not reviewed (6)
  • api/accesscontrol/v1beta1/accesscontrol.pb.go: Generated file
  • api/actions/v1/actions.pb.go: Generated file
  • api/advisors/v1/advisors.pb.go: Generated file
  • api/agent/v1/agent.pb.go: Generated file
  • api/agent/v1/collector.pb.go: Generated file
  • api/agentlocal/v1/agentlocal.pb.go: Generated file
Comments suppressed due to low confidence (1)

.github/workflows/ui.yml:34

  • actions/setup-node is pointing to .nvmrc and yarn.lock in the repo root, but this repo keeps both files under ui/. With the current defaults.run.working-directory: .../ui, Node setup will fail to resolve the version file and the Yarn cache key will use a non-existent lockfile.
          node-version-file: ui/.nvmrc
          cache: yarn
          cache-dependency-path: ui/yarn.lock

Comment thread .github/workflows/main.yml
Comment thread .github/workflows/gh-workflows.yml Outdated
Comment thread api/user/v1/user.pb.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

qan-api2/main.go:267

  • kingpin.Version now reports version.FullInfo(), but the startup log later still prints version.ShortInfo(). That can be confusing when comparing --version output vs logs; consider switching the log to FullInfo() for consistency.

Comment thread api/Makefile Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread api-tests/Makefile
maxkondr and others added 3 commits June 25, 2026 18:49
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/clean.yml:38

  • go clean -modcache / go clean -cache only affects the runner filesystem. Since this job runs on GitHub-hosted runners, it won’t actually clear the persisted Actions caches restored by setup-go-release (and actions/cache won’t re-save on a cache hit), so the workflow becomes effectively a no-op for its stated purpose. If the goal is to reclaim Actions cache storage, consider deleting the Go cache entries via the GitHub Actions Cache API using the same keys used by the composite action.
      - name: Setup Go release
        uses: ./.github/actions/setup-go-release

      - name: Clean Go modules cache
        run: go clean -modcache

      - name: Clean Go build cache
        run: go clean -cache

Comment thread .github/workflows/go-cache-cleanup.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/go-cache-cleanup.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 37 out of 37 changed files in this pull request and generated no new comments.

@maxkondr maxkondr marked this pull request as ready for review June 26, 2026 09:26
@maxkondr maxkondr requested a review from a team as a code owner June 26, 2026 09:26
@maxkondr maxkondr requested review from a team, 4nte, ademidoff and fabio-silva and removed request for a team June 26, 2026 09:26
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.

4 participants