Skip to content

Add mark-tmp cache action#238

Merged
arjunsuresh merged 6 commits into
devfrom
copilot/add-invalidate-cache-action
May 22, 2026
Merged

Add mark-tmp cache action#238
arjunsuresh merged 6 commits into
devfrom
copilot/add-invalidate-cache-action

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 22, 2026

This adds a cache action for the workflow discussed in the issue: mark matching cache entries as tmp instead of deleting them, so users can force cache refresh/reuse flows without manually editing cache metadata. The CLI now supports the hyphenated action name agreed on in the discussion.

  • CLI

    • Added mlc mark-tmp cache
    • Wired hyphenated command parsing into dispatch and help output
  • Cache behavior

    • Implemented CacheAction.mark_tmp()
    • Updates matching cache metadata in place by adding the tmp tag
    • Leaves cached files/directories intact
    • Avoids duplicate tmp tags on repeated runs
  • Docs / help

    • Updated cache action listings in CLI/help text, README, and cache docs
    • Added action-specific help text for mark-tmp
  • Coverage

    • Added focused end-to-end test coverage for:
      • adding tmp to cache metadata
      • idempotent reruns
      • preserving cache contents
mlc mark-tmp cache --tags=get,dataset,igbh

✅ PR Checklist

  • Target branch is dev

📌 Note: PRs must be raised against dev. Do not commit directly to main.

✅ Testing & CI

  • Have tested the changes in my local environment, else have properly conveyed in the PR description
  • The change includes a GitHub Action to test the script(if it is possible to be added).
  • No existing GitHub Actions are failing because of this change.

📚 Documentation

  • README or help docs are updated for new features or changes.
  • CLI help messages are meaningful and complete.

📁 File Hygiene & Output Handling

  • No unintended files (e.g., logs, cache, temp files, pycache, output folders) are committed.

🛡️ Safety & Security

  • No secrets or credentials are committed.
  • Paths, shell commands, and environment handling are safe and portable.

🙌 Contribution Hygiene

  • PR title and description are concise and clearly state the purpose of the change.
  • Related issues (if any) are properly referenced using Fixes # or Closes #.
  • All reviewer feedback has been addressed.

Copilot AI and others added 3 commits May 22, 2026 11:30
Agent-Logs-Url: https://github.com/mlcommons/mlcflow/sessions/b9e64b25-2fc2-4969-9147-9ae95e868669

Co-authored-by: arjunsuresh <4791823+arjunsuresh@users.noreply.github.com>
Agent-Logs-Url: https://github.com/mlcommons/mlcflow/sessions/b9e64b25-2fc2-4969-9147-9ae95e868669

Co-authored-by: arjunsuresh <4791823+arjunsuresh@users.noreply.github.com>
Agent-Logs-Url: https://github.com/mlcommons/mlcflow/sessions/b9e64b25-2fc2-4969-9147-9ae95e868669

Co-authored-by: arjunsuresh <4791823+arjunsuresh@users.noreply.github.com>
Copilot AI changed the title [WIP] Add action to invalidate cache with tmp tag Add mark-tmp cache action May 22, 2026
Copilot AI requested a review from arjunsuresh May 22, 2026 11:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@github-actions
Copy link
Copy Markdown

🤖 AI PR Review Summary\n\nThis PR introduces a new 'mark-tmp' action for the cache target, allowing users to tag cache entries as temporary without deleting files. It updates CLI parsing, documentation, and adds a comprehensive test for the new feature. The design is straightforward, but risks include potential metadata corruption if saving fails and ensuring backward compatibility with existing cache metadata formats.

@github-actions
Copy link
Copy Markdown

🤖 AI PR Review Summary\n\nThis PR adds a new 'mark-tmp' action to the cache target, allowing users to tag cache entries as temporary without deleting their contents. It updates the CLI parser, documentation, and cache action class to support this feature. A new test verifies that the 'tmp' tag is added correctly and avoids duplicates. The design is straightforward, but risks include ensuring metadata consistency and handling concurrent modifications. The PR improves cache management flexibility with minimal risk.

@arjunsuresh arjunsuresh marked this pull request as ready for review May 22, 2026 12:01
@arjunsuresh arjunsuresh requested a review from a team as a code owner May 22, 2026 12:01
@arjunsuresh arjunsuresh changed the base branch from main to dev May 22, 2026 12:01
@arjunsuresh arjunsuresh merged commit 59ef02c into dev May 22, 2026
60 of 61 checks passed
@arjunsuresh arjunsuresh deleted the copilot/add-invalidate-cache-action branch May 22, 2026 12:03
@github-actions github-actions Bot locked and limited conversation to collaborators May 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discussion - should we provide an action to invalidate a cache?

2 participants