Skip to content

Warn on config pull when the installed SDK runner is outdated#1003

Open
futurepastori wants to merge 2 commits into
masterfrom
victor/warn-outdated-iac-runner
Open

Warn on config pull when the installed SDK runner is outdated#1003
futurepastori wants to merge 2 commits into
masterfrom
victor/warn-outdated-iac-runner

Conversation

@futurepastori

@futurepastori futurepastori commented Jul 8, 2026

Copy link
Copy Markdown
Member

Closes the loop on the enterprise report "volumes listed in resources but no generated volume(...) declaration", reproduced on CLI v5.23.3 — a version that already contains the volume rendering fix (#989).

Root cause

Not the renderer: a new regression test in this PR proves render_graph_as_railway_ts correctly declares and references volumes across the suspect shapes (volume name colliding with service name, database volumes, unattached volumes). Not the SDK graph (volumes emitted since v3.4.0) or backboard serialization either.

The failure is version skew with no handshake: every railway config command executes whichever railway package the project has installed (resolve_runner → project node_modules), config init never installs or pins it, and a pre-3.4.0 runner emits volume-less graphs that the CLI renders without any hint that resources were dropped. The same skew can silently mis-diff plan/stage/apply.

Fix

Companion SDK PR (railwayapp/railway-ts-sdk#45) stamps every runner response with sdkVersion. This PR checks it on every runner invocation (pull, plan, stage, apply, current) and warns when the field is absent — which precisely identifies every pre-handshake SDK. Printed once per invocation, on stderr so --json output stays clean:

Warning: You are running an outdated version of the railway SDK, which may result in undesired behavior. Upgrade it with npm install railway@latest.

Also adds the previously-missing renderer regression test and a response-deserialization test for the new field.

🤖 Generated with Claude Code

A customer on CLI v5.23.3 (which contains the volume rendering fix from
#989) still pulled configs with volumes missing. The renderer, the SDK
graph, and the server serialization all handle volumes; the failure is
version skew: config pull runs the project-installed railway SDK, and
pre-3.4.0 versions emit volume-less graphs with nothing flagging the
omission.

railway-ts-sdk now stamps every runner response with sdkVersion; pull
warns when the field is absent (any pre-handshake SDK) so silent
resource dropout becomes a visible upgrade prompt. Also adds the
missing renderer regression test covering volume declarations,
name collisions, database volumes, and attachments.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@futurepastori futurepastori added the release/patch Author patch release label Jul 8, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/patch Author patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant