-
Notifications
You must be signed in to change notification settings - Fork 58
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
Remove legacy dependency #702
Conversation
@opensearch-project/opensearch-dashboards-core could I get assistance in understanding why this dependency is not needed anymore? My understanding is it was needed somewhere in the build or bootstrap logic for combining dependencies from core + plugin to build/run the plugin successfully. Is there any reference PR in core that I could reference here? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #702 +/- ##
=======================================
Coverage 50.31% 50.31%
=======================================
Files 166 166
Lines 5593 5593
Branches 1074 1074
=======================================
Hits 2814 2814
Misses 2508 2508
Partials 271 271 ☔ View full report in Codecov by Sentry. |
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.
Can we just completely delete yarn.lock
and add it to .gitignore
since it's always re-generated at run time anyway? Or would that prevent the CVE scanners from figuring out what needs updating?
We still want the lockfile, and with this fix it should not be re-generated often; only when we make direct changes in our package.json. The reason it was much more fluid before is the fact it was pulling in updated dependencies from the tip of main of core OSD. |
@kavilla any further insight on this? |
@@ -23,7 +23,6 @@ | |||
] | |||
}, | |||
"devDependencies": { | |||
"@elastic/eslint-import-resolver-kibana": "link:../../packages/osd-eslint-import-resolver-opensearch-dashboards", |
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.
I would modify: https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/blob/main/.eslintrc.yml#L6 as well.
From my understanding this dependency has it's use cases but I don't see it being used within this plugin repo that makes it worth linking.
If this was a shared repo in the past, or if you need to extend the imports rules then I get see it. But after removing and modifying the eslintrc, I needed to modify the import orders as I believe our lint rules kicked in for import order and it didn't treat your plugin as the root directory
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Removed lintfile, re-did a bunch of sanity checks, looks good.
UT:
Build:
Sanity tested functionality and checked all pages on local cluster, no problems. |
I see some failures in plugin bootstrap in CI, should we address these? |
CI passes for linux. The failure is some timeout issue specific to windows, I believe this is an overall infra issue across the project, needs further investigation. Remote integ test failure is being addressed by @jackiehanyang , Jackie, can you include this in your investigation? Prefer to keep the scope the same for this PR. |
Signed-off-by: Tyler Ohlsen <[email protected]> (cherry picked from commit b10271c)
Description
Remove a legacy dependency not needed by plugins anymore. The consequence is it removes a huge amount of transitive dependencies in
yarn.lock
, many of which are dated and frequently cause CVE-related issues.Testing done
yarn build
worksyarn osd bootstrap
worksStill understanding other potential impacts and original reasoning for having this dependency, will update here when more is learned from @opensearch-project/opensearch-core team.UPDATE: this has been confirmed by @kavilla , no other concerns.Check List
--signoff
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.