one of my services is NOT obeying the toml file
curiouskal
PROOP

a month ago

for some reason, one of my services is no longer obeying the toml file. It was working fine earlier in the week.

I have other services that use the exact same toml file and they are working fine.

the toml file has watch paths, but it seems my service is deploying even if its not on the watch path.

$20 Bounty

6 Replies

Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway about 1 month ago


curiouskal
PROOP

a month ago

Here's more. Look at the comparison:

api-server-paid (same railway.backend.toml, working correctly):

15:58 → SKIPPED

15:21 → SKIPPED

15:07 → SKIPPED

14:48 → SKIPPED

api-server-trial (broken):

15:58 → SUCCESS (built when it shouldn't have)

15:48 → REMOVED (it built, then got replaced)

15:46 → REMOVED (it built, then got replaced)

15:21 → REMOVED (it built, then got replaced)

The api-server-paid service correctly shows SKIPPED for all those dashboard-only commits — meaning the watch paths are working perfectly for it. But api-server-trial is building every single time, never skipping.

Also notice the "paired" timestamps — at 15:58:19 both services received the webhook, but api-server-paid correctly skipped while api-server-trial built. Same toml, same repo, same commit — the issue is 100% on Railway's service-level state for api-server-trial.

TOML:

[build]

builder = "RAILPACK"

buildCommand = "pnpm install --frozen-lockfile && pnpm --filter=backend clean && pnpm exec turbo run build --filter=./apps/backend"

watchPatterns = [

"apps/backend/**",

"packages/shared/**",

"turbo.json",

"pnpm-lock.yaml",

"railway.backend.toml"

]

[deploy]

startCommand = "pnpm --filter=backend start:prod"

healthcheckPath = "/health"

restartPolicyType = "ON_FAILURE"

restartPolicyMaxRetries = 3


you named it railway.backend.toml, by default railway is looking for railway.toml file, can you check on the service settings if the Code-as-Config file is pointing to that file, also do you have root directory specified on your service settings?


curiouskal
PROOP

a month ago

I went through those steps you mentioned:

  • re-selected railway.backend.toml on the settings of that service.
  • i even disconnected the autodeploy from github and reconnected.

This seems to be a Railway platform issue isolated to that one service instance. The watch-path logic is working for every other service but broken for api-server-trial.

Regarding the naming of the toml file, it works for 3 other services using the exact same toml file (railway.backend.toml).

Regarding root directory, it is not specified on any of the four services that all use the same toml file, and 3 of the 4 are working fine.


a month ago

I've seen issues like these, especially for watch paths, that I resolved by specifying an absolute path from the repo root, i.e. /path/to/railway.json instead of path/to/railway.json.

I'm not sure if this actually matters, and maybe the update cleared some bad state in my case, but it's worth a shot anyway, I think.


curiouskal
PROOP

a month ago

ok so now the skip build/deployment seems to be getting respected ( i havent made any changes to the toml file or path or name).

BUT i did notice that on this api-server-trial, when its watch path does have a change - it tries to build and deploy TWO commits (the current/latest one, and the previous one). they both succeed and then the older one is removed.

Very bizarre confusing stuff going on.

image.png

Attachments


curiouskal

ok so now the skip build/deployment seems to be getting respected ( i havent made any changes to the toml file or path or name). BUT i did notice that on this api-server-trial, when its watch path does have a change - it tries to build and deploy TWO commits (the current/latest one, and the previous one). they both succeed and then the older one is removed. Very bizarre confusing stuff going on. ![image.png](https://station-server.railway.com/attachments/att_01ktmmadjbeh1vw0pmvnnyahtv)

curiouskal
PROOP

a month ago

Is there any staff at Railway that can answer this issue definitively and fix it?

I really dont want to delete the service and recreate it because I already have other dependencies looking for this service's url/etc


Welcome!

Sign in to your Railway account to join the conversation.

Loading...