R
Railway•13mo ago
eirk

Config as Code fields null

How do i set a field like restartPolicyMaxRetries to null?
32 Replies
Percy
Percy•13mo ago
Project ID: N/A
eirk
eirk•13mo ago
No description
eirk
eirk•13mo ago
using "null" as the value errors, as well as just plain null
eirk
eirk•13mo ago
No description
eirk
eirk•13mo ago
No description
eirk
eirk•13mo ago
Im curious what the original intention was supposed to be also whats the default value?
Brody
Brody•13mo ago
10, disabling retrying is a different field
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"deploy": {
"restartPolicyType": "NEVER"
}
}
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"deploy": {
"restartPolicyType": "NEVER"
}
}
once restartPolicyType is set to NEVER you just omit the restartPolicyMaxRetries field
eirk
eirk•13mo ago
wheres that documented, or is it not? how would u make it lways restart on crash?
Brody
Brody•13mo ago
every service you have ever created would have shown the default as 10 🤣 set restartPolicyType to ALWAYS pro tip, use a railway.json file with the schema shown above and edit it on an ide that supports validating the document against that schema (vscode)
eirk
eirk•13mo ago
but toml looks nicer 😢
Brody
Brody•13mo ago
i mean 99% of your questions could have been answered with the autocomplete vscode gives you on a json document with a schema
eirk
eirk•13mo ago
what 99% of my questions default value wasnt answered null wasnt answered
Brody
Brody•13mo ago
10 null is a json thing lol the json schema for railway.json allows for null
eirk
eirk•13mo ago
how come the examples deal with toml then also ^
Brody
Brody•13mo ago
already answered the author liked toml, just like you 🤣
eirk
eirk•13mo ago
i tought: ON_FAILURE - restart when the service exits with a non-zero exit code, up to restartPolicyMaxRetries times ALWAYS - restart when the service exits with any exit code, up to restartPolicyMaxRetries times NEVER - dont restart but r u saying that ALWAYS - restart when the service exits with a non-zero exit code, always ?
Brody
Brody•13mo ago
given the fact that the input box disappears when you select always, leads me to believe that its the last option you gave but now that im thinking about it, infinitely restating a service on crash would be kinda pointless
eirk
eirk•13mo ago
i just want concise and precise docs 😭
Brody
Brody•13mo ago
can i ask you a question and not have it sounds rude?
eirk
eirk•13mo ago
yes?
Brody
Brody•13mo ago
genuine question, genuinely curious. you have been in this server for a long time, and have also been using railway for a very long time, so why are you always asking questions like you just started using the platform last week over text this sounds rude, but i promise you i dont mean any ill intent
eirk
eirk•13mo ago
i rarely look at railway docs bc railway is so good that i dont need to make changes to my config, but when i do, i want to be very sure it does what i want it to do here, these config as code changes are something im not familiar bc i last touched them like a year ago
Brody
Brody•13mo ago
i see, thank you
eirk
eirk•13mo ago
i also have high expectations of railway in terms of service, docs, and reliability
Brody
Brody•13mo ago
oh are you on pro?
eirk
eirk•13mo ago
no
Brody
Brody•13mo ago
oh
eirk
eirk•13mo ago
i just mean that i dont expect railway to have major issues or problems with functionality
Brody
Brody•13mo ago
most of their problems are with the builder it seems, i have never had a running service go down where railway was at fault
eirk
eirk•13mo ago
same here, and i continue to expect that from railway
Brody
Brody•13mo ago
well tbh they dont have an SLA so you cant really expect it
eirk
eirk•13mo ago
true
Want results from more Discord servers?
Add your server