You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blocker: no. This can wait. Do fix step 6 in the same release as the monitoring agent (#26 to #30).
Defect
The script does not use set -euo pipefail.
curl -s does not use -f. On a 404 error, the script saves the error page as the tarball. Then, the script shows "Failed to extract". This message does not tell the real cause.
The script runs apt-get install grep without apt-get update. GNU grep on Ubuntu always supports -P. Thus, this step is not necessary.
When the script stops because of a rate limit, it does not remove its temporary file.
The script uses grep to parse JSON.
The script does not compare the download with a checksum.
On a server with the monitoring agent, /usr/local/bin/fly is a link to ~fly/.fly/bin/fly. The script moves the new binary to /usr/local/bin/fly. mv replaces the link with a separate file.
Cost
Some errors show an incorrect cause. Thus, installation problems are hard to find.
A command that fails does not always stop the script.
On a server with the agent, the server then has two binaries. fly update updates the separate file, and the agent continues with the old binary.
Benefit of the fix
Each error stops the script with a correct message.
Blocker: no. This can wait. Do fix step 6 in the same release as the monitoring agent (#26 to #30).
Defect
set -euo pipefail.curl -sdoes not use-f. On a 404 error, the script saves the error page as the tarball. Then, the script shows "Failed to extract". This message does not tell the real cause.apt-get install grepwithoutapt-get update. GNU grep on Ubuntu always supports-P. Thus, this step is not necessary.grepto parse JSON./usr/local/bin/flyis a link to~fly/.fly/bin/fly. The script moves the new binary to/usr/local/bin/fly.mvreplaces the link with a separate file.Cost
fly updateupdates the separate file, and the agent continues with the old binary.Benefit of the fix
Fix
set -euo pipefail.curl -fsSLfor each download.grep -Pinstallation step.trapthat removes the temporary files.checksums.txt(refer to enhancement: Examine release downloads with checksums #9). ci: run make check on every change and publish releases with gh #25 publishes it./usr/local/bin/flyis a link, install to the target of the link, and keep the owner of the target.Why this can wait