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

test: improve e2e verdaccio configuration #7967

Merged
merged 7 commits into from
Aug 18, 2022
Merged

test: improve e2e verdaccio configuration #7967

merged 7 commits into from
Aug 18, 2022

Conversation

juanpicado
Copy link
Contributor

@juanpicado juanpicado commented Aug 17, 2022

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

I've notice master fails with E503 one of the uplinks is down, refuse to publish, this happens because on publish first check on internet if the version of this package exist, for E2E this should not be required. I'm trying to improve the master branch builds.

By adding a new block for @docusaurus/* avoid check any uplink and also the property allow_offline avoid any check with internet on publish (this is handy if the connection is dropped so avoid network issues)

I had to add an additional block for @docusaurus/react-loadable because this package is not part of this monorepo, while the order in the packages section matters, should be on the top of @docusaurus/*.

The CI build: https://github.com/facebook/docusaurus/runs/7881520546?check_suite_focus=true

lerna notice total files:   64                                      
775
lerna notice 
776
lerna ERR! E503 one of the uplinks is down, refuse to publish
777
error Command failed with exit code 1.
778
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
779
Error: Process completed with exit code 1.

Test Plan

  • E2E are green

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

```
lerna notice total files:   64                                      
775
lerna notice 
776
lerna ERR! E503 one of the uplinks is down, refuse to publish
777
error Command failed with exit code 1.
778
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
779
Error: Process completed with exit code 1.
```
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 17, 2022
@netlify
Copy link

netlify bot commented Aug 17, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 40fd731
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62fd3290a51365000a6aaa0d
😎 Deploy Preview https://deploy-preview-7967--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Aug 17, 2022

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 87 🟢 98 🟢 100 🟢 100 🟠 80 Report
/docs/installation 🟠 86 🟢 100 🟢 100 🟢 100 🟢 90 Report

@netlify
Copy link

netlify bot commented Aug 17, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 76b7fa1
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62fd3344eb18fd0009dfcd31
😎 Deploy Preview https://deploy-preview-7967--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Aug 17, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 024dd81
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62fdd9b7ab21c7000890222d
😎 Deploy Preview https://deploy-preview-7967--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Josh-Cena Josh-Cena added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Aug 17, 2022
@Josh-Cena
Copy link
Collaborator

Great, thank you so much 🙏

admin/verdaccio.yaml Outdated Show resolved Hide resolved
@juanpicado juanpicado marked this pull request as ready for review August 17, 2022 20:29
# this package is hosted outside the monorepo
# https://github.com/slorber/react-loadable
# thus requires to be fetched from npmjs
'@docusaurus/react-loadable':
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a way to dynamically figure out which packages are in the local monorepo? In the future we may have more scoped (forked) packages not in the main repo.

Copy link
Contributor Author

@juanpicado juanpicado Aug 18, 2022

Choose a reason for hiding this comment

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

Well, since is committed in the repo is less flexible, but I could try adding the proxy, so any package that match with the namespace is lookup outside so the block above is not need it, it has disadvantages like for every package published will check on npmjs (here is when external network might break your build again).

  '@docusaurus/*':
     access: $all
     publish: $all
     proxy: npmjs

Let me know what do you prefer and I can update the config.

Anyhow, I'm working in a different ways, like https://github.com/verdaccio/verdaccio/blob/master/packages/verdaccio/test/unit/proxy-multilpe-registry.spec.ts#L20 programatically generate the yaml files or stuff like that for the next major (still WIP).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, good to know. For now, I think this hardcoded list is fine—we just anticipate another 2~3 forked dependencies + a few to be moved under this scope (ref #6246)

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Giving my approval. Will let @slorber take a look as well

@slorber
Copy link
Collaborator

slorber commented Aug 18, 2022

Thanks @juanpicado :) looks great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants