-
Notifications
You must be signed in to change notification settings - Fork 47
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
Abort on indeterminstic checkout #623
base: master
Are you sure you want to change the base?
Abort on indeterminstic checkout #623
Conversation
Bob handles situations where the checkout step hash was predicted but the actual checkout yielded another result by restarting the build. While this case may indeed happen for indeterministic checkouts, it is an error if it happens for officially stable checkouts. So instead of restarting the build, give an error message. The user should probably fix the recipe. Halting the build at this stage makes the analysis easier.
Make sure the build stops if predicted sources of deterministic checkouts do not match.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #623 +/- ##
=======================================
Coverage 88.94% 88.95%
=======================================
Files 48 48
Lines 15616 15618 +2
=======================================
+ Hits 13890 13893 +3
+ Misses 1726 1725 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks. I'm wondering if there should be a command line argument or a policy to disable this abort? Otherwise it might break existing builds as the warning might not have been recognized before. |
You can always restart the build manually. So this is not a permanent error and you should still be able to build projects that trigger this error. Or do you mean that we should suppress even that and optionally support the old behaviour? |
We have a (known broken but god given) CI Setup. Bob build runs in a container without persistent storage and with not enough resources for a complete build. This only works because we have the cache - so we can (automatically) retry the build several times.... |
I see. Thanks for the explanation. Then a new policy is probably needed, I guess... |
🤔 for our current releases we can also use an older bob version without the abort. |
Usually, this is something that we should avoid. Taken to it's logical end, we would not even need policies. Just use the right Bob version for the project. But this is a usability nightmare. My goal is that older projects work with newer Bob versions. We might break something by accident but that should happen rarely.
That could turn out to be tricky. We fully allow the user to tinker with the sources. The check that I patched here is only running when the sources have been checkout out initially, which is the only safe state for such a check. But you will only ever notice the problem when artifacts were uploaded. To make it even worse, even if we would introduce something like |
No description provided.