-
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
Run Security dashboards plugin from binary #1726
Conversation
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
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 #1726 +/- ##
=======================================
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. |
Verified that this would have caught the types error we saw recently: https://github.com/opensearch-project/security-dashboards-plugin/actions/runs/7450037673/job/20268031021?pr=1726 |
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.
Thank you @derek-ho! I left a couple of comments. I'd like to understand when the min distribution of OSD core to published to see if it has the freshest changes or if there is a risk that this repo would be integrating with stale artifacts.
That link is related to the latest build /latest/ will be replaced by the build id of the latest. I tried building OSD-core prior to this commit: 48af998. IMHO that is also valid, but after thinking it through, we should not be responsible for the build process of core, and instead rely on the build team for that. If there is an issue with core, both would fail anyway, so we should just rely on the build team. |
For core we download the following artifacts:
These artifacts are published after PRs are merged into the release branches in the core repo. Integrating with the latest commits in Core or OSD Core help uncover issues quickly so I think it makes sense to aim for integrating with the most up-to-date changes if its possible. |
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.
Hi @derek-ho, thanks for taking this on. I know this is still the draft version, but I just left some early thoughts on this.
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.
Nice work, a couple of comments inline - before we merge, I'd also like to see a set of 10x runs of all jobs so we can be sure they have good stability
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
…m public folder (opensearch-project#1705)" This reverts commit 09b2f59. Signed-off-by: Derek Ho <[email protected]>
…rver from public folder (opensearch-project#1705)"" This reverts commit 2de58e3. Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
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.
Overall looks good to me just one spot where I am not sure if an ambersand is needed or not.
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.
thanks @derek-ho !
Signed-off-by: Derek Ho <[email protected]> (cherry picked from commit 9b88d92)
Description
Runs Opensearch dashboards from binary after installing a fresh build of security dashboards plugin. This should help catch issues not currently caught in our CI.
Category
[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]
Why these changes are required?
The purpose of this PR is to catch issues that may not be caught at development time. For example: when building the code, the front end code in the
public
folder will be compiled and bundled, the server code in theserver
folder will be compiled but not bundled. Thus, when you try to import a type from the public folder in the server folder, such asimport { ResourceType } from '../../public/apps/configuration/types';
, it wouldn't actually work with the built artifact. However, my current understanding is that since when you are developing locally this path actually exists, so thus this error was not caught. Running this workflow and doing a simple health check to verify that there was no fatal error in starting OSD should catch these issues.Example of this new workflow catching previous errors: https://github.com/opensearch-project/security-dashboards-plugin/actions/runs/7543546304/job/20534811372
More about bundling here: https://snipcart.com/blog/javascript-module-bundler
What is the old behavior before changes and new behavior after changes?
Issues Resolved
Fix: #1709
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.