ServiceInstanceRedeploys Failing via GraphQL Endpoint
faolain
PROOP

2 years ago

I recently had my CI begin to fail as a result of a failing service instance redeploy. As a quick tldr I've been using this github action https://github.com/Faolain/railway-pr-deploy/blob/main/index.js for many months now unchanged. However I recently added a new service and it appears after adding this new service, the serviceInstanceRedeploys fail via the CI (which uses the graphql endpoint). I tried on my local graphql GUI and see the same issue. Is there any reason why this serviceInstanceRedeploy is failing/how to find more information about this?

26 Replies

faolain
PROOP

2 years ago

7b1d4989-a0d3-4bb1-98de-a5372becb82d


faolain
PROOP

2 years ago

Github Action Logs

1230945630654955800


faolain
PROOP

2 years ago

Replicated in GraphQL GUI

1230945739883024400


faolain
PROOP

2 years ago

Something to note is that this particular service which is encountering an issue is based on a template but I'm not sure if that is the reason for the failure


faolain
PROOP

2 years ago

Unsure why I wouldn't be able to redeploy the service like any other. There doesn't seem to be much information either about the error other than

{
    "errors": [
        {
            "message": "Problem processing request"
        }
    ],
    "data": null
}

brody
EMPLOYEE

2 years ago

mind sending the query and variables over?


faolain
PROOP

2 years ago

yep!


faolain
PROOP

2 years ago

mutation serviceInstanceRedeploy($environmentId: String!, $serviceId: String!) {
    serviceInstanceRedeploy(environmentId: $environmentId, serviceId: $serviceId)
}

faolain
PROOP

2 years ago

{
    "environmentId": "3ec1dd8f-4c44-415b-988b-955288e47bec",
    "serviceId": "e63f96dd-c01f-45a5-ba40-a9f024aaa3bb"
}

faolain
PROOP

2 years ago

the other 2 services are redeploying just fine, it's just this service which is the problematic one


faolain
PROOP

2 years ago

(it's programmatic so no change in the syntax just a loop which passes the different serviceIds through, the one based on the template is the one that's failing)


brody
EMPLOYEE

2 years ago

what is the state of the service?


faolain
PROOP

2 years ago

Running/Active without error


faolain
PROOP

2 years ago

no issue/same as rest


brody
EMPLOYEE

2 years ago

that is not a valid state though, im talking about in the context of railway


faolain
PROOP

2 years ago

Active


faolain
PROOP

2 years ago

The Github Action logs

Environment variables updated for all services.
Waiting 15 seconds for deployment to initialize and become available
Deployment is still in progress. Status: BUILDING . Waiting 20 seconds and trying again...
Deployment is still in progress. Status: DEPLOYING . Waiting 20 seconds and trying again...
Deployment is still in progress. Status: DEPLOYING . Waiting 20 seconds and trying again...
Updating Deploying Trigger to new Branch Name
Updating Deploying Trigger to new Branch Name
Updating Deploying Trigger to new Branch Name
All deployment triggers updated successfully.
Redeploying Service...
Environment ID: 3ec1dd8f-4c44-415b-988b-955288e47bec
Service ID: e3273da5-c840-4faf-8a15-8bb12c0e43d5
Redeploying Service...
Environment ID: 3ec1dd8f-4c44-415b-988b-955288e47bec
Service ID: e63f96dd-c01f-45a5-ba40-a9f024aaa3bb
Redeploying Service...
Environment ID: 3ec1dd8f-4c44-415b-988b-955288e47bec
Service ID: 4fd3601c-fd90-4195-997d-051be3ff145f
Error: Action failed with error: Error: Problem processing request: {"response":{"errors":[{"message":"Problem processing request"}],"data":null,"status":200,"headers":{}},"request":{"query":"\n        mutation serviceInstanceRedeploy($environmentId: String!, $serviceId: String!) {\n            serviceInstanceRedeploy(environmentId: $environmentId, serviceId: $serviceId)\n        }\n        ","variables":{"environmentId":"3ec1dd8f-4c44-415b-988b-955288e47bec","serviceId":"e63f96dd-c01f-45a5-ba40-a9f024aaa3bb"}}}

The state of the other services are the same as the one that's failing


brody
EMPLOYEE

2 years ago

I think you should take this as a sign to update the action to use staged changes


faolain
PROOP

2 years ago

I believe at the time when I was looking at this it was not feasible due to a lack of support of certain features that we needed


faolain
PROOP

2 years ago

hence the railway team undeprecating one of the endpoints to maintain continued support


faolain
PROOP

2 years ago

in any case that seems a bit over the top for what seems to be a serviceInstanceRedeploy which we may have to do later programatically in any case


brody
EMPLOYEE

2 years ago

it was possible i did it in the dashboard just fine, and i think jr even recommended you used staged changes too


faolain
PROOP

2 years ago

^ , is there any way railway can investigate why this serviceInstance is not deploying whereas the others are deploying just fine?


faolain
PROOP

2 years ago

Maybe an edge case with how templates are managed?


faolain
PROOP

2 years ago

Especially considering the error message isn't really helpful


brody
EMPLOYEE

2 years ago

closing in favor of your private thread!


Loading...