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

Update Docusaurus to 1.3.2 #6644

Merged
merged 1 commit into from
Jul 6, 2018
Merged

Update Docusaurus to 1.3.2 #6644

merged 1 commit into from
Jul 6, 2018

Conversation

endiliey
Copy link
Contributor

@endiliey endiliey commented Jul 6, 2018

Summary

  1. Update Docusaurus to 1.3.2 based on Website search box not working #6640 (comment). This version has few bug fixes which is important imho. In additions:
  • Being able to easily debug commit that cause 404 / broken build in gh-pages branch

Consider this commit endiliey/endiliey.github.io@4c6abe0
Triggering commit

Now the deploy commit on gh-pages shows the correct triggering commit
endiliey/endiliey.github.io@936bbc3
Deploy shows triggering commit

Make debugging life easier 👍

  • Search docs depending on current version of docs
    (refer to test plan below)
  1. Expose algolia api key for easy debugging

cc @yangshun @JoelMarcey

Test plan

  1. Static website build works without non-zero exit code
cd website
yarn build
  1. Test locally
cd website
yarn start

Search according to current version.
Example I'm at 22.2, my search will be scoped to 22.2 docs.
search according to version

Example I'm at docs/en/next, my search will be scoped to docs/en/next docs.
search according to version2

@SimenB
Copy link
Member

SimenB commented Jul 6, 2018

Seeing as the api key is already in the URL when performing searches, I see no reason to not just have it in source.

@cpojer @thymikee @rickhanlonii thoughts on that?

@endiliey
Copy link
Contributor Author

endiliey commented Jul 6, 2018

If you notice it in this PR preview, https://deploy-preview-6644--jest-preview.netlify.com/ now can search and previously it can't because previously process.env.ALGOLIA_JEST_API_KEY is not set in netlify

We at Docusaurus expose it as well
https://github.com/facebook/Docusaurus/blob/936725c94d156a832cadd971bd64497e20e16b80/website/siteConfig.js#L37

But I'll follow Jest team decision on this 👍

@SimenB
Copy link
Member

SimenB commented Jul 6, 2018

Loving the preview :D So good

@endiliey
Copy link
Contributor Author

endiliey commented Jul 6, 2018

@SimenB even Docusaurus didn't search according to version 😭.

@yangshun @JoelMarcey
Should we search according to version as well ? I have an index on algolia ready for that

@codecov-io
Copy link

Codecov Report

Merging #6644 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6644   +/-   ##
=======================================
  Coverage   63.73%   63.73%           
=======================================
  Files         235      235           
  Lines        8935     8935           
  Branches        4        3    -1     
=======================================
  Hits         5695     5695           
  Misses       3239     3239           
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f34bddc...1d02897. Read the comment docs.

@thymikee
Copy link
Collaborator

thymikee commented Jul 6, 2018

As @SimenB already mentioned, this API key doesn't look like a secret, so I'm ok exposing it.

@endiliey
Copy link
Contributor Author

endiliey commented Jul 6, 2018

In addition, I think we can close all the 404 jest website error. I've been monitoring the website for few days and there is no 404 so far. This version also includes a non-zero exit code for any build error (facebook/docusaurus#809) so the 404 won't happen easily.

Let us know if it does happen though. Will come running to fix it 😎

@SimenB SimenB merged commit d16d420 into jestjs:master Jul 6, 2018
@endiliey endiliey deleted the docusaurus branch July 6, 2018 09:38
@SimenB
Copy link
Member

SimenB commented Jul 6, 2018

In addition, I think we can close all the 404 jest website error. I've been monitoring the website for few days and there is no 404 so far.

We haven't had a merge spree either, but I agree we could close them as hopefully fixed. Easy enough to reopen or file new ones

@endiliey
Copy link
Contributor Author

endiliey commented Jul 6, 2018

We haven't had a merge spree either, but I agree we could close them as hopefully fixed. Easy enough to reopen or file new ones

I'm quite confident that at least the website going down won't happen easily. Few reasons:

  1. We use run step on circleci for website deploy now instead of deploy previously. Deploy step can cause unwanted behavior because it will fails on PR with even one failing test (e.g test-node-6 fails)
    Refer to https://circleci.com/docs/2.0/configuration-reference/
  2. We only deploy the website if docs or website files are changed now. Previously all the merge will deploy the website and they are all running in parallel 😢 due to workflows
  3. We properly test website build on every PR now. Previously it was just Skipping deploy ... and maybe it breaks during push to master ? 😄 Even got netlify preview now 🙌
  4. Docusaurus 1.3.2 is better, etc.

Nevertheless, we all hope it won't happen 😍

@rickhanlonii
Copy link
Member

Is it possible to add the ALGOLIA_JEST_API_KEY key to a Netlify config?

@endiliey
Copy link
Contributor Author

endiliey commented Jul 6, 2018

@rickhanlonii
Only those with access to netlify setting of Jest could add it :)

@JoelMarcey
Copy link
Contributor

@yangshun or I should be able to do this. I am on vacation right now, but can try to find time to do it before I get back if @yangshun can't do this before me.

@yangshun
Copy link
Contributor

Have set the key in Netlify:

screen shot 2018-07-10 at 2 39 57 am

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants