ci: skip the tutorial rebuild on unrelated PRs, and unfreeze its ccache - #3811
Open
nbbrooks wants to merge 1 commit into
Open
ci: skip the tutorial rebuild on unrelated PRs, and unfreeze its ccache#3811nbbrooks wants to merge 1 commit into
nbbrooks wants to merge 1 commit into
Conversation
tutorial-source is the long pole on every moveit2 PR. Measured across eight consecutive runs: 43m33s, 53m32s, 56m41s, 54m22s, 60m58s, 51m10s, 54m01s, 57m40s. It ran the full ~55 min on #3809, a PR touching four launch .test.py files. Two independent causes. 1. It runs on every pull_request with no path filter The job rebuilds moveit2 + moveit2_tutorials + all upstream deps from source. Changes to test fixtures, markdown, or other workflows cannot affect the tutorial image, but still trigger a full rebuild. Add a path filter so those PRs skip it. Uses `paths` with `!` rather than `paths-ignore`: negation is only supported in `paths`, and the two filters cannot be combined for a single event. The filter still runs the job when this workflow or the tutorial-source Dockerfile itself changes. Safe to skip -- verified tutorial-source (jazzy) is not a required status check on main (the required set is Format, humble-ci, jazzy-ci, rolling-ci + ikfast + clang-tidy (delta), rolling-ci + ccov), and .github/mergify.yml contains only label-driven backport rules with no check-success conditions. So a skipped run cannot block a merge and no no-op fallback job is needed. 2. The ccache was frozen after its first save key: docker-tutorial-ccache-${{ matrix.ROS_DISTRO }}-${{ hashFiles(...) }} A static key with no restore-keys. actions/cache skips its save step on an exact-key hit, so the entry is written once and never refreshed -- every build after the first restores a stale ccache and recompiles whatever changed since, indefinitely. The key only rotates when the Dockerfile changes, which is rare. Switch to the rolling-key pattern used elsewhere in this repo: make the key unique per run and fall back to the stable prefixes, so each run restores the newest entry and saves an updated one. Not addressed here, but worth follow-up: the Dockerfile does COPY . src/moveit2 above the expensive RUN (with .dockerignore deliberately removed), so any source change busts the layer; gazebo install, the tutorials clone, vcs import, rosdep and colcon build share one monolithic RUN; and the moveit2_tutorials clone is not shallow. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3811 +/- ##
==========================================
- Coverage 46.28% 46.24% -0.04%
==========================================
Files 726 726
Lines 59504 59509 +5
Branches 7624 7623 -1
==========================================
- Hits 27536 27512 -24
- Misses 31801 31830 +29
Partials 167 167 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This pull request is in conflict. Could you fix it @nbbrooks? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
tutorial-sourceis the long pole on every moveit2 PR. Measured across eight consecutive runs:It ran the full ~55 min on #3809 — a PR touching four launch
.test.pyfiles.Two independent causes, both small fixes.
1. It runs on every
pull_requestwith no path filterThe job rebuilds moveit2 + moveit2_tutorials + all upstream deps from source. Changes to test fixtures, markdown, or other workflows can't affect the tutorial image, but still trigger a full rebuild.
Uses
pathswith!rather thanpaths-ignore— negation is only supported inpaths, and the two filters can't be combined for one event:The filter still runs the job when this workflow or
.docker/tutorial-source/**changes.Verified safe to skip.
tutorial-source (jazzy)is not a required status check onmain— the required set isFormat,humble-ci,jazzy-ci,rolling-ci + ikfast + clang-tidy (delta),rolling-ci + ccov. And.github/mergify.ymlcontains only label-driven backport rules with nocheck-successconditions. So a skipped run can't block a merge, and no no-op fallback job is needed.2. The ccache was frozen after its first save
A static key with no
restore-keys.actions/cacheskips its save step on an exact-key hit, so the entry is written once and never refreshed — every build after the first restores a stale ccache and recompiles whatever changed since, indefinitely. The key only rotates when the Dockerfile changes, which is rare.Switched to the rolling-key pattern used elsewhere in this repo: unique per run, falling back to the stable prefixes, so each run restores the newest entry and saves an updated one.
Not addressed here
Worth follow-up, but larger and Dockerfile-structural:
COPY . src/moveit2sits above the expensiveRUN, with.dockerignoredeliberately removed ("enforce full source context") — so any source change busts the layer and forces a full workspace rebuild.vcs import,rosdep installandcolcon buildshare one monolithicRUN, so the slow-and-stable parts can never cache separately from the fast-changing build.moveit2_tutorialsclone is not shallow (--depth 1).Checklist
🤖 Generated with Claude Code