Skip to content

Commit

Permalink
Merge branch 'main' into feature/support_script_update_on_helpers_bulk
Browse files Browse the repository at this point in the history
  • Loading branch information
huuyafwww committed Jun 10, 2022
2 parents c052baf + 468b697 commit 4c555fd
Show file tree
Hide file tree
Showing 177 changed files with 32,620 additions and 23,653 deletions.
5 changes: 2 additions & 3 deletions .ci/opendistro/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3'

services:

elasticsearch:
build:
context: .
Expand All @@ -13,5 +12,5 @@ services:
- discovery.type=single-node
- bootstrap.memory_lock=true
ports:
- "9200:9200"
user: elasticsearch
- '9200:9200'
user: elasticsearch
2 changes: 1 addition & 1 deletion .ci/opensearch/Dockerfile.opensearch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG OPENSEARCH_VERSION
FROM opensearchproject/opensearch:$OPENSEARCH_VERSION
FROM opensearchproject/opensearch:${OPENSEARCH_VERSION}

ARG opensearch_path=/usr/share/opensearch
ARG opensearch_yml=$opensearch_path/config/opensearch.yml
Expand Down
3 changes: 1 addition & 2 deletions .ci/opensearch/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3'

services:

opensearch:
build:
context: .
Expand All @@ -13,5 +12,5 @@ services:
- discovery.type=single-node
- bootstrap.memory_lock=true
ports:
- "9200:9200"
- '9200:9200'
user: opensearch
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
coverage
26 changes: 26 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"env": {
"node": true,
"es6": true
},
"extends": [
"eslint:recommended",
"prettier"
],
"parser": "babel-eslint",
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
],
/*temporarily turn off no-unused-vars, open an issue to track https://github.com/opensearch-project/opensearch-js/issues/241*/
"no-unused-vars": "off",
/*temporarily turn off no-dupe-else-if, open an issue to track https://github.com/opensearch-project/opensearch-js/issues/240*/
"no-dupe-else-if": "off"
}
}
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This should match the team set up in https://github.com/orgs/opensearch-project/teams and include any additional contributors
* @opensearch-project/clients
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/BUG_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ A clear and concise description of the bug.

**How can one reproduce the bug?**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -20,9 +21,10 @@ Steps to reproduce the behavior:
A clear and concise description of what you expected to happen.

**What is your host/environment?**
- OS: [e.g. iOS]
- Version [e.g. 22]
- Plugins

- OS: [e.g. iOS]
- Version [e.g. 22]
- Plugins

**Do you have any screenshots?**
If applicable, add screenshots to help explain your problem.
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/FEATURE_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: '[FEATURE]'
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem?**
A clear and concise description of what the problem is, e.g. _I'm always frustrated when [...]_

Expand All @@ -15,4 +16,4 @@ A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.

**Do you have any additional context?**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/PROPOSAL_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ title: '[PROPOSAL]'
labels: proposal
assignees: ''
---

## What kind of business use case are you trying to solve? What are your requirements?

A clear and concise description of the business problem, e.g. _My customers are asking for [...]_

**What is the problem? What is preventing you from meeting the requirements?**
Expand All @@ -18,4 +20,4 @@ Describe your proposed solution. It's OK if you don't have one.
Describe any assumptions you may be making that would limit the scope of this proposal.

**What are remaining open questions?**
List questions that may need to be answered before proceeding with an implementation.
List questions that may need to be answered before proceeding with an implementation.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ contact_links:
about: Please ask and answer questions here.
- name: AWS/Amazon Security
url: https://aws.amazon.com/security/vulnerability-reporting/
about: Please report security vulnerabilities here.
about: Please report security vulnerabilities here.
11 changes: 7 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
### Description

[Describe what this change achieves]

### Issues Resolved

[List any issues this PR will resolve]

### Check List

- [ ] New functionality includes testing.
- [ ] All tests pass
- [ ] New functionality has been documented.
- [ ] New functionality has javadoc added
- [ ] Commits are signed per the DCO using --signoff
- [ ] 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).
For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).
18 changes: 15 additions & 3 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
name: Backport
on:
pull_request:
pull_request_target:
types:
- closed
- labeled

