So you want to contribute code to this project? Excellent! We're glad you're here. Here's what you need to do.
Fork this repository on GitHub, and clone locally with git clone
.
You will need to install node.js, nvm, and yarn in your environment to properly pull down dependencies to build and bootstrap the plugin.
-
Download OpenSearch for the version that matches the OpenSearch Dashboards version specified in package.json.
-
Download and install the appropriate Index Management OpenSearch Plugin.
-
Download the OpenSearch Dashboards source code for the version specified in package.json you want to set up.
See the OpenSearch Dashboards contributing guide and developer guide for more instructions on setting up your development environment.
-
Change your node version to the version specified in
.node-version
inside the OpenSearch Dashboards root directory (this can be done with thenvm use
command). -
Create a
plugins
directory inside the OpenSearch Dashboards source code directory, ifplugins
directory doesn't exist. -
Check out this package from version control into the
plugins
directory. -
Run
yarn osd bootstrap
insideOpenSearch-Dashboards/plugins/index-management-dashboards-plugin
.
Ultimately, your directory structure should look like this:
.
├── OpenSearch-Dashboards
│ └──plugins
│ └── index-management-dashboards-plugin
To build the plugin's distributable zip simply run yarn build
.
Example output: ./build/index-management-dashboards-1.0.0.0.zip
In the base OpenSearch Dashboards directory, run
-
yarn start --no-base-path
Starts OpenSearch Dashboards and includes this plugin. OpenSearch Dashboards will be available on
localhost:5601
.
-
yarn start --no-base-path --no-watch --server.host="0.0.0.0"
Starts OpenSearch Dashboards and includes this plugin. This setup is necessary for running tests using
Cypress
onlocalhost:5601
.Important: The
--server.host="0.0.0.0"
parameter is crucial as it configures the server to accept connections from any IP address, which is necessary forCypress
to connect to the dashboard server. -
yarn test:jest
- Runs the plugin tests.
-
yarn run cypress open
- Opens the Cypress test runner
-
yarn run cypress run
- Runs the Cypress test runner
The Github workflow in backport.yml
creates backport PRs automatically when the
original PR with an appropriate label backport <backport-branch-name>
is merged to main with the backport workflow
run successfully on the PR. For example, if a PR on main needs to be backported to 1.x
branch, add a label
backport 1.x
to the PR and make sure the backport workflow runs on the PR along with other checks. Once this PR is
merged to main, the workflow will create a backport PR to the 1.x
branch.