Backport Fix to Docker Cache Restore Keys Logic
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Parent Issue
N/A
User Story
As a DevOps engineer,
I want to backport the fix that removes the restore-keys configuration from the actions/cache step in our Docker build context caching job,
So that we avoid unintended cache restoration from builds on main, which could lead to incorrect or outdated Docker layers being used in feature or release branches.
Acceptance Criteria
- The
restore-keyssection must be removed from theactions/cachestep in all relevant workflows outside ofmain - The behavior should match what is currently implemented on
main, using only a unique cache key based ondateandgithub.run_id - Validate that Docker contexts are properly isolated between branches and builds
- Add documentation or inline comments explaining the potential conflict with restore-keys when not scoped by run_id
- Optional: Add logic to flush or ignore cache keys starting with
docker-context-{current-date}as a temporary mitigation
Proposed Objective
Quality Assurance
Proposed Priority
Priority 2 - Important
dotCMS Version
Applies to GitHub Actions workflows in core (non-main branches)
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
- Internal Slack discussion
- Reference: implementation on
mainalready fixed
Assumptions & Initiation Needs
- Workflow updates are made via PR to affected branches
- CI/CD pipelines will reflect cache changes after PR merge
- Developers are aware that older caches may still persist temporarily
Quality Assurance Notes & Workarounds
- Workaround: manually flush cache keys with prefix
docker-context-{current-date} - Expected outcome: isolated, reliable Docker build caching per run
Sub-Tasks & Estimates
[tasklist]
Tasks
- Identify branches where the
restore-keyssection is still present - Remove
restore-keyslogic fromactions/cacheusage - Validate CI pipeline runs post-update
- Communicate the fix and behavior to the development team
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the GitHub Actions workflows outside main with the current implementation on main, focusing on the actions/cache step in the Docker build context caching job. Identify remaining restore-keys sections, remove them where applicable, and validate the resulting CI behavior and cache isolation across branches and builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions
- Domain
- build-system, ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100