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

Revalidate index page, require instant revalidation if no shop is present during build #698

Merged

Conversation

janus-reith
Copy link
Collaborator

Signed-off-by: Janus Reith mail@janusreith.de

Resolves #697
Impact: major
Type: feature|bugfix|performance|test|style|refactor|docs|chore

Issue

The shop is not present during the default CI build and no revalidation is set for that page. the shop id stays undefined and the query for catalog items is skipped.

Solution

Set a revalidation time for that page, check if no shop is present and return fallback values that will require immedate revalidation.

Testing

  1. Run the production build
  2. Visit the index page, no catalog items come up

Additional context

As discussed with @willopez, we should somehow make sure that this is actually discouraged for production builds, as depoyments should not feature an initial render that is blank until the revalidated page is returned for subsequent requests.

… present

Signed-off-by: Janus Reith <mail@janusreith.de>
@willopez willopez self-requested a review July 8, 2020 19:44
Copy link
Member

@willopez willopez left a comment

Choose a reason for hiding this comment

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

LGTM

@willopez willopez merged commit bad4cce into reactioncommerce:trunk Jul 9, 2020
@kieckhafer kieckhafer mentioned this pull request Sep 25, 2020
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.

The index page is not using revalidation, stays empty on production builds if no shop present during build
2 participants