Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 3.05 KB

DEVELOPER_GUIDE.md

File metadata and controls

54 lines (37 loc) · 3.05 KB

Developer Guide

So you want to contribute code to this project? Excellent! We're glad you're here. Here's what you need to do.

Forking and Cloning

Fork this repository on GitHub, and clone locally with git clone.

Install Prerequisites

JDK 11

OpenSearch components build using Java 11 at a minimum and supports JDK 11, 17. This means you must have a JDK of supported version installed with the environment variable JAVA_HOME referencing the path to Java home for your JDK installation, e.g. JAVA_HOME=/usr/lib/jvm/jdk-11.

Building

To build from the command line, use ./gradlew.

./gradlew clean
./gradlew build
./gradlew publishToMavenLocal

./gradlew spotlessApply formats code. ./gradlew paBwcCluster#mixedClusterTask -Dtests.security.manager=false launches a cluster with three nodes of bwc version of OpenSearch with performance-analyzer and tests backwards compatibility by upgrading one of the nodes with the current version of OpenSearch with performance-analyzer creating a mixed cluster. ./gradlew paBwcCluster#rollingUpgradeClusterTask -Dtests.security.manager=false launches a cluster with three nodes of bwc version of OpenSearch with performance-analyzer and tests backwards compatibility by performing rolling upgrade of each node with the current version of OpenSearch with performance-analyzer. ./gradlew paBwcCluster#fullRestartClusterTask -Dtests.security.manager=false launches a cluster with three nodes of bwc version of OpenSearch with performance-analyzer and tests backwards compatibility by performing a full restart on the cluster upgrading all the nodes with the current version of OpenSearch with performance-analyzer. ./gradlew bwcTestSuite -Dtests.security.manager=false runs all the above bwc tests combined. ./gradlew integTestRemote -Dtests.enableIT -Dtests.useDockerCluster -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin launches integration tests against a local cluster and run tests with security

Using IntelliJ IDEA

Launch Intellij IDEA, choose Import Project, and select the build.gradle file in the root of this package.

Submitting Changes

See CONTRIBUTING.

Backports

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.