Skip to content
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

Bumps version of main to 2.0.0.0 #928

Merged

Conversation

DarshitChanpura
Copy link
Member

@DarshitChanpura DarshitChanpura commented Mar 25, 2022

Description

Bumps version to 2.0.0.0

Issues resolved

Category

Maintenance

Check List

  • Commits are signed per the DCO using --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.

@DarshitChanpura DarshitChanpura requested a review from a team March 25, 2022 15:11
@DarshitChanpura DarshitChanpura changed the title Bumps version to 2.0.0.0 Bumps version of main to 2.0.0.0 Mar 25, 2022
@DarshitChanpura DarshitChanpura changed the title Bumps version of main to 2.0.0.0 Bumps version of main to 2.0.0.0 Mar 25, 2022
@DarshitChanpura
Copy link
Member Author

DarshitChanpura commented Mar 25, 2022

This build requires 2.0.0.0 artifact for opensearch-security and hence can only be merged after backend is updated.
See: #1698

peternied
peternied previously approved these changes Mar 25, 2022
@DarshitChanpura
Copy link
Member Author

The test-build seems to be failing because it needs node version upgrade to node@14.18.2, and the PR: #924 is failing because it needs version to be upgraded to 2.0.0.0 which inherently creates a deadlock. How should we proceed @opensearch-project/security ?

@peternied
Copy link
Member

@DarshitChanpura Can we do both changes in the same PR?

@DarshitChanpura
Copy link
Member Author

This build requires 2.0.0.0 artifact for opensearch-security and hence can only be merged after backend is updated. See: #1698

On top of node 14 upgrade, this still stands true. This build requires 2.0.0.0 artifact built for opensearch-security

@DarshitChanpura Can we do both changes in the same PR?

Okay I will bring node14 upgrade changes in this PR.

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2022

Codecov Report

Merging #928 (e8de1fb) into main (fc7b8cc) will increase coverage by 0.15%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #928      +/-   ##
==========================================
+ Coverage   71.98%   72.14%   +0.15%     
==========================================
  Files          87       87              
  Lines        1906     1906              
  Branches      247      242       -5     
==========================================
+ Hits         1372     1375       +3     
+ Misses        480      477       -3     
  Partials       54       54              
Impacted Files Coverage Δ
...plugins/security-dashboards-plugin/public/index.ts 0.00% <0.00%> (ø)
.../apps/configuration/panels/role-view/role-view.tsx 86.30% <0.00%> (+4.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc7b8cc...e8de1fb. Read the comment docs.

@DarshitChanpura
Copy link
Member Author

I'm trying to debug Unit tests which fail due to mismatch in Jest snapshot matching: See here

Meanwhile if you know anything about this error please let me know.

@DarshitChanpura
Copy link
Member Author

DarshitChanpura commented Mar 29, 2022

I'm trying to debug Unit tests which fail due to mismatch in Jest snapshot matching: See here

Meanwhile if you know anything about this error please let me know.

I'm unable to reproduce it on local. All the unit tests pass when I run them in the same setup.

Steps that I followed to run the unit tests:

  1. Fork core dashboards (main branch)
  2. Install security plugin (version-bump-2.0.0.0 branch)
  3. Run the tests with this command: node ./test/run_jest_tests.js --config ./test/jest.config.ui.js

@peternied
Copy link
Member

@DarshitChanpura Looks like there are some unit tests failures, Seperately, I'm looking into the integration test failures, I know we will need a code change for at least one of them

@DarshitChanpura
Copy link
Member Author

@DarshitChanpura Looks like there are some unit tests failures, Seperately, I'm looking into the integration test failures, I know we will need a code change for at least one of them

I have fixed unit tests and will push the change soon

@DarshitChanpura DarshitChanpura force-pushed the version-bump-2.0.0.0 branch 2 times, most recently from ca304c8 to 6a43aa6 Compare April 6, 2022 18:17
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
@DarshitChanpura
Copy link
Member Author

We can re-run the integration tests job once security plugin is added to opensearch-build manifest for 2.0.0

@peternied
Copy link
Member

peternied commented Apr 7, 2022

@DarshitChanpura Note; this is still waiting on opensearch-project/opensearch-build#1924 to be merged and a new build has been produced

@DarshitChanpura DarshitChanpura force-pushed the version-bump-2.0.0.0 branch 4 times, most recently from 5c39f76 to 715580c Compare April 7, 2022 21:01
common/index.ts Outdated
@@ -44,5 +44,6 @@ export enum AuthType {
*/
export function isValidResourceName(resourceName: string): boolean {
// see: https://javascript.info/regexp-unicode
return !/[\p{C}%]/u.test(resourceName) && resourceName.length > 0;
const exp = new RegExp('[p{C}%]', 'u');
Copy link
Member

@peternied peternied Apr 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is going to match the p character, I think you need \p{C} if you want to make sure that we are looking for 'other' unicode characters

…oves test workflow filter for branches

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@@ -16,7 +16,7 @@ exports[`Account navigation button renders 1`] = `
id="actionsMenu"
isOpen={false}
onClick={[Function]}
ownFocus={false}
ownFocus={true}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this was asked before, but why this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is because the unit test were failing due to jest snapshot mismatch... this is something worth the discussion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this control was likely modified by a change in the styles from OpenSearch-Dashboards. We should follow up and confirm that our UI looks clean and behaves as expected between 1.3.X and this 2.0.0 version.

I've created #938 for following up on this.

@@ -171,7 +171,7 @@ export class BasicAuthRoutes {
? this.coreSetup.http.basePath.serverBasePath
: '/';
const requestQuery = request.url.query as ParsedUrlQueryParams;
if (requestQuery.nextUrl !== undefined) {
if (requestQuery?.nextUrl !== undefined) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created #936 to follow up, we should stop using the legacy url.query method

@peternied peternied merged commit afa8f13 into opensearch-project:main Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure plugins work with Dashboards Node v14.18.2
4 participants