-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Release | Crates.io
in CD pipeline doesn't handle cargo publish
errors
#538
Comments
Still is still the case, despite my attempted fix. Possibly my fix was still wrong, or maybe edit: Here's a run that has lots of errors in the |
Just a guess: the shell steps in GitHub actions do not exit properly. I haven't looked at the pipeline yet, but we can try to I will come up with a pull request after experimenting a bit. |
According to this document |
Thank you, @hendrikmaus! I don't have any more insight, unfortunately. The exit code must get swallowed somewhere, but no idea where specifically. |
I confirmed that the piece of code referenced in the description is the culprit: it does not fail if the command executed returns non-zero. I was under the impression that it would, because the I will take a closer look at it. Already built myself a simulation to reproduce the error. |
According to the documentation, it only returns an I'm very surprised by this. Seems like a huge oversight for a library whose sole purpose is to do this kind of thing. And one at a version >1.0.0 no less. Honestly, this makes me wonder if we shouldn't just stop using it. The standard library might be less convenient, but at least it returns
Thank you! |
I'm working on publishing the next release right now. I'll take a stab at fixing this, in case that turns out relatively straight-forward. If not, I'll leave it for now. Sorry, if that conflicts with some of the work you're doing, @hendrikmaus. |
Fixed in #834! This build failed correctly: https://github.com/hannobraun/Fornjot/runs/7388995951?check_suite_focus=true |
Nice, I was going to submit something quite similar. You beat me to it 😊 |
I think the output already is continuous? At least it should be. |
You are correct; I was overthinking it and did not see that Good job! |
Thank you! |
See this run, which has lots of errors: https://github.com/hannobraun/Fornjot/runs/6311042754?check_suite_focus=true#step:9:76
If a
cargo publish
fails, the whole step should fail. Maybe it would even be better to abort the step, if a singlecargo publish
fails.Crate::submit
inrelease-operator
seems to be the relevant piece of code:https://github.com/hannobraun/Fornjot/blob/6df520ae30c2202c381b7cde8489621d0e67d5f4/tools/release-operator/src/registry.rs#L152-L180
I'm not seeing any checking of the command's return value there, so adding that and failing the whole
release-operator
, ifcargo-publish
fails, would probably address this issue.The text was updated successfully, but these errors were encountered: