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

Release automation can fail, because just-published crate is not found #788

Closed
hannobraun opened this issue Jul 7, 2022 · 6 comments · Fixed by #814 or #843
Closed

Release automation can fail, because just-published crate is not found #788

hannobraun opened this issue Jul 7, 2022 · 6 comments · Fixed by #814 or #843
Labels
topic: build Anything relating to the build system. type: development Work to ease development or maintenance, without direct effect on features or bugs

Comments

@hannobraun
Copy link
Owner

Check out this run of the CD pipeline: https://github.com/hannobraun/Fornjot/runs/7235683927?check_suite_focus=true

fj is being published successfully, but right after, fj-host fails, because it can't find fj. I suspect this is due to caching on crates.io.

I'm not sure what the best way to fix this is, but here are some ideas:

  • Wait for a short delay after publishing a crate.
  • After publishing a crate, query crates.io until it is available.
  • Retry after a short delay, if publishing a crate fails.
  • Retry if cargo publish fails for this specific reason
@hannobraun hannobraun added type: development Work to ease development or maintenance, without direct effect on features or bugs topic: build Anything relating to the build system. labels Jul 7, 2022
hannobraun added a commit that referenced this issue Jul 7, 2022
The last run partially failed because of #788.
hannobraun added a commit that referenced this issue Jul 7, 2022
The previous one failed again, due to #788.
@hannobraun
Copy link
Owner Author

Here's the same thing happening again: https://github.com/hannobraun/Fornjot/runs/7235972641?check_suite_focus=true

This seems to be a common occurrence, which makes this issue a high priority.

hannobraun added a commit that referenced this issue Jul 7, 2022
@hannobraun
Copy link
Owner Author

And another one: https://github.com/hannobraun/Fornjot/runs/7236214289?check_suite_focus=true

This absolutely needs to be fixed before the next release.

@hendrikmaus
Copy link
Contributor

I would propose to go with the option "After publishing a crate, query crates.io until it is available."

I think it is the cleanest approach.

I will open a pull request with a fix.

@hendrikmaus
Copy link
Contributor

FYI: it is a known issue rust-lang/cargo#9507

@hannobraun
Copy link
Owner Author

I would propose to go with the option "After publishing a crate, query crates.io until it is available."

I think it is the cleanest approach.

I agree.

I will open a pull request with a fix.

Thank you!


By the way, I know I said this absolutely needs to be fixed before the next release, but... I changed my mind 😄

This issue is very annoying, but it is not critical. It just makes the release take more time. #538 on the other hand is critical, as it could cause problems to be missed completely. So fixing #538 is actually more important, and we might want to keep this issue around as a ready source of errors to test fixes to #538 with.

@hannobraun
Copy link
Owner Author

This issue has not been fixed, unfortunately!

image

From here: https://github.com/hannobraun/Fornjot/runs/7389324150?check_suite_focus=true

Seems like the behavior of crates.io is less rational than we expected. I think that makes "retry publish until it works" the best option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: build Anything relating to the build system. type: development Work to ease development or maintenance, without direct effect on features or bugs
Projects
None yet
2 participants