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: invalidate data store module when dev server starts #12938

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Jan 8, 2025

Changes

This is another fix in the saga of data store race conditions. When we changed the dev fs watcher to not start watching the data store file until after the content layer sync was complete, it was meanign that in some scenarios, newly-created data store files were not triggering a module reload. This PR adds a manual module invalidation at the same time as adding the file to the watcher.

Fixes #12866

Testing

This can't be reproduced when using pnpm (for some unclear reason), but I have manually tested it with the #12866 repro, using npm.

Docs

Copy link

changeset-bot bot commented Jan 8, 2025

🦋 Changeset detected

Latest commit: 1510b9e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jan 8, 2025
Copy link

codspeed-hq bot commented Jan 8, 2025

CodSpeed Performance Report

Merging #12938 will not alter performance

Comparing invalidate-datastore (1510b9e) with main (fd12a26)

Summary

✅ 6 untouched benchmarks

@ascorbic ascorbic merged commit dbb04f3 into main Jan 8, 2025
16 checks passed
@ascorbic ascorbic deleted the invalidate-datastore branch January 8, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty content collection when dev is first run
2 participants