Been regularly receiving "Failed to stream build logs" errors when running railway up in Githhub Actions

gunnarholwerda
PRO

a year ago

Hello, I deploy to railway by running railway up for each of my services within a GitHub action (see code snippet below).

I have noticed that I've been getting an intermittent failure of this job with the error of "Failed to stream build logs: Failed to retrieve build log". I did a little digging into the GitHub repo and seems like this is a failure that comes from when creating the GraphQL subscription. I'm wondering if there is something I can/should do to make this more reliable?

I'm installing the cli through bash with the cli.new method.

Thanks!

- name: Deploy to ${{ inputs.environment }} ${{ inputs.service-name }}
  env:
    RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
  run: |
    railway up --environment ${{ inputs.environment }} --service ${{ inputs.service-name }}
Solved

14 Replies

a year ago

Hello,

What CLI version is being installed?


Status changed to Awaiting User Response Railway 11 months ago


gunnarholwerda
PRO

a year ago

It's using version
v3.13.0


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

Your RAILWAY_TOKEN is a project token, correct?


Status changed to Awaiting User Response Railway 11 months ago


gunnarholwerda
PRO

a year ago

Yeah, I have two tokens. One for the staging environment and another for the prod environment. I get this issue when deploying to either environment in the project.


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

Is this intermittent? When was the last time this has happened?


Status changed to Awaiting User Response Railway 11 months ago


gunnarholwerda
PRO

a year ago

Yeah it's intermittent. It happened twice this morning. Once within the last hour


Status changed to Awaiting Railway Response Railway 11 months ago


gunnarholwerda
PRO

a year ago

Just happened again on my staging environment.


Hey! Do you have timestamps we can look at?


Status changed to Awaiting User Response Railway 11 months ago


gunnarholwerda
PRO

a year ago

For sure. Here are the three builds it's happened that I've noticed on so far:

  • Sep 16 08:42:30

  • Sept 16 09:34:59

  • Sept 13 10:45:18

All times are Pacific time


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

I've seen this before. Filed on GitHub

https://github.com/railwayapp/cli/issues/543


Status changed to Awaiting User Response Railway 11 months ago


gunnarholwerda
PRO

a year ago

Yeah, that’s what I was thinking. I just didn’t know if it was a race condition in the CLI, like it triggers the deploy but checks before that actually completes. Or more in the platform as it gets triggered but doesn’t transition state before the CLI comes back around to get the build logs.


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

Definitely a timing issue here, in the mean time, perhaps you could use the --detach flag?


Status changed to Awaiting User Response Railway 11 months ago


gunnarholwerda
PRO

a year ago

Well the bummer is I flipped over to streaming because I wanted to send a custom slack notification once all my triggered deploys were finished and run a quick smoke test.

I’ll probably just keep it how it is and just take a look if I see a failure. It’s been rather intermittent. If I had the time and knew rust a bit better I would try to figure out what was going on haha.


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

Indeed sorry about that. We'll close this thread out for now and keep track of it on the GitHub issues page.


Status changed to Awaiting User Response Railway 11 months ago


Status changed to Solved jake 11 months ago