Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to figure out what breaks cached builds #65

Closed

Conversation

bcressey
Copy link
Contributor

@bcressey bcressey commented Aug 2, 2024

Issue number:
N/A

Description of changes:
Not for merging - trying to see why cargo is unhappy reusing builds from the cache.

Testing done:
😬

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Signed-off-by: Ben Cressey <bcressey@amazon.com>
@bcressey
Copy link
Contributor Author

bcressey commented Aug 5, 2024

There are at least two problems here.

The first is that the fingerprints in the cache don't match the fingerprints that cargo generates, and some files seem to be missing:

# from cache
target/x86_64/debug/.fingerprint/microcode-203e868d1235a310
target/x86_64/debug/.fingerprint/microcode-3d5c23d8c6a2f178
target/x86_64/debug/.fingerprint/microcode-82b3ac875abbc53a

# cargo output
target/x86_64/debug/.fingerprint/microcode-203e868d1235a310/build-script-build-script-build
target/x86_64/debug/.fingerprint/microcode-06259485b1fc1ba5/run-build-script-build-script-build
target/x86_64/debug/.fingerprint/microcode-79bfebf693197603/lib-microcode

The second is that the mtime is reset for all files to the time of the clone:

  File: packages/microcode/latest-upstream-tags.sh
  Size: 355       	Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d	Inode: 9300713     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: ( 1000/  runner)   Gid: ( 1000/  runner)
Access: 2024-08-02 21:43:03.524858363 +0000
Modify: 2024-08-02 21:43:03.524858363 +0000
Change: 2024-08-02 21:43:03.524858363 +0000
 Birth: 2024-08-02 21:43:03.524858363 +0000

@bcressey bcressey closed this Aug 5, 2024
@bcressey bcressey deleted the cache-invalidation branch August 5, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant