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): add retry mechanism for gatsby-node/config.ts compilation #35974

Merged
merged 4 commits into from Jun 23, 2022

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Jun 22, 2022

Description

Sometimes Parcel (cache?) gets in a weird state where it doesn't output compiled files anymore, but the compilation itself doesn't report any errors (?).

This adds validation checks and retry mechanism in case we hit that problem.

Some notes / thoughts:

We do remove any compiled files from our output dir before running Parcel ( to get rid of potentially stale files from previous builds ) - can this be a factor in this behaviour we are seeing? It works most of the time, so it would seem like it's not a complete "no-no", but might be part of why this happens, sometimes.

We could instead maybe remove files that were not bundled in current run, but then it would mean that we potentially might use stale compiled files if there are other reasons for Parcel not outputting those files 🤷

Documentation

Related Issues

[ch51776]
[ch51597]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 22, 2022
@pieh pieh marked this pull request as ready for review June 22, 2022 12:09
@pieh pieh added topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 22, 2022
LekoArts
LekoArts previously approved these changes Jun 22, 2022
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LekoArts LekoArts merged commit 2acc6ed into master Jun 23, 2022
@LekoArts LekoArts deleted the fix/parcel/validate-output-and-retry branch June 23, 2022 03:50
@pieh pieh added this to To cherry-pick in V4 Release hotfixes via automation Jun 23, 2022
tyhopp pushed a commit that referenced this pull request Jun 23, 2022
@tyhopp tyhopp moved this from To cherry-pick to Backport PR opened in V4 Release hotfixes Jun 23, 2022
pieh added a commit that referenced this pull request Jun 23, 2022
#35974) (#35981)

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
@tyhopp tyhopp moved this from Backport PR opened to Backported in V4 Release hotfixes Jun 24, 2022
@tyhopp
Copy link
Contributor

tyhopp commented Jun 24, 2022

Released in:

 - gatsby-cli@4.17.1
 - gatsby@4.17.1

@tyhopp tyhopp moved this from Backported to Published in V4 Release hotfixes Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants