Skip to content

Updates Dev guide#897

Merged
cliu123 merged 5 commits intoopensearch-project:mainfrom
DarshitChanpura:dev-guide-update
Jun 29, 2022
Merged

Updates Dev guide#897
cliu123 merged 5 commits intoopensearch-project:mainfrom
DarshitChanpura:dev-guide-update

Conversation

@DarshitChanpura
Copy link
Member

@DarshitChanpura DarshitChanpura commented Feb 1, 2022

Description

Enhances the dev-guide to be more elaborative and intuitive.

Category

Documentation

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 February 1, 2022 23:01
@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.21%. Comparing base (bc61403) to head (ed5c07d).
⚠️ Report is 295 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #897   +/-   ##
=======================================
  Coverage   72.21%   72.21%           
=======================================
  Files          87       87           
  Lines        1915     1915           
  Branches      249      249           
=======================================
  Hits         1383     1383           
  Misses        478      478           
  Partials       54       54           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Choose a reason for hiding this comment

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

Probably a typo (is as a plugin)

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed it

Choose a reason for hiding this comment

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

I'd probably make this relative to .node-version so we don't have to upgrade every time (I'm not sure if we already use a .node-version file but we should)

Copy link
Member Author

Choose a reason for hiding this comment

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

ahaa...yes...we do use .node-version and .nvm-rc.. I just added an extra explanation saying "refer to .node-version file in base directory"

davidlago
davidlago previously approved these changes Feb 2, 2022
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
nvm install 10.24.1
nvm use --install

That way we don't have to specify the version explicitly, since it is picked up from .nvmrc

Copy link
Member

Choose a reason for hiding this comment

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

What's the deal with this comment?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just an idea for an improvement on the docs. E.g. if we move towards 2.0 the node version changed and that would mean we always have to update the docs when we change .nvmrc. If we simply use the nvm use --install command we then don't have to upgrade the docs all the time.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we updating this statement every time the branch is changed?

Choose a reason for hiding this comment

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

L14 says this is used just during the guide as just an example. The paragraph above makes reference to the need for matching versions. But yeah, if we move to a major version (2, 3...) it might be a bit confusing so we can update. Perhaps we can omit L14 as L10 covers the general idea and then we move on to use 1.3.0 as a driving example (that part can stay as it is clear it's just for the sake of the example code)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think down the road when there are multiple versions and branches for developers to choose, adding a table to show each version with there corresponding branch will be helpful

Copy link
Member Author

Choose a reason for hiding this comment

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

I have added the relevant branch and version info here... we can add info to this table as we develop in the future

davidlago
davidlago previously approved these changes Feb 4, 2022
Copy link
Member Author

Choose a reason for hiding this comment

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

@hsiang9431-amzn @davidlago ... can you please review this again?

davidlago
davidlago previously approved these changes Feb 7, 2022
@cliu123
Copy link
Member

cliu123 commented Mar 28, 2022

ITs failed. Would you please take a look?

@cliu123
Copy link
Member

cliu123 commented Mar 28, 2022

Is there a template reference of the Dev Guide?
Please sign the commits. All commits are "Unverified".

@DarshitChanpura
Copy link
Member Author

Is there a template reference of the Dev Guide? Please sign the commits. All commits are "Unverified".

I did sign all the commits idk why it says Unsigned...Shouldn't DCO check fail if commits are unsigned?

@DarshitChanpura
Copy link
Member Author

DarshitChanpura commented Mar 28, 2022

ITs are failing because the integration test uses 1.x branch as base for OpenSearch-Dashboards (see here)

Because 1.x has been bumped to 1.4 in the core dashboards repo, there is a mismatch between plugin's expected version (1.4.0.0) and actual version (1.3.0.0) when integration tests are run. This results in failing ITs.

Error log from one of the failing tests:
start OpenSearch Dashboards server › call multitenancy info API as admin

    Failed to initialize plugins:
    	Plugin "securityDashboards" is only compatible with OpenSearch Dashboards version "1.3.0", but used OpenSearch Dashboards version is "1.4.0". (incompatible-version, /home/runner/work/security-dashboards-plugin/security-dashboards-plugin/OpenSearch-Dashboards/plugins/security-dashboards-plugin/opensearch_dashboards.json)

      214 |       .toPromise();
      215 |     if (errors.length > 0) {
    > 216 |       throw new Error(
          |             ^
      217 |         `Failed to initialize plugins:${errors.map((err) => `\n\t${err.message}`).join('')}`
      218 |       );
      219 |     }

      at PluginsService.handleDiscoveryErrors (src/core/server/plugins/plugins_service.ts:216:13)

This change will be updated to point to main in 2.0 version bump PR: #928

@DarshitChanpura
Copy link
Member Author

I would suggest waiting until main branch is bumped to 2.0 and then rebasing this branch with main before merging it.

@cliu123
Copy link
Member

cliu123 commented Jun 8, 2022

@DarshitChanpura main branch has been bumped to 2.1.0.0 now. Do you want to rebase and get it ready for review?

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

@opensearch-project/security Can I get review on this?


| OpenSearch<br>branch | Security Plugin<br>branch | OpenSearch<br>version |
|-------- |--- |--- |
| [1.x](https://github.com/opensearch-project/OpenSearch/tree/1.x) | [main](https://github.com/opensearch-project/security/) | [v1.3.0](https://github.com/opensearch-project/OpenSearch/blob/6eda740be744846f7aa0b2674820b5ed9b6be17e/buildSrc/version.properties#L1) |
Copy link
Member

Choose a reason for hiding this comment

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

While I think it would be better to use more recent builds, IMO any update to this guide that make it more usable are for the better, and we can update it afterward.

@cliu123 cliu123 merged commit b6fe0c0 into opensearch-project:main Jun 29, 2022
@cliu123 cliu123 added the backport 2.x backport to 2.x branch label Jul 28, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 28, 2022
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
(cherry picked from commit b6fe0c0)
peternied pushed a commit that referenced this pull request Jul 28, 2022
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
(cherry picked from commit b6fe0c0)

Co-authored-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
spartan2015 pushed a commit to spartan2015/security-dashboards-plugin that referenced this pull request Aug 8, 2022
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Vasile Negru <vasile@eosfintek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x backport to 2.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants