hasura / hasura/graphql-engine

Inconsistent availability of v1/version endpoint causing CI deployment errors

Open
#6,567 2 comments 0 reactions 1 assignee Claimed by @shahidhk View on GitHub
cloud
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

I have noticed this issue on hasura cloud whenever I make changes to env vars, which results in the cloud instance resetting.

The confusing part is that awaiting a GET 200 response from /v1/version doesn't seem to be enough.

This is actually preventing me from using the hasura cli in our ci environment currently, which is more than a little troubling.

When I rerun our deploy command everything works, so it seems to me like v1/version has some inconsistent behavior between conventional GET polling and the hasura cli.

I've included logs below about this issue and have reference this issue in #2601 also.

```sh
$ echo 'hasura:wait' && . ../../.env && echo $HASURA_CLOUD_PROJECT_NAME && wait-on https-get://api.dev.onework.services/v1/version -v
hasura:wait
onework-dev
waiting for 1 resources: https-get://api.dev.onework.services/v1/version
making HTTP(S) get request to url:https://api.dev.onework.services/v1/version ...
making HTTP(S) get request to url:https://api.dev.onework.services/v1/version ...
HTTP(S) result for https://api.dev.onework.services/v1/version: {
status: 200,
statusText: 'OK',
headers: {
server: 'openresty/1.19.3.1',
date: 'Thu, 18 Feb 2021 15:32:49 GMT',
'content-type': 'application/json; charset=utf-8',
'transfer-encoding': 'chunked',
connection: 'close',
'strict-transport-security': 'max-age=31536000; includeSubDomains'
},
data: { version: 'v1.3.3-cloud.3' }
}
wait-on(11710) complete
$ /home/austin/Workspace/Sophia/platform/node_modules/.bin/hasura migrate apply
FATA[0001] version check: failed to get version from server: GET https://api.dev.onework.services/v1/version failed - [502]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

And the rerun immediately after

```sh
$ echo 'hasura:wait' && . ../../.env && echo $HASURA_CLOUD_PROJECT_NAME && wait-on https-get://api.dev.onework.services/v1/version -v
hasura:wait
onework-dev
waiting for 1 resources: https-get://api.dev.onework.services/v1/version
making HTTP(S) get request to url:https://api.dev.onework.services/v1/version ...
making HTTP(S) get request to url:https://api.dev.onework.services/v1/version ...
HTTP(S) result for https://api.dev.onework.services/v1/version: {
status: 200,
statusText: 'OK',
headers: {
server: 'openresty/1.19.3.1',
date: 'Thu, 18 Feb 2021 15:36:10 GMT',
'content-type': 'application/json; charset=utf-8',
'transfer-encoding': 'chunked',
connection: 'close',
'strict-transport-security': 'max-age=31536000; includeSubDomains'
},
data: { version: 'v1.3.3-cloud.3' }
}
wait-on(12893) complete
$ /home/austin/Workspace/Sophia/platform/node_modules/.bin/hasura migrate apply
INFO nothing to apply
$ /home/austin/Workspace/Sophia/platform/node_modules/.bin/hasura metadata apply
INFO Metadata applied
Done in 30.16s.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.