Skip to content

fix(databases-on-aws): install the DSQL loader on Linux - #291

Open
TheSaiEaranti wants to merge 1 commit into
awslabs:mainfrom
TheSaiEaranti:fix-dsql-loader-linux-musl
Open

TheSaiEaranti wants to merge 1 commit into
awslabs:mainfrom
TheSaiEaranti:fix-dsql-loader-linux-musl

Conversation

@TheSaiEaranti

Copy link
Copy Markdown

On Linux, loader.sh can't install the default latest Aurora DSQL Loader, or any release from v2.0.2 on. It prints "Fetching release information from GitHub..." and exits 1 without saying why, so a load on a Linux machine that doesn't have the loader yet stops there too. macOS works.

Related

No existing issue. I found this while reading the script. The Linux assets switched to musl in aurora-dsql-loader v2.0.2.

Changes

  • detect_platform asked for <arch>-unknown-linux-gnu assets, but every aws-samples/aurora-dsql-loader release from v2.0.2 (2026-02-20) through v3.3.0 publishes its Linux builds only as aurora-dsql-loader-{x86_64,aarch64}-unknown-linux-musl.tar.gz. Linux now looks for the musl asset first and falls back to gnu, so a --version v2.0.0 or v2.0.1 pin (the only gnu releases) still installs.
  • When no asset matched, grep exited 1 inside the download_url=$(...) assignment and set -euo pipefail ended the script before the existing "Could not find download URL for platform" check could run. The assignment now ends with || true, so that message prints.
  • Bumped databases-on-aws to 1.10.1 in the marketplace and both plugin manifests, as fix(databases-on-aws): block psql meta-commands in psql-connect.sh --command #232 did for its psql-connect.sh fix.
  • Added tools/evals/databases-on-aws/dsql/scripts/test_loader_sh.py next to test_safe_query.py, and listed it in tools/evals/databases-on-aws/README.md. It runs loader.sh --install-only --version <tag> with stub uname and curl commands that serve a release's asset list and record which URL the script tries to download:
    • Linux x86_64 and aarch64 on v3.3.0 pick the musl tarball (fails on main, no download is attempted)
    • Linux x86_64 on v2.0.1 picks the gnu tarball (passes on main, and fails without the fallback)
    • macOS arm64 picks the darwin tarball (passes before and after)
    • a release without a Linux asset prints the error and exits 1 (fails on main, which exits 1 without the message)

Verification:

  • uv run --with pytest pytest tools plugins: 137 passed
  • bandit -r . -x ./.tmp,./node_modules: no issues
  • semgrep scan --oss-only --config=tools/semgrep/rules-vendored.yaml: no new findings
  • ruff check and ruff format --check (v0.15.0, as in pre-commit) on the new test, markdownlint-cli2 on the README, dprint check, the lint:manifests ajv checks on the three manifests, and node tools/validate-cross-refs.cjs: clean (the one cross-refs warning, about migration-to-aws, is on main too)
  • Against the live GitHub API, with only uname stubbed as Linux x86_64, the patched script downloaded v3.3.0's aurora-dsql-loader-x86_64-unknown-linux-musl.tar.gz and installed it. file reports ELF 64-bit LSB pie executable, x86-64, ... static-pie linked.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

aws-samples/aurora-dsql-loader has published its Linux builds as
<arch>-unknown-linux-musl since v2.0.2, but loader.sh looked for
<arch>-unknown-linux-gnu assets, so nothing matched. The failing grep
inside the download_url assignment then made set -euo pipefail exit
before the "Could not find download URL" check could report it, so the
script exited 1 without saying why.

Look for the musl asset first and fall back to gnu for releases before
v2.0.2, and let the existing check report a release without a matching
asset. Bump databases-on-aws to 1.10.1 and add a pytest that runs
loader.sh --install-only with stub uname and curl commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant