ADAPT-2326: Update Algolia to only index on prod builds. #190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
READY FOR REVIEW
Summary
Review By (Date)
Criticality
Review Tasks
Setup tasks and/or behavior to test
The easiest way to validate this is to check the build logs on Netlify.
On the preview builds, you should now see a line like this:
This one you can check by simply looking at the build log for this PR as I did.
We'll also want to make sure the indexing is still working on prod builds.
You should see a line like this in the logs on the production build after this ticket is merged:
As an additional validation step, you can also check the Index logs on Algolia
https://www.algolia.com/apps/SA452GABN1/explorer/logs/Giving%20to%20Stanford
If the Gatsby plugin attempted to index during the build, you will see one or more log entries that have the 'x-aloglia-agent' flag, like this:
![Screen Shot 2021-04-21 at 3 03 40 PM](https://user-images.githubusercontent.com/4481455/115624191-84766a80-a2b7-11eb-93e4-adecd81aea7f.png)
This should show up on Production builds, and should NOT show up on Preview builds.
Front End Validation
Backend / Functional Validation
Code
Code security
General
Affected Projects or Products
Associated Issues and/or People
Resources