jobs:
backport:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
name: Backport
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/github-app-token@v1.5.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- name: Backport
uses: tibdex/backport@v1
uses: VachaShah/backport@v1.1.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ steps.github_app_token.outputs.token }}
branch_name: backport/backport-${{ github.event.number }}
74 changes: 37 additions & 37 deletions .github/workflows/bundler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@ jobs:

strategy:
matrix:
cluster: ["opendistro", "opensearch"]
cluster: ['opendistro', 'opensearch']

steps:
- uses: actions/checkout@v2

- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Runs ${{ matrix.cluster }} cluster
run: |
make cluster.clean cluster.${{ matrix.cluster }}.build cluster.${{ matrix.cluster }}.start
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install
run: |
npm install
npm install --prefix test/bundlers/parcel-test
npm install --prefix test/bundlers/rollup-test
npm install --prefix test/bundlers/webpack-test
- name: Build
run: |
npm run build --prefix test/bundlers/parcel-test
npm run build --prefix test/bundlers/rollup-test
npm run build --prefix test/bundlers/webpack-test
- name: Run bundle
run: |
npm start --prefix test/bundlers/parcel-test
npm start --prefix test/bundlers/rollup-test
npm start --prefix test/bundlers/webpack-test
- uses: actions/checkout@v2

- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Runs ${{ matrix.cluster }} cluster
run: |
make cluster.clean cluster.${{ matrix.cluster }}.build cluster.${{ matrix.cluster }}.start
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install
run: |
npm install
npm install --prefix test/bundlers/parcel-test
npm install --prefix test/bundlers/rollup-test
npm install --prefix test/bundlers/webpack-test
- name: Build
run: |
npm run build --prefix test/bundlers/parcel-test
npm run build --prefix test/bundlers/rollup-test
npm run build --prefix test/bundlers/webpack-test
- name: Run bundle
run: |
npm start --prefix test/bundlers/parcel-test
npm start --prefix test/bundlers/rollup-test
npm start --prefix test/bundlers/webpack-test
60 changes: 60 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Integration for Compatibility

on: [push, pull_request]

jobs:
integration-test-compatibility:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
secured: ['true', 'false']
entry:
- { opensearch_version: 1.1.0 }
- { opensearch_version: 1.2.0 }
- { opensearch_version: 1.2.1 }
- { opensearch_version: 1.2.2 }
- { opensearch_version: 1.2.3 }
- { opensearch_version: 1.2.4 }
- { opensearch_version: 1.3.0 }
- { opensearch_version: 1.3.1 }
- { opensearch_version: 2.0.0 }

steps:
- uses: actions/checkout@v2

- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Runs OpenSearch cluster
run: |
export OPENSEARCH_VERSION=${{ matrix.entry.opensearch_version }}
export SECURE_INTEGRATION=${{ matrix.secured }}
make cluster.clean cluster.opensearch.build cluster.opensearch.start
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Install
run: |
npm install
- name: Integration test without security
if: ${{ matrix.secured == 'false'}}
run: |
npm run test:integration:helpers
- name: Integration test with security
if: ${{ matrix.secured == 'true'}}
run: |
npm run test:integration:helpers-secure
- name: Stop the OpenSearch cluster
run: |
make cluster.opensearch.stop
38 changes: 19 additions & 19 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ jobs:
node-version: [12.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: |
npm install
- name: Code coverage report
run: |
npm run test:coverage-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.lcov
fail_ci_if_error: true
- name: Install
run: |
npm install
- name: Code coverage report
run: |
npm run test:coverage-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.lcov
fail_ci_if_error: true

- name: Code coverage 90%
run: |
npm run test:coverage-90
- name: Code coverage 90%
run: |
npm run test:coverage-90
18 changes: 0 additions & 18 deletions .github/workflows/dco.yml

This file was deleted.

Loading

0 comments on commit 4c555fd

Please sign in to comment.