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

chore: Run 'yarn install' when building #215

Merged
merged 3 commits into from
Feb 9, 2022

Conversation

bryphe-coder
Copy link
Contributor

I noticed when showing the development flow to a few engineers, there was one awkward step - you have to cd site and run yarn install, and then come back to root to make build or ./develop.sh

This just adds yarn install as part of make build and ./develop.sh - so whichever one is run first will start work.

@bryphe-coder bryphe-coder self-assigned this Feb 9, 2022
@@ -74,6 +74,7 @@ provisionersdk/proto: provisionersdk/proto/provisioner.proto
.PHONY: provisionersdk/proto

site/out:
cd site && yarn install
Copy link
Contributor

Choose a reason for hiding this comment

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

how long does the install take? seems like it'd slow down builds if we re-install every time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it's already been installed (ie, already have a node_modules) - less than a second to validate dependencies:

yarn install v1.22.17
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.78s.

I think that 0.78s trade-off is worth it to make sure that the first-build always works for people on-boarding to the project (esp in the open-core world) - but let me know if you disagree

Copy link
Contributor

Choose a reason for hiding this comment

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

that seems alright. I'd like to try switching to Yarn 3 and using the CJS resolution thing to see if it's faster, but that should be done separately

@codecov
Copy link

codecov bot commented Feb 9, 2022

Codecov Report

Merging #215 (2190491) into main (c44d036) will decrease coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
- Coverage   68.31%   68.16%   -0.15%     
==========================================
  Files         111      111              
  Lines        6003     6003              
  Branches       67       67              
==========================================
- Hits         4101     4092       -9     
- Misses       1512     1520       +8     
- Partials      390      391       +1     
Flag Coverage Δ
unittest-go-macos-latest 66.11% <ø> (-0.17%) ⬇️
unittest-go-ubuntu-latest 67.36% <ø> (-0.15%) ⬇️
unittest-go-windows-latest 66.05% <ø> (+0.12%) ⬆️
unittest-js 64.76% <ø> (ø)
Impacted Files Coverage Δ
peer/conn.go 77.94% <0.00%> (-1.80%) ⬇️
provisionerd/provisionerd.go 69.51% <0.00%> (-0.41%) ⬇️

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 c44d036...2190491. Read the comment docs.

@bryphe-coder
Copy link
Contributor Author

Thanks for the review @jawnsy !

@bryphe-coder bryphe-coder merged commit b6fcd81 into main Feb 9, 2022
@bryphe-coder bryphe-coder deleted the bryphe/chore/run-yarn-install branch February 9, 2022 21:46
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.

None yet

2 participants