René's URL Explorer Experiment


Title: perf(ci): stabilize file mtimes for Go test cache by davdhacs · Pull Request #19395 · stackrox/stackrox · GitHub

Open Graph Title: perf(ci): stabilize file mtimes for Go test cache by davdhacs · Pull Request #19395 · stackrox/stackrox

X Title: perf(ci): stabilize file mtimes for Go test cache by davdhacs · Pull Request #19395 · stackrox/stackrox

Description: Description Go's test cache validates inputs by (path, size, mtime) — not content. git checkout sets all mtimes to "now", so test results are never cached across CI runs. Fix: set tracked file and directory mtimes to a fixed date after checkout: git ls-files | xargs touch -t 200101010000 git ls-files | sed 's|/[^/]*$||' | sort -u | xargs touch -t 200101010000 Directory mtimes matter because tests using os.ReadDir/filepath.Walk (e.g. helm chart tests) check them too. git ls-files only lists files. Combined with #19617 (stable test ldflags), this enables full test caching on current master baseline: go 33m -> 7.2m (4.6x), go-postgres 31m -> 3.6m (8.6x). See #19618 for combined demo. Prior art #15609 by @janisz applied this with git-restore-mtime. It was closed due to two blockers at that time: GOTAGS matrix collision — release and non-release tests shared one cache, invalidating each other. Now fixed by #19580 (key-suffix). -coverprofile disabled test caching in Go <1.25. Now fixed in Go 1.25. Risk If a testdata file changes content but not size between commits, the test cache could return a stale result. This matches Go's own documented limitation. User-facing documentation CHANGELOG.md is updated OR update is not needed documentation PR is created and is linked above OR is not needed Testing and quality the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag CI results are inspected Automated testing modified existing tests How I validated my change CI green on all unit-test jobs Combined branch (#19618) warm run verified: go 33m -> 7.2m (4.6x), go-postgres 31m -> 3.6m (8.6x) Partially generated by AI.

Open Graph Description: Description Go's test cache validates inputs by (path, size, mtime) — not content. git checkout sets all mtimes to "now", so test results are never cached across CI runs. Fix: set tra...

X Description: Description Go&#39;s test cache validates inputs by (path, size, mtime) — not content. git checkout sets all mtimes to &quot;now&quot;, so test results are never cached across CI runs. ...

Opengraph URL: https://github.com/stackrox/stackrox/pull/19395

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6554d883-3d1e-0451-32f6-f5adeac2a069
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB154:3985C:5A7665:79B394:6A4D3FFA
html-safe-nonce713299e76e4a77be8fe332532907aee21a8fe99ce5474b094664eac94ce86ad1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTU0OjM5ODVDOjVBNzY2NTo3OUIzOTQ6NkE0RDNGRkEiLCJ2aXNpdG9yX2lkIjoiNjk1ODIxNzUxMzc3MjMzNTA5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1d4bc27e9a2d3d9266f42404a02df28554119391357058716785879fb00d460a
hovercard-subject-tagpull_request:3390042840
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/stackrox/stackrox/pull/19395/files
twitter:imagehttps://avatars.githubusercontent.com/u/105243888?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/105243888?s=400&v=4
og:image:altDescription Go's test cache validates inputs by (path, size, mtime) — not content. git checkout sets all mtimes to "now", so test results are never cached across CI runs. Fix: set tra...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/stackrox/stackrox git https://github.com/stackrox/stackrox.git
octolytics-dimension-user_id40638982
octolytics-dimension-user_loginstackrox
octolytics-dimension-repository_id434017296
octolytics-dimension-repository_nwostackrox/stackrox
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id434017296
octolytics-dimension-repository_network_root_nwostackrox/stackrox
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release56fc8347865a14e2ec811533d68f929cf4e0ec19
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/stackrox/stackrox/pull/19395/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstackrox%2Fstackrox%2Fpull%2F19395%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstackrox%2Fstackrox%2Fpull%2F19395%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=stackrox%2Fstackrox
Reloadhttps://github.com/stackrox/stackrox/pull/19395/files
Reloadhttps://github.com/stackrox/stackrox/pull/19395/files
Reloadhttps://github.com/stackrox/stackrox/pull/19395/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/19395/files
stackrox https://github.com/stackrox
stackroxhttps://github.com/stackrox/stackrox
Notifications https://github.com/login?return_to=%2Fstackrox%2Fstackrox
Fork 181 https://github.com/login?return_to=%2Fstackrox%2Fstackrox
Star 1.3k https://github.com/login?return_to=%2Fstackrox%2Fstackrox
Code https://github.com/stackrox/stackrox
Issues 52 https://github.com/stackrox/stackrox/issues
Pull requests 549 https://github.com/stackrox/stackrox/pulls
Actions https://github.com/stackrox/stackrox/actions
Security and quality 0 https://github.com/stackrox/stackrox/security
Insights https://github.com/stackrox/stackrox/pulse
Code https://github.com/stackrox/stackrox
Issues https://github.com/stackrox/stackrox/issues
Pull requests https://github.com/stackrox/stackrox/pulls
Actions https://github.com/stackrox/stackrox/actions
Security and quality https://github.com/stackrox/stackrox/security
Insights https://github.com/stackrox/stackrox/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fstackrox%2Fstackrox%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fstackrox%2Fstackrox%2Fissues%2Fnew%2Fchoose
davdhacshttps://github.com/davdhacs
masterhttps://github.com/stackrox/stackrox/tree/master
davdhacs/test-cache-mtimehttps://github.com/stackrox/stackrox/tree/davdhacs/test-cache-mtime
Conversation 20 https://github.com/stackrox/stackrox/pull/19395
Commits 6 https://github.com/stackrox/stackrox/pull/19395/commits
Checks 99 https://github.com/stackrox/stackrox/pull/19395/checks
Files changed https://github.com/stackrox/stackrox/pull/19395/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/19395/files
perf(ci): stabilize file mtimes for Go test cache https://github.com/stackrox/stackrox/pull/19395/files#top
Show all changes 6 commits https://github.com/stackrox/stackrox/pull/19395/files
f0d4302 perf(ci): stabilize file mtimes for Go test cache davdhacs Mar 24, 2026 https://github.com/stackrox/stackrox/pull/19395/commits/f0d43021989d63fff070ed146e28e426b91ef136
0e3e889 perf(ci): also stabilize directory mtimes for test cache davdhacs Mar 26, 2026 https://github.com/stackrox/stackrox/pull/19395/commits/0e3e889ae196dbae4b9d3cb17cbecb6b83d19e60
b313cbf fix: use TZ=UTC for mtime stabilization davdhacs Mar 28, 2026 https://github.com/stackrox/stackrox/pull/19395/commits/b313cbf8b019730e40dad994c1aac7de825ea1fa
83baecf Merge remote-tracking branch 'origin/master' into davdhacs/test-cache… davdhacs Mar 31, 2026 https://github.com/stackrox/stackrox/pull/19395/commits/83baecf085ffea0819ae07c8b6ad1da19cb3129c
a04654b fix: remove TZ=UTC from mtime stabilization (all runners are UTC) davdhacs Mar 31, 2026 https://github.com/stackrox/stackrox/pull/19395/commits/a04654b04e4dae29d07097cc062fc7ff06198df7
2087aec Merge remote-tracking branch 'origin/master' into davdhacs/test-cache… davdhacs Mar 31, 2026 https://github.com/stackrox/stackrox/pull/19395/commits/2087aec9fd2d956c64e3b16196d5cd3411d33b31
Clear filters https://github.com/stackrox/stackrox/pull/19395/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/19395/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/19395/files
https://github.com/stackrox/stackrox/blob/master/.github/CODEOWNERS#L113
.github/actions/cache-go-dependencies/action.yamlhttps://github.com/stackrox/stackrox/pull/19395/files#diff-89b6e576fce993588689a097e8c3b7f028a178aa5db857dc37778de26302c813
View file https://github.com/stackrox/stackrox/blob/2087aec9fd2d956c64e3b16196d5cd3411d33b31/.github/actions/cache-go-dependencies/action.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/stackrox/stackrox/pull/19395/{{ revealButtonHref }}
https://github.com/stackrox/stackrox/pull/19395/files#diff-89b6e576fce993588689a097e8c3b7f028a178aa5db857dc37778de26302c813
Please reload this pagehttps://github.com/stackrox/stackrox/pull/19395/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/19395/files
Please reload this pagehttps://github.com/stackrox/stackrox/pull/19395/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.