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): garbage collect stateful pages #28760

Merged
merged 3 commits into from
Apr 21, 2021

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Dec 26, 2020

Targets #28590

This is needed for when pages are being persisted to clean up stateful pages from previous runs that are not being recreated (there's plenty of state reducers that relies on DELETE_PAGE/CREATE_PAGE being emitted - including queries reducer).

This PR targets specifically this comment - #28590 (comment)

Opened as separate PR to be easier to review this distinct change.

Related Issues

#28590

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 26, 2020
@pieh pieh added topic: state machine and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 26, 2020
@pieh pieh force-pushed the garbage-collect-stateful-pages branch from 21a87f9 to 29ba318 Compare April 13, 2021 09:18
@pieh pieh force-pushed the garbage-collect-stateful-pages branch 3 times, most recently from a8f9932 to eab599b Compare April 13, 2021 11:32
@pieh pieh force-pushed the garbage-collect-stateful-pages branch from a3d8fde to 60dd715 Compare April 13, 2021 13:30
@pieh pieh marked this pull request as ready for review April 14, 2021 11:33
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.

👍

@pieh pieh merged commit 7880240 into fix/no-rebuild-bug Apr 21, 2021
@pieh pieh deleted the garbage-collect-stateful-pages branch April 21, 2021 19:49
pieh added a commit that referenced this pull request Apr 22, 2021
* fix(gatsby): add pages to saved redux state

* chore: update test snapshots

* unskip context change scenario for data tracking tests

* mock Date.now so persistance tests don't rely on actual time (needed for updatedAt and snapshot testing)

* refactor persistance tests a bit to allow for creating different pages per test scenario

* shard pages state (on top of existing sharding for nodes)

* drop page count check (there actually might be valid cases for 0 pages)

* only show page context size warning for pages (and not nodes)

* fix lint

* adjust snapshot

* test(artifacts): add case for changing page context

* fix(gatsby): garbage collect stateful pages (#28760)

* add stateful page to artifacts tests

* fix(gatsby): garbage collect stateful pages

* Revert "fix: clear tracked queries when deleting stale page-data files (#29431)" (#30848)

This reverts commit 478cf68.

Co-authored-by: Reda Bacha <mohamedredabacha@hollandandbarrett.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants