Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby): Wait for jobs to complete in onPostBuild #28534

Merged
merged 2 commits into from
Dec 8, 2020

Conversation

sidharthachatterjee
Copy link
Contributor

Plugins can currently run queries in onPostBuild if they like. If these queries trigger side effects like jobs, they are currently not awaited in onPostBuild. This is a bug.

We fix this by waiting till the jobs queue is empty.

An example of a community plugin that does this is https://github.com/dominicfallows/gatsby-plugin-json-output

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 8, 2020
@sidharthachatterjee sidharthachatterjee removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 8, 2020
@wardpeet wardpeet added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Dec 8, 2020
@gatsbybot gatsbybot merged commit 98f22e7 into master Dec 8, 2020
@sidharthachatterjee sidharthachatterjee deleted the fix/jobs-in-post-build branch December 8, 2020 18:34
pieh pushed a commit that referenced this pull request Dec 9, 2020
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit 98f22e7)
pieh pushed a commit that referenced this pull request Dec 9, 2020
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit 98f22e7)

Co-authored-by: Sidhartha Chatterjee <me@sidharthachatterjee.com>
@pieh
Copy link
Contributor

pieh commented Dec 10, 2020

Published in gatsby@2.28.2

pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants