Issue with `sanity graphql deploy` command hanging and not exiting
17 replies
Last updated: Jan 7, 2022
H
Hey peeps. On our devs’ machines and in our GitHub actions, the
Using our development deployment command as an example -
We were getting the issue in
The fix that was supposedly included in version
2.21.8 didn’t seem to have any effect.
It’s breaking our GitHub Actions pipeline because the deploy step never finishes and times out after 6 hours.
(Tagging this other message that describes the same issue)
sanity graphql deploycommand runs successfully but never exits.
Using our development deployment command as an example -
sanity graphql deploy --playground --dataset development- It hangs with these last few lines:
⠼ Deploying GraphQL API sanity:client [2] Response code: 200 OK +2s sanity:client [2] Response body: { "location": "/v1/graphql/development/default" } +0ms ✔ Deploying GraphQL API GraphQL API deployed to: https://$API_URL/v1/graphql/development/default
@sanity/cliand
@sanity/coreversion
2.21.7and we’re still getting it after upgrading both to
2.22.3
The fix that was supposedly included in version
2.21.8 didn’t seem to have any effect.
It’s breaking our GitHub Actions pipeline because the deploy step never finishes and times out after 6 hours.
(Tagging this other message that describes the same issue)
Dec 1, 2021, 8:19 AM
H
Does anybody know any workarounds for this?
Dec 1, 2021, 9:34 AM
H
Oh and if it helps, we don’t have any explicit dependencies on any
Running
@babelpackages in this project. Mentioning it because the GitHub issue related to this had some discussion about babel.
Running
yarn why @babel/coretells me that it’s only installed as a dependency of
@sanity/core, so there should be no package compatibility issues.
=> Found "@babel/core@7.16.0" info Reasons this module exists - "@sanity#core#@sanity#server" depends on it - Hoisted from "@sanity#core#@sanity#server#@babel#core" info Disk size without dependencies: "800KB" info Disk size with unique dependencies: "5.84MB" info Disk size with transitive dependencies: "10.42MB" info Number of shared dependencies: 43 Done in 1.23s.
Dec 1, 2021, 9:42 AM
H
And we’re running in Node 16
Dec 1, 2021, 9:49 AM
R
Thanks for reporting! Bringing this up internally so that we can investigate.
Dec 1, 2021, 7:47 PM
H
Thanks! Let me know if there's any other info I can give.
Dec 1, 2021, 7:55 PM
A
It would be very helpful if you could provide all of your versions: Node (I know it’s 16), npm, sanity versions, package.json etc. Maybe it’s easier to create a GitHub issue to post all this?
I have tried reproducing it, but it works fine for me on my test schema.
Do you have any React component imports in your schema or something like that?
I have tried reproducing it, but it works fine for me on my test schema.
Do you have any React component imports in your schema or something like that?
Dec 3, 2021, 11:47 AM
A
It would be very helpful if you could provide all of your versions: Node (I know it’s 16), npm, sanity versions, package.json etc. Maybe it’s easier to create a GitHub issue to post all this?
I have tried reproducing it, but it works fine for me on my test schema.
Do you have any React component imports in your schema or something like that?
I have tried reproducing it, but it works fine for me on my test schema.
Do you have any React component imports in your schema or something like that?
Dec 3, 2021, 11:47 AM
A
There could also be
asyncfunctions that are not
awaitedin your schema, or similar things. For example timers (if you set them up). If you could provide your schema as well, that would be very helpful.
Dec 3, 2021, 11:51 AM
H
Hey
The only thing I can tell you off the top of my head is that in the GitHub Actions job, it hung for 6 hours. It probably would've hung for longer but 6 hours is the limit before the job times out.
user P
, thanks for looking into it for us. I'll provide as much of that info as I can when I get a sec in the next few days. Happy to open a GitHub issue as well if that makes things easier.The only thing I can tell you off the top of my head is that in the GitHub Actions job, it hung for 6 hours. It probably would've hung for longer but 6 hours is the limit before the job times out.
Dec 3, 2021, 12:01 PM
H
Always happy to hop on a call as well if it helps at all.
Dec 3, 2021, 12:03 PM
H
Hey
Happy to hop on a call if you want to scour through it.
Here are those version numbers you asked for:
• Node:
user P
, I just checked through our schema and couldn’t find any async code. I unfortunately can’t post our schema publicly because this is an internal, closed-source project. It’s also split across multiple files so there’s no clean way to share it all at once short of giving access to our repo in any case.Happy to hop on a call if you want to scour through it.
Here are those version numbers you asked for:
• Node:
16.13.1• npm:
8.1.2• yarn:
1.22.5
Dec 5, 2021, 11:54 PM
H
I’ll attach a snippet with our package.json dependencies showing the Sanity package versions we’re using. We don’t have any dev dependencies/peer dependencies/etc, so this is all of our dependencies.
Dec 5, 2021, 11:54 PM
H
We do import some React components in our schema but there doesn’t seem to be anything async. Possibly some async code internal to some video player components and such during runtime but that’s about it.
Dec 5, 2021, 11:56 PM
H
Quick update: we came back after the Christmas break and upgraded our
@sanitypackages to
2.23.3/
2.23.2and the issue has been resolved. Not sure what happened, but thanks for the Christmas present Sanity team! 🙂 This issue is resolved for us now.
Jan 7, 2022, 12:04 AM
H
Quick update: we came back after the Christmas break and upgraded our
@sanitypackages to
2.23.3/
2.23.2and the issue has been resolved. Not sure what happened, but thanks for the Christmas present Sanity team! 🙂 This issue is resolved for us now.
Jan 7, 2022, 12:04 AM
R
Happy to hear it's resolved!
Jan 7, 2022, 12:13 AM
R
Happy to hear it's resolved!
Jan 7, 2022, 12:13 AM
Sanity– build remarkable experiences at scale
The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.