Open dblock opened 3 years ago
Had a offline sync with kavilla, thinking the right solution should be letting plugin owner figure out what modules are required from OSD for plugin build. The current situation is we have many plugins, and each has a different dependency hierarchy with OSD modules. (And some plugin have import module with relative path pointing to OSD src folder). This makes it quite hard to develop a fit-all solution from OSD side. Prefer to hand this work to plugin owner to achieve.
We were thinking about to solve this issue we will allow for multiple components to be passed so it builds together
We can try to use this for the fixes.
One way might be to use local-npm (similar to maven local). Build dashboards and push to local-npm (one time) and then build the components on top of it. I have not tested this myself but can be one of the option.
@kavilla @tianleh Is this still an open issue?
Since we already implement the --component on both build and jenkins I think this can be closed. Thanks.
This problem is about developers, not Jenkins, see description of the issue. I don't think it should be closed.
@seanneumann @kavilla This needs to be prioritized to improve the build generation velocity. Can you please prioritize this as soon as possible?
Hey @bbarani. Taking a look with the team now.
@seanneumann @kavilla This needs to be prioritized to improve the build generation velocity. Can you please prioritize this as soon as possible?
Right now it does re-use the build from OpenSearch Dashboards in the default script:
I don't think this will improve build generation velocity besides if we only just want to build a singular component which based on Peter's comment it is supported on Jenkins. Solving this would allow for developers locally to push out if they wanted to build out --component securityDashboards
.
Is there a case that this impacting @bbarani?
@kavilla As far as I know, this is needed for granular build generation process work that is described here. @peterzhuamazon, you mentioned that we can overcome this blocker by Bootstrapping the core, is that a long term solution?
The bootstrapping also causes the core build to fail if any of the plugins fail to build as well
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 127: /usr/share/opensearch/.nvm/versions/node/v14.20.1/lib/node_modules/yarn/bin/yarn.js install --non-interactive
at makeError (/tmp/tmpj52kld9y/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:25150:11)
at handlePromise (/tmp/tmpj52kld9y/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:24085:26)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async installInDir (/tmp/tmpj52kld9y/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:23821:3)
at async Project.installDependencies (/tmp/tmpj52kld9y/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:14780:5)
at async Object.run (/tmp/tmpj52kld9y/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:9003:11)
at async runCommand (/tmp/tmpj52kld9y/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:57870:5)
at async Module.run (/tmp/tmpj52kld9y/OpenSearch-Dashboards/packages/osd-pm/dist/index.js:263:3)
error Command failed with exit code 1.
I found a couple of solutions in this article https://medium.com/@debshish.pal/publish-a-npm-package-locally-for-testing-9a00015eb9fd which can be used to publish opensearch-dashboards as a local npm package rather than bootstraping everytime (if I understand if correctly). Please take a look and see if this can be helpful. Also not sure if @Tengda-He is still working on this issue. If not please assign a new assignee. Removing the assignee for now.
Thanks!
@kavilla @AMoo-Miki @ashwin-pc Wondering if you have any inputs for this issue? Thanks!
I am not sure I understand the problem enough or the historical context of this issue.
Describe the bug
OpenSearch dashboards requires to rebuild core every single time to build any of the components, which makes it very slow to debug component build problems.
To reproduce
Succeeds for all components.
Fails with
Expected behavior
We could adopt something similar to how OpenSearch builds into
~/.m2
for dependencies with npm local, so that the output from the dashboards core could be published and preserved.