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

Download fails when a release is missing binary artifacts #12

Open
straight-shoota opened this issue Apr 22, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@straight-shoota
Copy link
Member

When making a Crystal release, we first tag a commit and publish a release on GitHub. The build pipeline only start after that has happend, and artifacts such as the distribution packages are added as soon as the pipeline has finished. During this time frame, the release has no binary packages attached and install-crystal for latest fails because there's no package to download.

Example: https://github.com/crystal-lang/shards/runs/6133683332

Installing package dependencies
Looking for crystal-lang/crystal-lang release (latest)
sudo -n apt-get install -qy --no-install-recommends --no-upgrade -- libevent-dev libgmp-dev libpcre3-dev libssl-dev libxml2-dev libyaml-dev
Getting Crystal release (1.4.1)
Found Crystal release https://github.com/crystal-lang/crystal/releases/tag/1.4.1

Error: TypeError: Cannot read property 'url' of undefined

The time frame is not that long (it usually takes about 1 hour for the distribution packages to appear), but it's still bad to have all actions during that time. And there could always be unforseeable issues causing delays. So it's better to be safe.

A fix should be relatively easy. If there's no download available, we can circle back and try the second to last release.

@straight-shoota straight-shoota added the bug Something isn't working label Apr 22, 2022
@oprypin oprypin reopened this Apr 26, 2022
@straight-shoota
Copy link
Member Author

Hm, just checking for the number of assets is not very resilient.

install-crystal/index.js

Lines 295 to 297 in f4525e0

if (item["assets"].length < 3) {
continue;
}

There could be some assets, but just the one we're currently looking for might be missing.

My idea would be to refactor the control flow. getLatestTag could return the list of tags and then we iterate until we find one that provides the requested artifact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants