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

Fix yarn install in Algolia CI #339

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Conversation

kachkaev
Copy link
Contributor

@kachkaev kachkaev commented Feb 23, 2022

🌟 What is the purpose of this PR?

This PR fixes https://github.com/hashintel/hash/actions/workflows/algolia-upload-index.yml. This is done by removing a broken optimization added in #324.

🔍 What does this change?

Error example:

[4/4] Building fresh packages...
error /home/runner/work/hash/hash/node_modules/postinstall-postinstall: Command failed.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Exit code: 1
Command: node ./run.js
Arguments: 
Directory: /home/runner/work/hash/hash/node_modules/postinstall-postinstall
Output:
Error: Patch file found for package prosemirror-model which is not present at node_modules/@types/prosemirror-model
Error: Patch file found for package blockprotocol which is not present at node_modules/blockprotocol

CI was failing because patch-package was trying to patch packages that were not installed. Alternatively, I could delete patches folder in the yaml — it would keep yarn install fast, but the CI code would look a bit more cryptic.

Algolia CI should work again after this PR.

⚠️ Known issues

By running yarn install in CI, all dependencies from all workspace will be downloaded. This is what my optimization was trying to avoid. We can bring it back when we upgrade to Yarn Berry (which supports focus mode when installing stuff and has built-in support for patching packages).

📜 Does this require a change to the docs?

No

@github-actions github-actions bot added the area/infra Relates to version control, CI, CD or IaC (area) label Feb 23, 2022
@kachkaev kachkaev marked this pull request as ready for review February 23, 2022 10:55
@kachkaev kachkaev enabled auto-merge (squash) February 23, 2022 11:00
@kachkaev kachkaev merged commit 55c6ad7 into main Feb 23, 2022
@kachkaev kachkaev deleted the ak/fix-yarn-install-in-algolia-ci branch February 23, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/infra Relates to version control, CI, CD or IaC (area)
Development

Successfully merging this pull request may close these issues.

2 participants