Skip to content

Rely on mtime instead of ctime for change detection.#27685

Draft
ulrfa wants to merge 1 commit intobazelbuild:masterfrom
ulrfa:mtime_ctime
Draft

Rely on mtime instead of ctime for change detection.#27685
ulrfa wants to merge 1 commit intobazelbuild:masterfrom
ulrfa:mtime_ctime

Conversation

@ulrfa
Copy link
Contributor

@ulrfa ulrfa commented Nov 16, 2025

This commit is experimental and serves as input for discussion on issue #27226.

There are still open questions, failing test cases, lack of new test cases, etc.

Changed functionality:

  • Ensure mtimes are trustworthy for detecting change for all outputs produced by actions and repository rules, including cases when archives with fake mtimes are extracted.

  • Compare mtime but not ctime when detecting changes for caches digests. However, fallback to comparing ctime if mtime is zero.

This commit is experimental and serves as input for discussion
on issue bazelbuild#27226.

There are still open questions, failing test cases, lack of
new test cases, etc.

Changed functionality:

 * Ensure mtimes are trustworthy for detecting change for all
   outputs produced by actions and repository rules, including
   cases when archives with fake mtimes are extracted.

 * Compare mtime but not ctime when detecting changes for caches
   digests. However, fallback to comparing ctime if mtime is zero.
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This pull request has been marked as stale since it has not had any activity in the last 30 days. It will be closed in the next 30 days unless any other activity occurs. If you think this PR is still relevant and should stay open, please post any comment here and the PR will no longer be marked as stale.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issues or PRs that are stale (no activity for 30 days)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant