dotCMS / dotCMS/core

Backport Fix to Docker Cache Restore Keys Logic

Open
#32,920 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale Team : Platform
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-keys section must be removed from the actions/cache step in all relevant workflows outside of main
  • The behavior should match what is currently implemented on main, using only a unique cache key based on date and github.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 main already 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-keys section is still present
  • Remove restore-keys logic from actions/cache usage
  • Validate CI pipeline runs post-update
  • Communicate the fix and behavior to the development team

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.