-
Notifications
You must be signed in to change notification settings - Fork 92
Update 3.0.0 qualifier from alpha1 to beta1 [DO NOT MERGE] #1291
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
Conversation
Signed-off-by: Vaibhav Agarwal <[email protected]>
"cypress": "12.17.4", | ||
"cypress": "^13.6.0", |
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.
is there a reason upgrade cypress version? i see CI was failing because version conflicts
cypress
12.17.4 => opensearch-dashboards
^13.6.0 => opensearch_index_management_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.
This is unusual , because when I ran 'yarn osd bootstrap', it showed me the following error:
The conflicting dependencies are:
cypress
^13.6.0 => opensearch-dashboards
12.17.4 => opensearch_index_management_dashboards
To fix this, I updated the cypress version.
I referred to line 414 of https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/package.json
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.
Should probably change that to main instead.
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.
honestly my recommendation is just delete this line completely and rely on the reference in OSD package.json
make sure CIs are passed before merge |
Signed-off-by: Vaibhav Agarwal <[email protected]>
Signed-off-by: Vaibhav Agarwal <[email protected]>
@kavilla @angle943 @d-buckner @peterzhuamazon We see that Run binary Installation test is not able pass because of the changes in Bump monaco-editor from 0.17.0 to 0.30.1. |
Signed-off-by: Vaibhav Agarwal <[email protected]>
This error occurs because the ?? (nullish coalescing operator) is not being handled correctly during build |
Signed-off-by: Vaibhav Agarwal <[email protected]>
Signed-off-by: Vaibhav Agarwal <[email protected]>
the error is still happening. The error happens when running BTW, we should not be using |
We have bumped to 0.52.0. Please refer to these documents: I have reproduced the error. The original issue that the index-management is directly importing the Monaco editor's JSON mode from monaco-editor/esm/vs/language/json/jsonMode.js, which contains the nullish coalescing operator (??) that's causing the build error. Why just adding the Babel plugin didn't workWhen you added @babel/plugin-proposal-nullish-coalescing-operator to both babel.config.js and opensearch_dashboards.json, it should theoretically have allowed the build process to handle the nullish coalescing operator (??) syntax. However, the build still failed because:
How to make it workInstead of trying to make the build process handle the problematic syntax, we could use a different approach:
Why this approach works better
This is a common pattern in software development - sometimes it's better to avoid a problem entirely rather than trying to fix it, especially when dealing with build configurations and third-party packages. Detailed changes
I have run |
Signed-off-by: Vaibhav Agarwal <[email protected]>
Signed-off-by: Vaibhav Agarwal <[email protected]>
@ananzh @peterzhuamazon @ruchidh Looks like JSON mode setup that was previously handled by importing the I checked in with UI, Jsoneditor is no longer available.
Without jsonMode.js, the JSON Editor functionality breaks, as evidenced by the error trace: Sorry for not noticing this earlier. |
The index-management-dashboards-plugin was failing to build with a specific error related to the nullish coalescing operator (??) in Monaco editor code:
This error occurred in the build process when the plugin tried to use the JSON editor functionality for creating and editing index mappings. The error trace showed the dependency chain:
This chain leads to the CreateIndex component, which is a critical part of the plugin that allows users to create and edit index mappings using a JSON editor. So we have useed @osd/monaco, which follows OpenSearch Dashboards best practices by using the official Monaco wrapper. You will need to make more changes to adapt this change. We should add/modify
This can ensure that the JSON editor in the create_index form works correctly without requiring changes to the build configuration or the MonacoJSONEditor component itself. The key insight was that instead of trying to make the build process handle the nullish coalescing operator, we implemented our own version of the JSON language support that provides the same functionality without using this modern JavaScript syntax feature. Can you try to update json.ts to
|
with above changes from anan and combining below changes .
|
Signed-off-by: Vaibhav Agarwal <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1291 +/- ##
==========================================
- Coverage 60.92% 60.89% -0.04%
==========================================
Files 348 348
Lines 12842 12865 +23
Branches 2589 2598 +9
==========================================
+ Hits 7824 7834 +10
- Misses 4279 4289 +10
- Partials 739 742 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Vaibhav Agarwal <[email protected]>
Hi @vaibhoag is this ready to merge now? Thanks. |
@peterzhuamazon I am working on adapting changes which are coming after cypress version upgrade. I will update on this asap. |
Description
Update 3.0.0 qualifier from alpha1 to beta1
Issues Resolved
[List any issues this PR will resolve]
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.