Skip to content

[Caching] Make ActionCache update failure non-fatal temporarily #79931

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

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

cachemeifyoucan
Copy link
Contributor

Temporarily make action cache update non-fatal and not failing the job. The action cache update failure can happen due to cache poisoning from non-deterministic compiler output. Assume the errors from the non-determinism is benign and can be ignored till all issues are resolved.

rdar://146780363

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

ping

Copy link
Contributor

@benlangmuir benlangmuir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change LGTM, but would like a swift person to confirm use of errs() here is acceptable.

@cachemeifyoucan
Copy link
Contributor Author

@artemcm @tshortli Throwing an error message that can't be sent to DiagnosticsEngine to stderr is fine to your eyes? It is unfortunately that we can't surface this properly but this should be a really rare error that user can't really fix.

@tshortli
Copy link
Contributor

@artemcm @tshortli Throwing an error message that can't be sent to DiagnosticsEngine to stderr is fine to your eyes? It is unfortunately that we can't surface this properly but this should be a really rare error that user can't really fix.

Seems ok to me!

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@akyrtzi
Copy link
Contributor

akyrtzi commented Mar 13, 2025

How does this interact with the mechanism to run the compile twice and fail the build if there are non-determinism issues, will this change prevent that mechanism from working?

@cachemeifyoucan
Copy link
Contributor Author

How does this interact with the mechanism to run the compile twice and fail the build if there are non-determinism issues, will this change prevent that mechanism from working?

The swift deterministic check actually doesn't use caching. Maybe I should introduce a new version that checks from caching so there are no false positives from files changing on disk.

@akyrtzi
Copy link
Contributor

akyrtzi commented Mar 13, 2025

Would it be useful to have a way to bring back the error instead of ignoring, maybe via an environment variable?

@cachemeifyoucan
Copy link
Contributor Author

Would it be useful to have a way to bring back the error instead of ignoring, maybe via an environment variable?

Not currently. I don't see using this error message for deterministic output check at all.

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test windows platform

@akyrtzi
Copy link
Contributor

akyrtzi commented Mar 13, 2025

Would it be useful to have a way to bring back the error instead of ignoring, maybe via an environment variable?

Not currently. I don't see using this error message for deterministic output check at all.

We may not have a direct use right now, but it's simple to add for future-proofing. E.g. possibly in the future we take care of the non-determinism issues and we want to try making it back to an error for some internal CI.

Temporarily make action cache update non-fatal and not failing the job.
The action cache update failure can happen due to cache poisoning from
non-deterministic compiler output. Assume the errors from the
non-determinism is benign and can be ignored till all issues are
resolved.

rdar://146780363
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan cachemeifyoucan merged commit 42cbf86 into swiftlang:main Mar 14, 2025
3 checks passed
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.

4 participants