-
Notifications
You must be signed in to change notification settings - Fork 277
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 single version loose param for building plugins #4468
Conversation
Signed-off-by: Derek Ho <[email protected]>
@peterzhuamazon @prudhvigodithi can you folks take a look at this? I see autocuts in several repos that should be fixed by this change. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4468 +/- ##
==========================================
+ Coverage 91.99% 92.19% +0.20%
==========================================
Files 192 192
Lines 6284 6292 +8
==========================================
+ Hits 5781 5801 +20
+ Misses 503 491 -12 ☔ 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.
In build we have already decided to not use this param, due to us already have a way to cleanup previous plugin build leftovers.
It could be that the single version check failed due to the version difference between OSD core and the plugin. I suppose we still need the |
Signed-off-by: Derek Ho <[email protected]>
@derek-ho in |
Signed-off-by: Derek Ho <[email protected]>
Done - missed that one, thanks! @prudhvigodithi lint checker is timing out, seems flaky, can you re-run it? |
@@ -98,7 +98,7 @@ mkdir -p $OUTPUT/plugins | |||
cp -r ../$PLUGIN_NAME/ ../OpenSearch-Dashboards/plugins | |||
echo "BUILD MODULES FOR $PLUGIN_NAME" | |||
CURR_DIR=`pwd` | |||
cd ../OpenSearch-Dashboards; eval $NVM_CMD; yarn osd bootstrap | |||
cd ../OpenSearch-Dashboards; eval $NVM_CMD; yarn osd bootstrap --single-version=loose |
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.
This is not fully applicable due to this will affect 1.x.
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.
@peterzhuamazon what do you suggest here, should we add a version check here to make sure we only run this above a specific version?
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.
@peterzhuamazon Any idea how to proceed here? Looks like many plugins are failing for 2.13.0 because of this.
@derek-ho can you please fix the failing checks? |
I think the lint check failing is not due to my changes - it is complaining about release notes, which I did not touch. Can you re-run the check again? Please let me know what else needs to happen to get this in - it will resolve several autocuts, thanks! |
Will discuss with @derek-ho to resolve this. |
Waiting to see if same issues showing up in 2.13, seems fine now according to @derek-ho. |
Seems running fine in 2.13 version. Thanks. |
The builds are still failing due to single version check for security dashboards plugin, CI logs here Error log shows it failed on single version check for
The reason why it succeed on release branch is |
@peterzhuamazon @prudhvigodithi can you help us with this? |
Seems like RC2 is already out. Please re-open if you still need this. Thanks. |
Thanks @peterzhuamazon, the point is it succeed on release branch( |
@peterzhuamazon I think we need to get this merged to get security building on the main branch again, can you help out? This is my analysis showing that we need this PR merged: The latest docker image of 3.0 is using the highlighted commit, which is the last day prior to the merging of the PR that introduced cypress. Thus we need to introduce the loose param to allow building of security dashboards plugin in the docker image. Can you please help us get this merged? This is blocking cypress testing in the FTR on the main branch |
Maybe we should prioritize upgrading cypress instead of allowing loose paramter. Thoughts? cc: @ruanyl |
@peterzhuamazon @ruanyl @cwperks @SuZhou-Joe adding some more weight behind this decision: I see several autocuts across multiple plugin repos: https://github.com/search?q=org%3Aopensearch-project+%5BAUTOCUT%5D+Distribution+Build+Failed+for+*-3.0.0+is%3Aopen&type=issues. It seems like many of these were also opened around feb 16 time frame, and may also be due to incompatible cypress dependency. I think we should try to fix this ASAP to get the docker images/builds updated. Right now we are several months behind. I think bumping cypress would take some time/buy in from the core dashboards team, can we get this merged in as a temporary fix please? |
Since this is a dev dependency, what is the drawback to letting dashboards plugin developer teams upgrade this dependency independently? Security needs Cypress >= 12 for cross-origin testing. If its mandated that all dashboards-plugins use the same version then it requires all dashboards plugins to upgrade before Security can get the features needed for testing SSO. What is the effort to upgrade the version of cypress in OSD core? OSD core added cypress as a dependency 4 months ago in opensearch-project/OpenSearch-Dashboards@55443f7 which is when the dashboards plugins started failing. |
Maybe updating I think plugin owner should not be limited to use the same version of DEV dependencies as OSD core or other plugins, they should have the "freedom" to choose the tools that's better for them during the development as long as the dependencies are the same. And the |
@peterzhuamazon thoughts? |
Verified that this does not throw errors on 1.3 branch, so no version logic is needed |
You are absoloutely right!
There are 3 things that
All 3 of these are completely safe. Additionally, @derek-ho ran an experiment and found that the extra CLI parameter handed to |
After having a discussion with @derek-ho offline. We cleared some confusions and proposed some new solutions:
Since --single-version might also touch regular dependencies, we suggest adding individual custom build script in corresponding plugin repo as
Thanks. |
Signed-off-by: Derek Ho <[email protected]>
As we discussed this PR will only include --single-version changes in version bump workflows. Thanks. |
Description
Coming from: opensearch-project/OpenSearch-Dashboards#5675, this PR adds the flag to have loose single-version dependencies. Ideally this should not be enforced for devDependencies, but should unblock the build.
Category
CI fix.
Why these changes are required?
OSD core added a dependency to cypress 9.5.4 (mismatching with the version in this repo) here: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5725/files#r1494915750, leading to error at bootstrap.
What is the old behavior before changes and new behavior after changes?
Old behavior is that the bootstrap process would fail. OSD core added a dependency to cypress 9.5.4 in this PR: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5725/files#r1494915750. Since we need cypress 13 in order to run our test suites (including cross-origin support), bootstrapping the plugin with OSD fails since there is a version mismatch. With this new flag, this inconsistency is ignored and the CI is green.
Issues Resolved
Related to: opensearch-project/security-dashboards-plugin#1786. However that issue is coming from autocuts. We need opensearch-build repo to take in this change to close the autocut.
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.