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

Rebuilds Caching (Rebased) #1156

Closed
wants to merge 14 commits into from

Conversation

rogermparent
Copy link
Contributor

This is a continuation #1150 opened up against master instead of the other rebuilds-caching branch. I wasn't thinking about how rebasing my fork's branch onto master would cause havoc with PRs that already exist.
I could probably rebase what I have now back to the point where #1134 starts, but a new PR onto master seems like an easier option.

psdcoder and others added 12 commits April 15, 2020 19:51
This way the code doesn't depend on the source file's relative directory.
I'm not sure if there's any rate limits in the stack that will cause this to break, but on first blush this looks like a quick and easy improvement.

The cached folders are also now accessed by a shared array that is hard-coded for now. This both makes them easier to work with uniformly and open to sourcing directories from elsewhere in the future.
I believe the crux of what keeps this PR from working is that `public` and
`.cache` the folders were being uploaded to `public` and `,cache` the S3
prefixes when the site is deployed from the root prefix. This change alters how
the cache directories are stored: now as tuple pairs with the local directory in
slot 0 and a string that's appended to the base prefix in slot 2. `public` work
with the root prefix and the `.cache` folder works with the root prefix with
`-cache` appended to it such that it's another "folder" that doesn't get
downloaded with the root prefix.

I find the tuple syntax more concise, but I'm open to changing it if we prefer
objects for better grokking at a glance.

This change also moves the responsibility of cache culling into an `onPostBuild`
Gatsby hook. This means we don't have to parse the sitemap XML after the fact,
and as such the XML parser used to do it is removed. Since this replaces
`cleanUpPageData`, it also invalidates the whole `page-data-utils` file which
has been removed.
@shcheklein shcheklein temporarily deployed to dvc-landing-rebuilds-ca-075zz5 April 16, 2020 01:27 Inactive
@shcheklein shcheklein temporarily deployed to dvc-landing-rebuilds-ca-075zz5 April 16, 2020 03:03 Inactive
@shcheklein shcheklein temporarily deployed to dvc-landing-rebuilds-ca-075zz5 April 16, 2020 03:30 Inactive
@rogermparent
Copy link
Contributor Author

Just for anyone else coming into this PR, it was meant mostly to generate the deploy preview. It currently doesn't work with our build system, and I'm trying to get it to do so via other means. I'll probably close this and open another one later when I have something more functional.

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.

3 participants