a month ago
While running automated tests for deploying Railway apps via Wasp's CLI, I've come to experience a bit of flakiness with the following command railway add -d postgres.
Wasp CLI creates a server, client and the DB service. Let me share you one failure instance:
This Github Action fails
Expand the "Deploy app to Railway"
You'll find the
railway add -d postgrescommand on line 94The smoke test fails becuase the database
Postgresis never created - check the created project here: https://railway.com/project/2959f442-26fb-4db3-a9a1-45b0bfb9b55c?environmentId=e6ab4430-b364-46eb-b21d-1cc0f80a6cd7
I guess I'm trying to report this as a bug/flakiness but also trying to better understand how I defend against this? Should I create a Github issue with this?
cc: <@539512869780455445> as our usual savior 😄
15 Replies
a month ago
Where can I find the yaml file for that action?
Here's the YAML file with the relevant line here: https://github.com/wasp-lang/wasp/blob/71afd0d24173c44d4c58856f16383c25befe0cf5/.github/workflows/ci-deploy-test.yaml#L129
If you are also interested how does Wasp CLI invoke Railway CLI with the DB command: https://github.com/wasp-lang/wasp/blob/71afd0d24173c44d4c58856f16383c25befe0cf5/waspc/packages/deploy/src/providers/railway/commands/setup/setup.ts#L123
a month ago
Thank you, how can I see what the railway add -d postgres command failed with?
That's the thing - it didn't fail since this call await railwayCli(["add", "-d", "postgres"]); throws if the command exits with code 1
For example, if I modify the command to be railway add -d postgrex (x instead of s) it would fail like this:
...
🚀 Setting up database
$ railway add -d postgrex
error: invalid value 'postgrex' for '--database '
[possible values: postgres, mysql, redis, mongo]
tip: a similar value exists: 'postgres'
For more information, try '--help'.
🚀 error: invalid value 'postgrex' for '--database '
🚀 [possible values: postgres, mysql, redis, mongo]
🚀
🚀 tip: a similar value exists: 'postgres'
🚀
🚀 For more information, try '--help'.
🚀
🚀 at Proxy.set (/Users/ilakovac/dev/wasp/waspc/data/packages/deploy/node_modules/zx/build/core.cjs:277:18)
🚀 exit code: 1
❌ --- [Error] Deploy command failed: ---------------------------------------------
Deploy command failed with exit code: 1The command in the CI didn't fail, it looked like it succeeded but no service was created. That's why I'm asking for some insight 🙂
a month ago
Can you give me the exact timestamp (in UTC) for that command that you linked in the original action logs, and the user UUID that the token belongs to?
User UUID (got it from the Network tab):
6b0344d3-105e-4a05-aa43-d813943471e3
Exact timestamp:
2025-11-10T14:07:54.8152681Z $ railway add -d postgres (raw Github Action logs)
Project name:
ci-19234193478
Thanks @Brody
a month ago
im quite confused as to how this just is silently failing. the add command has pretty extensive error handling. ill take a proper look in about an hour when im at my computer
a month ago
does it always fail?
a month ago
or is this more random
It fails sometimes, as I said in the title, I'd call it flaky based on how it fails sometimes 🙂
a month ago
interesting. I’m gonna add a verbose option to the command which should be cut in a release soon 🙂
a month ago
https://github.com/railwayapp/cli/pull/692 pr has been made, introduces very basic verbose logging for the deployment of templates
15 days ago
hi @miho, can you upgrade to railway v4.12.0 and pass --verbose to the add command and see what it prints?
7 days ago
have you seen it fail yet?