Error on environmentCreate GraphQL Mutation
Hi,
I have a Github Action that deploys PRs to Railway. It's based on https://github.com/Faolain/railway-pr-deploy with some changes that I made.
It has been working great up until the last week or so, it appears as if something changed with the API, and ever since I'm getting the following error:
If it matters, I'm using a global token (ie from my account settings, not a project settings).
Would appreciate any help with this!
GitHub
GitHub - Faolain/railway-pr-deploy
Contribute to Faolain/railway-pr-deploy development by creating an account on GitHub.
29 Replies
Project ID:
b880d42a-b80e-4f1e-b8f1-75cdd868eef0
b880d42a-b80e-4f1e-b8f1-75cdd868eef0
Hi team, is there any preferred method to ask these kind of questions?
are you sure you have access to the source repo of the service?
Hey Brody, thank you for your reply. Honestly I'm a little confused about who's the "user" in this case, that's supposed to have access.
The GraphQL API request is initiated by Github Actions through a workflow that has access to the repo. The GraphQL API request is using a Railway token so I don't think that has anything to do with the "repo".
But perhaps the confusion is over what "repo" the error is referring to? Is it the github repo? some kind of docker repo? something else?
Also keep in mind this entire setup has worked as-is until sometime in the afternoon hours (EDT) on Aug 14th.
what env should i be looking at?
One sec let me find the right one
The last error I had was for
pr-331
both of these services are deployed from a github repo
do you have access to that repo?
Yes I'm the owner of that repo
who's acccount token was used
I also see railway connected on the github menu
So the GraphQL API request was done using my personal railway auth token
And seems like the railway integration also retains access so on that front I guess we're okay?
does it have access to that specfic repo?
Yes
Double checked
I guess I can remove the integration, reinstall it and retry if you think that might help?
i'm not saying we deprecated anything, but that action does use unintended mutations, you would want to contact the author of that action and ask then to update it
I already forked it since he's unresponsive. I can make the necessary changes, what are the unintended mutations?
(also if thre's a more "official"/"stable" alternative for creating envs from github actions I'd definitely prefer to use that than rolling my own 😅 )
its not something railway supports at this time
but as for the correct mutations.
open your project, open the dev tools.
go through all the actions to create a pr env in the ui with all the needed variables and then just take all the network calls and code-ify them
Ok I can look into it. Do you believe that that's indeed the issue and not some other auth related issue though?
Also is this
https://railway.app/graphiql
interface is a recommended way to explore the API? I'm also getting auth errors thereif you can't do it via the dashboard then its an auth issue, if you can do it via the dashboard then its an issue with that action
yeah the ui dashboard does work
Btw I notice I'm also getting the same error with another mutation:
Well actually I'm not sure the dashboard is the same action. I think the dashboard is redeploying an existing deployment, while the action tries to deploy a new version from github
you would want to be using all the same mutations the dashboard uses
I understand. First of all I appreciate you taking the time and helping Brody.
Otherwise, please understand the frustration and friction that comes when things that work one day, just break the next and I have to rush a hotfix that I had not planned. I'm somewhat concerned now that the mutations that the dashboard uses now might break in the future, if they do I think API users would appreciate a heads up.
Please take this as a constructive feedback to the team, I really like the Railway product otherwise.
i do understand the frustration but please keep in mind that what you where using was created by a community member with the knowledge that the mutations where already outdated and me and another railway employee has suggested them to update it and they refused.
Yeah, I understand. I wish that person was more responsive, I had tried to contact them mayn times for improvements and ended up just forking it myself.
i feel you, i wish they where too
For my own understanding, is there a good place to stay up to date with deprecation/things getting outtdated?
im sorry but railway moves too fast to keep that kind of information posted
So I went through the actions in the dashboard, redeploying an existing environment works but creating a new environment gives me the same error I saw in the mutation above:
I ended up re-installing the Github App and that seems to have resolved the issue.
Is this something thats expected to be needed every so often?
that's very strange, haven't heard of needing to reinstall it for the sake of it, only when the user changes something and needs to re-auth