Skip to content

Install Subway from acala/subway:v0.1.1 Docker image; set 90s per-upstream timeout#622

Merged
rockbmb merged 8 commits into
masterfrom
subway-released-binary
May 20, 2026
Merged

Install Subway from acala/subway:v0.1.1 Docker image; set 90s per-upstream timeout#622
rockbmb merged 8 commits into
masterfrom
subway-released-binary

Conversation

@rockbmb
Copy link
Copy Markdown
Collaborator

@rockbmb rockbmb commented May 19, 2026

Replaces cargo install --git of Subway across the three CI workflows (ci.yml, update-known-good.yml, update-snapshot.yml) with extraction from the upstream acala/subway:v0.1.1 Docker image, sets a 90s per-upstream request timeout on Subway via AcalaNetwork/subway#203's new request_timeout_seconds config field, and re-enables the Acala test suites that were excluded in #621.

Install method

cargo install --git rebuilt Subway from source on every CI run, ~4 minutes per job. PR #203 added a release workflow that publishes a static musl binary on v* tags, but the v0.1.1 GitHub Release artifact is missing: the release workflow's Build release binary step failed (cargo build --locked mismatched the bumped Cargo.toml version) so the upload step was skipped. The upstream tag still produces a working Docker image because docker.yml doesn't use --locked, so acala/subway:v0.1.1 is the only working consumption path for v0.1.1.

Extracting the binary via docker create + docker cp lands in roughly the same wall time as the curl-and-untar path. If a fresh tag (e.g. v0.1.2) is cut with a working asset, switching back is mechanical.

Per-upstream timeout

Subway's default per-upstream request_timeout is 30s. With three Acala public RPC endpoints, heavy storage queries that take longer than 30s force Subway to cycle through all three (~90s) before any single upstream has time to respond, and the chopsticks-side client times out. request_timeout_seconds is the new field added in AcalaNetwork/subway#203. Setting it to 90s lets one upstream attempt run long enough to complete the query.

Acala re-enabled

With the 90s upstream timeout in effect, the Acala exclusion added to vitest.config.mts in #621 is removed. The remaining exclusion entries (bifrostKusama) stay in place; they're a separate problem (no archive endpoint available at the pinned block).

rockbmb added 3 commits May 19, 2026 23:25
Switches `cargo install --git` to a `curl | tar -xz` of the
released static binary
(https://github.com/AcalaNetwork/subway/releases/tag/v0.1.0,
published by AcalaNetwork/subway#202). Removes the Rust
toolchain install, Subway-HEAD commit-hash lookup, and
Swatinem cache layer that existed only to amortise the
`cargo install` cost — none of them have any other
consumer in this workflow.
…ood.yml`

Same swap as the previous commit, applied to the periodic block-number
update workflow.
…t.yml`

Same swap as the previous two commits, applied to the snapshot-update
workflow.
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good and will improve CI performance and reliability. I have one minor suggestion to make the download step more robust in all three workflow files.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/update-known-good.yml Outdated
Comment thread .github/workflows/update-snapshot.yml Outdated
Without `-f`, an HTTP 4xx/5xx response (e.g. release deleted, GitHub
degraded) leaves `curl` exiting zero with the error body on stdout,
and the downstream `tar -xz` fails with a confusing "not in gzip
format" message instead. Per review on PR #622.
@rockbmb rockbmb self-assigned this May 19, 2026
@rockbmb rockbmb added the ci label May 19, 2026
@rockbmb rockbmb requested a review from xlc May 19, 2026 23:35
rockbmb added 3 commits May 20, 2026 13:12
… image

The `v0.1.1` GitHub Release at AcalaNetwork/subway is missing its
`x86_64-unknown-linux-musl.tar.gz` asset; the release workflow's
`Build release binary` step failed (`cargo build --locked` mismatched
the bumped `Cargo.toml` version), so the upload was skipped. The
upstream tag still produces a working Docker image because
`docker.yml` doesn't use `--locked`, so `acala/subway:v0.1.1` is
the only working consumption path for v0.1.1.

The image's binary lives at `/usr/local/bin/subway` (per Subway's
Dockerfile); copying it out with `docker create` + `docker cp` lands
in roughly the same wall time as the curl-and-untar path and unblocks
consumption of PR #203's `request_timeout_seconds` config field.
Subway's default per-upstream request timeout is 30s. With three Acala
public RPC endpoints, heavy storage queries that take longer than 30s
cause Subway to cycle through all three endpoints (~90s) before any
single upstream has a chance to respond, and the test-side waiting
client times out.

`request_timeout_seconds` was added to `ClientConfig` in
AcalaNetwork/subway#203 (Subway v0.1.1+). Setting it to 90 lets a
single upstream attempt run long enough to complete those queries
instead of being preempted by Subway's own per-endpoint clock.

The companion exclusion of Acala tests in `vitest.config.mts` is
intentionally left in place; this commit only restores Subway's
ability to wait long enough. Lifting the exclusion is a separate
verification step.
@rockbmb rockbmb changed the title Install Subway from upstream v0.1.0 musl release in all CI workflows Install Subway from acala/subway:v0.1.1 Docker image; set 90s per-upstream timeout May 20, 2026
`request_timeout_seconds: 90` on Subway's upstream client (added to
`subway-template.yml` in the previous commit) gives Subway enough
time per upstream attempt for Acala storage queries to land before
the 30s default forced it to cycle endpoints. The exclusion added in
PR #621 is no longer needed and is removed; the exclusion comment is
narrowed to bifrostKusama, which still lacks a workable endpoint set.
@rockbmb rockbmb merged commit 05971d6 into master May 20, 2026
13 checks passed
@rockbmb rockbmb deleted the subway-released-binary branch May 20, 2026 14:04
rockbmb added a commit to rockbmb/runtimes that referenced this pull request May 20, 2026
… image

The `v0.1.1` GitHub Release artifact is missing because the release
workflow's `Build release binary` step failed against a stale
`Cargo.lock`; the upload step was skipped. The Docker image build at
the same tag succeeded (it doesn't use `--locked`), so
`acala/subway:v0.1.1` is the only working consumption path for the
release that includes AcalaNetwork/subway#203's new
`request_timeout_seconds` field, which the next commit relies on.

Mirrors the equivalent change in
open-web3-stack/polkadot-ecosystem-tests#622.
rockbmb added a commit to rockbmb/runtimes that referenced this pull request May 20, 2026
Subway's default per-upstream request timeout is 30s. With three
Acala public RPC endpoints, heavy storage queries that take longer
than 30s cause Subway to cycle through all three (~90s) before any
single upstream has time to respond, and the chopsticks-side client
times out.

`request_timeout_seconds` is the new field added in
AcalaNetwork/subway#203 (Subway v0.1.1+, installed in the previous
commit). Setting it to 90 lets a single upstream attempt run long
enough to complete those queries instead of being preempted by
Subway's per-endpoint clock.

Mirrors the equivalent change in
open-web3-stack/polkadot-ecosystem-tests#622.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants