Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[User Interview] railway up default behavior #468

Closed
JakeCooper opened this issue Nov 16, 2023 · 16 comments
Closed

[User Interview] railway up default behavior #468

JakeCooper opened this issue Nov 16, 2023 · 16 comments

Comments

@JakeCooper
Copy link
Contributor

Suggestion

railway up - exit 0/1 for success/failed deploy
railway up --tail - holds for logs
railway up --detach - detaches immediately

Why

This allows CI to actually invoke the CLI and pass the correct exit code to the CLI to pass/fail CI

@alexng353
Copy link
Contributor

Good. Also allow user to globally set default (railway config --global up.finish=exit|tail|detach)

@brody192
Copy link
Contributor

brody192 commented Nov 18, 2023

I would like the defaults to stay as they are, I don't think its a good idea to change the default behavior, additional behavior should be a flag, with that said I would like a --wait or --report-ci flag, that waits for a the deploy to either fail or succeed without logs, then exits accordingly

@emilioschepis
Copy link

I'm also interested in this feature, I think it could be useful to have a good CI pipeline through services like GitHub Actions.

I don't know Rust that much, but I started working on a draft implementation for this. However looking at the subscription for build/deploy logs here I think that function will never return (it continuously waits on the next log).

Through the GraphiQL playground I also saw that there is no subscription for the deployment status, only a query (please correct me if I'm wrong) so I'm not really sure on how to approach this.

Thanks!

@brody192
Copy link
Contributor

it would likely need to be achieved by polling for the deployment status, the same way that the dashboard does it

@maddsua
Copy link
Contributor

maddsua commented Jan 19, 2024

That's literally what the cli currently does:

loop {

@maddsua
Copy link
Contributor

maddsua commented Jan 19, 2024

I see a bigger problem in deciding which arguments set to choose. I'd like to modify initial proposal to look like this:

  • railway up - wait until build finishes, stream build logs
  • railway up --detach - leave it as it is (detach immediately after upload is complete)
  • railway up --tail - stream all logs and only detach on build/critical runtime error (current default behavior)

@maddsua
Copy link
Contributor

maddsua commented Jan 19, 2024

Guys I really wanna this resolved as it's one of those features that are not too hard to get done and it would greatly improve DX

@alexng353
Copy link
Contributor

Guys I really wanna this resolved as it's one of those features that are not too hard to get done and it would greatly improve DX

lol cli development is pretty slow right now. If you guys come to a resolution for how you want to do it, I will make some time to PR some changes.

@maddsua
Copy link
Contributor

maddsua commented Jan 19, 2024

One more idea: we could add a little notification about default behavior being changed right into the cli. Also add a lil counter to show that for the first five runs only

@maddsua
Copy link
Contributor

maddsua commented Jan 21, 2024

Also, most CICD envs set an env variable and we could detect that

@maddsua
Copy link
Contributor

maddsua commented Jan 21, 2024

Anyway, here it is: #477

@mattrossman
Copy link

This would be very helpful for our CI/CD pipeline on GitLab. We have followed the official guide "Using GitLab CI/CD with Railway" which recommends using the -d option on railway up, thus we always see jobs succeed in CI even when the build fails on Railway.

@maddsua
Copy link
Contributor

maddsua commented Feb 28, 2024

#477 kinda solves this, we just need to decide on what to call the flag and we're basically done here

@mattrossman
Copy link

railway up --ci is short and sweet.

I'm coming from the Node.js ecosystem which has npm ci (technically "clean install" but doubles as "continuous integration" in practice) and jest --ci for precedent.

@maddsua
Copy link
Contributor

maddsua commented Feb 29, 2024

Also can we please have a release so that I can finally use the damn docker image instead of running install script on each deploy? I could've just published the image myself, but having it not coming from railway will only complicate things down the road

@maddsua
Copy link
Contributor

maddsua commented Oct 27, 2024

Guys, we can close this since it was resolved by #477 and #537

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants