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

refactor: update prebuild to download first, fallback to build #230

Merged
merged 8 commits into from
Aug 7, 2023

Conversation

jmartin4563
Copy link
Contributor

Proposed Release Notes

  • updated install stage to attempt download first, and fallback to build if download fails

Links

Details

  • Refactored the prebuild functionality to be promise based instead of callback based, this had a pretty big effect on the unit tests, so did some refactoring there too

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Merging #230 (b978dec) into main (46b4261) will increase coverage by 0.51%.
The diff coverage is 98.86%.

@@            Coverage Diff             @@
##             main     #230      +/-   ##
==========================================
+ Coverage   97.19%   97.70%   +0.51%     
==========================================
  Files           5        5              
  Lines         713      654      -59     
==========================================
- Hits          693      639      -54     
+ Misses         20       15       -5     
Flag Coverage Δ
integration-tests-16.x-linux 83.94% <70.45%> (-0.63%) ⬇️
integration-tests-16.x-windows-2019 83.94% <70.45%> (+4.98%) ⬆️
integration-tests-16.x-windows-latest 83.94% <70.45%> (+4.98%) ⬆️
integration-tests-18.x-linux 83.63% <70.45%> (-0.66%) ⬇️
integration-tests-18.x-windows-2019 83.63% <70.45%> (?)
integration-tests-18.x-windows-latest 83.63% <70.45%> (+4.95%) ⬆️
integration-tests-20.x-linux 85.77% <84.09%> (+1.48%) ⬆️
integration-tests-20.x-windows-2019 83.63% <70.45%> (+4.95%) ⬆️
integration-tests-20.x-windows-latest 83.63% <70.45%> (+4.95%) ⬆️
unit-tests-16.x-linux 87.92% <98.86%> (-0.02%) ⬇️
unit-tests-16.x-windows-2019 87.46% <97.72%> (-0.34%) ⬇️
unit-tests-16.x-windows-latest 87.46% <97.72%> (-0.34%) ⬇️
unit-tests-18.x-linux ?
unit-tests-18.x-windows-2019 87.15% <97.72%> (-0.37%) ⬇️
unit-tests-18.x-windows-latest 87.15% <97.72%> (-0.37%) ⬇️
unit-tests-20.x-linux 87.61% <98.86%> (-0.05%) ⬇️
unit-tests-20.x-windows-2019 87.15% <97.72%> (-0.37%) ⬇️
unit-tests-20.x-windows-latest 87.15% <97.72%> (-0.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
lib/pre-build.js 98.56% <98.78%> (+1.59%) ⬆️
lib/gyp-utils.js 97.93% <100.00%> (-0.09%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mrickard mrickard self-assigned this Jul 26, 2023
mrickard
mrickard previously approved these changes Jul 26, 2023
Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

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

It's not clear to me the test that is asserting it is attempting to download first before trying to build.

@jmartin4563
Copy link
Contributor Author

It's not clear to me the test that is asserting it is attempting to download first before trying to build.

I've updated the test to use calledBefore and calledAfter to assert the correct order of operations, lemme know if you wanted more than that

@jmartin4563 jmartin4563 merged commit 2fbe5e4 into newrelic:main Aug 7, 2023
12 checks passed
@jmartin4563 jmartin4563 deleted the switch-to-download-first branch August 7, 2023 15:19
@github-actions github-actions bot mentioned this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Attempt downloading pre-built first before building
3 participants