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

Builds: Fail binary installations (ark, kallichore, pet) if no data received #6672

Open
jmcphers opened this issue Mar 6, 2025 · 0 comments
Labels
area: builds Issues related to Builds category.

Comments

@jmcphers
Copy link
Collaborator

jmcphers commented Mar 6, 2025

This was found in the logs, with a whole bunch of failures later:

No locally built Ark found in /home/runner/work/positron/ark; checking downloaded version.
package.json version: 0.1.170 
Downloaded ark version: Not found 
Using Github PAT from environment variable POSITRON_GITHUB_PAT.
Downloading Ark 0.1.170 from https://api.github.com/repos/posit-dev/ark/releases/assets/233347570...
Successfully downloaded Ark 0.1.170 (0 bytes).
Successfully unzipped Ark 0.1.170.

If no data is received, we should not treat the binary download as successful, even if the download reports a successful HTTP status and unzip doesn't complain.

@jmcphers jmcphers added the area: builds Issues related to Builds category. label Mar 6, 2025
jmcphers added a commit that referenced this issue Mar 7, 2025
This change addresses an issue observed in builds in which problems
downloading our binary dependencies do not necessarily cause the build
to fail. Instead, the build "succeeds" but the product is broken because
the dependencies are missing.

The fix is to add more error handling to the download scripts:

- make sure we got a 200 status code on our final request for the binary
data (after following 302 redirects)
- make sure we got a reasonable-looking amount of data for the asset

Addresses #6672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: builds Issues related to Builds category.
Projects
None yet
Development

No branches or pull requests

1 participant