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

sync file timestamps for module bundle #2430

Merged
merged 2 commits into from
Sep 17, 2022

Conversation

bcressey
Copy link
Contributor

Issue number:
Fixes #2429

Description of changes:
Avoid spurious rebuilds by syncing the bundle's timestamp with the input file.

Also, replace all unwrap() calls with structured errors that have context-specific messages.

Testing done:
Repeated cargo make invocations no longer cause an unnecessary rebuild.

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>
Otherwise `cargo` will detect that the file is newer than the output
log, and always rebuild.

Signed-off-by: Ben Cressey <bcressey@amazon.com>
@bcressey bcressey requested review from jpmcb and etungsten September 16, 2022 05:41
@bcressey bcressey changed the title Go mod time sync file timestamps for module bundle Sep 16, 2022
@bcressey bcressey merged commit da0bdb5 into bottlerocket-os:develop Sep 17, 2022
@bcressey bcressey deleted the go-mod-time branch September 17, 2022 05:17
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.

oci-add-hooks and hotdog are always rebuilt
5 participants