5 months ago
Hello there! I've a workflow file for github actions:
name: Version Management
on:
push:
branches: master
pull_request:
branches: master
jobs:
update-version:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
ref: ${{ github.sha }}
- name: Get version from tag
run: |
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")
echo "VERSION=$TAG" >> $GITHUB_ENV
- name: Install Railway CLI
run: npm install -g @railway/cli@latest
- name: Update Railway env var
env:
RAILWAY_SERVICE_ID: ${{ secrets.RAILWAY_SERVICE_ID }}
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
VERSION: ${{ env.VERSION }}
run: |
railway variables --set "VERSION=$VERSION" --service "$RAILWAY_SERVICE_ID"
It was working since 3 weeks ago. Now i did another deployment and i saw this error message:
Run railway variables --set "VERSION=$VERSION" --service "$RAILWAY_SERVICE_ID"
railway variables --set "VERSION=$VERSION" --service "$RAILWAY_SERVICE_ID"
shell: /usr/bin/bash -e {0}
env:
VERSION: 0.20.5
RAILWAY_SERVICE_ID: ***
RAILWAY_TOKEN: ***
Failed to fetch: error sending request for url (https://backboard.railway.com/graphql/v2)
Caused by:
0: error sending request for url (https://backboard.railway.com/graphql/v2)
1: operation timed out
Error: Process completed with exit code 1.
Edit 1:
Using railway variables --set ... locally it works.
Edit 2:
I noticed that by unchecking the "Wait for CI" toggle, it actually works. You can see from the screenshot below that it actually bumped the version:
I think the only problem is that the cli is returning a timeout error, so my workflow actually fails on github actions.
12 Replies
5 months ago
Hi there, is this happening intermittently or are you running into the exit code every time you have "Wait for CI" toggle checked? Just gathering information so we're able to reproduce and debug this. Another thought, you could possibly add retry logic to see if that allows the workflow to succeed
Status changed to Awaiting User Response Railway • 5 months ago
5 months ago
Hello there! I already tried adding a retry logic but it didn't work. It actually seems that i get the error EVERYTIME i deploy and the workflow file runs. Hear me out, it's not certainly a critical issue, if i toggle off the "Wait for CI" setting, it deploys correctly. But i don't like the fact that it's making the job marked as failed on github. By answering your question: no, it's not happening intermittently, it's happening everytime. But that's weird as i said because it was working great few weeks ago. Now i get timeout error instead.
Status changed to Awaiting Railway Response Railway • 5 months ago
5 months ago
Just to check, this only times out in CI right? Can you let us know what the timeout is inside of CI (like, how long it takes for it to timeout)?
Status changed to Awaiting User Response Railway • 5 months ago
4 months ago
Sorry for the late reply. Exactly, it times out only in the CI. I attached a screenshot of the action:
It seems it timeouts after 30 seconds.
Attachments
Status changed to Awaiting Railway Response Railway • 4 months ago
4 months ago
Hello,
Can you please try skipping the deploys when setting variables?
https://github.com/railwayapp/cli/releases/tag/v4.5.6
Status changed to Awaiting User Response Railway • 4 months ago
4 months ago
What do you mean? I don’t understand. Currently I disabled the “wait for GitHub action” in deploy settings, so it deploys even if the action fails (which it does).
Status changed to Awaiting Railway Response Railway • 4 months ago
4 months ago
In 4.5.6 we've added a --skip-deploys flag for railway variables which should help with this
Status changed to Awaiting User Response Railway • 4 months ago
Status changed to Awaiting Railway Response Railway • 4 months ago
4 months ago
Gotchya. Can you then create an issue on the github repo? We track CLI issues over there
Status changed to Awaiting User Response Railway • 4 months ago
4 months ago
Alright, I'll do
Status changed to Awaiting Railway Response Railway • 4 months ago
4 months ago
Before opening an issue. Isn't this related to this issue?
https://github.com/railwayapp/cli/issues/640
Status changed to Awaiting User Response Railway • 4 months ago
4 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 4 months ago
