-
Notifications
You must be signed in to change notification settings - Fork 164
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
Updates Dev guide #897
Updates Dev guide #897
Conversation
Codecov Report
@@ Coverage Diff @@
## main #897 +/- ##
=======================================
Coverage 72.14% 72.14%
=======================================
Files 87 87
Lines 1906 1906
Branches 242 242
=======================================
Hits 1375 1375
Misses 477 477
Partials 54 54 Continue to review full report at Codecov.
|
DEVELOPER_GUIDE.md
Outdated
|
||
As a prerequisite, please follow [the developer guide of the Security Plugin](https://github.com/opensearch-project/security/blob/main/DEVELOPER_GUIDE.md). This will leave you with a running OpenSearch server with security enabled. For the sake of this guide, let's assume the latest versions at the time of writing (`1.3.0-SNAPSHOT` for OpenSearch and OpenSearch Dashboards, and `1.3.0.0-SNAPSHOT` for both backend and frontend (this repo) security plugins.) Update the config file (`config/opensearch.yml`) to look like this one: | ||
This project is as a plugin of [OpenSearch-Dashboards](**https://github.com/opensearch-project/OpenSearch-Dashboards). It requires an [OpenSearch](https://github.com/opensearch-project/OpenSearch) server running with the [Security](https://github.com/opensearch-project/security) plugin installed. At the time of this writing there is a strict version check between these components, so we recommend running all of them from their respective branches with matching versions (this will also ensure they work well together before we cut a new release.) |
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.
Probably a typo (is as a plugin)
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.
fixed it
DEVELOPER_GUIDE.md
Outdated
@@ -39,7 +49,15 @@ node.max_local_storage_nodes: 3 | |||
######## End OpenSearch Security Demo Configuration ######## | |||
``` | |||
|
|||
Next, we need to check out OpenSearch Dashboards from the branch matching our version, in this example that would be the [1.x branch](https://github.com/opensearch-project/OpenSearch-Dashboards/tree/1.x). Follow the [developer guide](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/1.x/DEVELOPER_GUIDE.md) and replace the version of `opensearch-dashboards.yml` there with this: | |||
|
|||
**Please Note** : This project runs on node `10.24.1` and so when installing node please ensure that you install this version. You can do so by running |
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'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)
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.
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"
DEVELOPER_GUIDE.md
Outdated
|
||
**Please Note** : This project runs on node `10.24.1` (refer to the `.nvmrc` or `.node-version` file in the base directory for correct version) and so when installing node please ensure that you install this version. You can do so by running | ||
```script | ||
nvm install 10.24.1 |
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.
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
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.
What's the deal with this comment?
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.
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.
DEVELOPER_GUIDE.md
Outdated
|
||
**IMPORTANT**: Throughout this guide we will be using 1.x branches as our source for all 4 repos (OpenSearch, OpenSearch-Dashboards, security and security-dashboards-plugin). | ||
|
||
> NOTE: If you are following this guide by the dot, please make sure that source code that you compile for OpenSearch project using `./gradlew localDistro` is done from [1.x branch](https://github.com/opensearch-project/OpenSearch/tree/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.
Are we updating this statement every time the branch is changed?
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.
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)
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 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
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 have added the relevant branch and version info here... we can add info to this table as we develop in the future
\ | ||
For the sake of this guide, let's assume that the latest versions (`1.3.0-SNAPSHOT` for OpenSearch and OpenSearch Dashboards, and `1.3.0.0-SNAPSHOT` for the backend and the frontend of this Security plugin). | ||
|
||
Next, ensure that the config file (`config/opensearch.yml`) in the OpenSearch home directory where you copied the source code using the [dev-guide](https://github.com/opensearch-project/security/blob/main/DEVELOPER_GUIDE.md#:~:text=export%20OPENSEARCH_HOME%3D~/Test/opensearch%2D1.3.0%2DSNAPSHOT) (basically `cd $OPENSEARCH_HOME`) contains this: |
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.
@hsiang9431-amzn @davidlago ... can you please review this again?
9e14591
to
dae6866
Compare
ITs failed. Would you please take a look? |
Is there a template reference of the Dev Guide? |
I did sign all the commits idk why it says Unsigned...Shouldn't DCO check fail if commits are unsigned? |
ITs are failing because the integration test uses 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:
This change will be updated to point to main in 2.0 version bump PR: #928 |
I would suggest waiting until |
@DarshitChanpura |
7017582
to
1643fea
Compare
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
1643fea
to
bc16209
Compare
@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) | |
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.
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.
Signed-off-by: Darshit Chanpura <[email protected]> (cherry picked from commit b6fe0c0)
Signed-off-by: Darshit Chanpura <[email protected]> (cherry picked from commit b6fe0c0) Co-authored-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Vasile Negru <[email protected]>
Description
Enhances the dev-guide to be more elaborative and intuitive.
Category
Documentation
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.