-
Notifications
You must be signed in to change notification settings - Fork 159
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
Add step to install dependencies prior to building #1743
Add step to install dependencies prior to building #1743
Conversation
Signed-off-by: Derek Ho <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1743 +/- ##
=======================================
Coverage 67.09% 67.09%
=======================================
Files 94 94
Lines 2404 2404
Branches 318 318
=======================================
Hits 1613 1613
Misses 713 713
Partials 78 78 ☔ View full report in Codecov by Sentry. |
7716890
to
f0913eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTGM! Thanks @derek-ho
Confirm that this is how opensearch-build runs the build of plugin zips: https://github.com/opensearch-project/opensearch-build/blob/main/scripts/default/opensearch-dashboards/build.sh#L101 |
Signed-off-by: Derek Ho <[email protected]> (cherry picked from commit df1a4ea)
Signed-off-by: Derek Ho <[email protected]> (cherry picked from commit df1a4ea) Co-authored-by: Derek Ho <[email protected]>
Description
This PR adds a step to install the dependencies prior to building. This will fix the workflow of installing the binary when the dependent libraries are not installed yet, leading to false-positive failures of the install via binary workflow.
The reason why this was not caught before is that security dashboards plugin's current dependencies are only used in the
server
andtest
folders. In the build process, there is a step to run yarn to install dependencies, but the workflow is erroring out in the @osd/optimizer step when trying to add dependencies that live in thepublic
folder. This is because the front end code needs to be bundled and thus when a dependency is not there it will error out. This should fix the build and install workflow for dependencies used in the frontendpublic
folder.We should not rely on some implementation detail of how OSD core runs
yarn build
and instead makes sure all necessary dependencies are available when we run that command.Category
[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]
Why these changes are required?
What is the old behavior before changes and new behavior after changes?
Issues Resolved
[List any issues this PR will resolve (Is this a backport? If so, please add backport PR # and/or commits #)]
Testing
[Please provide details of testing done: unit testing, integration testing and manual testing]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.