Skip to content

Commit

Permalink
Merge branch 'main' into partial-flat-object
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
mingshl committed Jul 5, 2023
2 parents 1c095f4 + 71c9302 commit efb1aed
Show file tree
Hide file tree
Showing 959 changed files with 21,465 additions and 4,847 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @reta @anasalkouz @andrross @reta @Bukhtawar @CEHENKLE @dblock @gbbafna @setiah @kartg @kotwanikunal @mch2 @nknize @owaiskazi19 @Rishikesh1159 @ryanbogan @saratvemulapalli @shwetathareja @dreamer-89 @tlfeng @VachaShah @dbwiddis
* @reta @anasalkouz @andrross @reta @Bukhtawar @CEHENKLE @dblock @gbbafna @setiah @kartg @kotwanikunal @mch2 @nknize @owaiskazi19 @Rishikesh1159 @ryanbogan @saratvemulapalli @shwetathareja @dreamer-89 @tlfeng @VachaShah @dbwiddis @sachinpkale
88 changes: 44 additions & 44 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,52 @@ jobs:
timeout-minutes: 130
steps:
- name: Checkout OpenSearch repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup environment variables (PR)
if: github.event_name == 'pull_request_target'
run: |
echo "pr_from_sha=$(jq --raw-output .pull_request.head.sha $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_from_clone_url=$(jq --raw-output .pull_request.head.repo.clone_url $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_to_clone_url=$(jq --raw-output .pull_request.base.repo.clone_url $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_title=$(jq --raw-output .pull_request.title $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_number=$(jq --raw-output .pull_request.number $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_from_sha=$(jq --raw-output .pull_request.head.sha $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_from_clone_url=$(jq --raw-output .pull_request.head.repo.clone_url $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_to_clone_url=$(jq --raw-output .pull_request.base.repo.clone_url $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_title=$(jq --raw-output .pull_request.title $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "pr_number=$(jq --raw-output .pull_request.number $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
- name: Setup environment variables (Push)
if: github.event_name == 'push'
run: |
repo_url="https:/opensearch-project/OpenSearch"
ref_id=$(git rev-parse HEAD)
branch_name=$(git rev-parse --abbrev-ref HEAD)
echo "branch_name=$branch_name" >> $GITHUB_ENV
echo "pr_from_sha=$ref_id" >> $GITHUB_ENV
echo "pr_from_clone_url=$repo_url" >> $GITHUB_ENV
echo "pr_to_clone_url=$repo_url" >> $GITHUB_ENV
echo "pr_title=Push trigger $branch_name $ref_id $repo_url" >> $GITHUB_ENV
echo "pr_number=Null" >> $GITHUB_ENV
repo_url="https:/opensearch-project/OpenSearch"
ref_id=$(git rev-parse HEAD)
branch_name=$(git rev-parse --abbrev-ref HEAD)
echo "branch_name=$branch_name" >> $GITHUB_ENV
echo "pr_from_sha=$ref_id" >> $GITHUB_ENV
echo "pr_from_clone_url=$repo_url" >> $GITHUB_ENV
echo "pr_to_clone_url=$repo_url" >> $GITHUB_ENV
echo "pr_title=Push trigger $branch_name $ref_id $repo_url" >> $GITHUB_ENV
echo "pr_number=Null" >> $GITHUB_ENV
- name: Checkout opensearch-build repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: opensearch-project/opensearch-build
ref: main
path: opensearch-build

- name: Trigger jenkins workflow to run gradle check
run: |
set -e
set -o pipefail
bash opensearch-build/scripts/gradle/gradle-check.sh ${{ secrets.JENKINS_GRADLE_CHECK_GENERIC_WEBHOOK_TOKEN }} | tee -a gradle-check.log
set -e
set -o pipefail
bash opensearch-build/scripts/gradle/gradle-check.sh ${{ secrets.JENKINS_GRADLE_CHECK_GENERIC_WEBHOOK_TOKEN }} | tee -a gradle-check.log
- name: Setup Result Status
if: always()
run: |
WORKFLOW_URL=`cat gradle-check.log | grep 'WORKFLOW_URL' | awk '{print $2}'`
RESULT=`cat gradle-check.log | grep 'Result:' | awk '{print $2}'`
echo "workflow_url=$WORKFLOW_URL" >> $GITHUB_ENV
echo "result=$RESULT" >> $GITHUB_ENV
WORKFLOW_URL=`cat gradle-check.log | grep 'WORKFLOW_URL' | awk '{print $2}'`
RESULT=`cat gradle-check.log | grep 'Result:' | awk '{print $2}'`
echo "workflow_url=$WORKFLOW_URL" >> $GITHUB_ENV
echo "result=$RESULT" >> $GITHUB_ENV
- name: Upload Coverage Report
if: success()
Expand All @@ -81,25 +81,25 @@ jobs:
with:
issue-number: ${{ env.pr_number }}
body: |
### Gradle Check (Jenkins) Run Completed with:
* **RESULT:** ${{ env.result }} :white_check_mark:
* **URL:** ${{ env.workflow_url }}
* **CommitID:** ${{ env.pr_from_sha }}
### Gradle Check (Jenkins) Run Completed with:
* **RESULT:** ${{ env.result }} :white_check_mark:
* **URL:** ${{ env.workflow_url }}
* **CommitID:** ${{ env.pr_from_sha }}
- name: Extract Test Failure
if: ${{ github.event_name == 'pull_request_target' && env.result != 'SUCCESS' }}
run: |
TEST_FAILURES=`curl -s "${{ env.workflow_url }}/testReport/api/json?tree=suites\[cases\[status,className,name\]\]" | jq -r '.. | objects | select(.status=="FAILED",.status=="REGRESSION") | (.className + "." + .name)' | uniq -c | sort -n -r | head -n 10`
if [[ "$TEST_FAILURES" != "" ]]
then
echo "test_failures<<EOF" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "* **TEST FAILURES:**" >> $GITHUB_ENV
echo '```' >> $GITHUB_ENV
echo "$TEST_FAILURES" >> $GITHUB_ENV
echo '```' >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
fi
TEST_FAILURES=`curl -s "${{ env.workflow_url }}/testReport/api/json?tree=suites\[cases\[status,className,name\]\]" | jq -r '.. | objects | select(.status=="FAILED",.status=="REGRESSION") | (.className + "." + .name)' | uniq -c | sort -n -r | head -n 10`
if [[ "$TEST_FAILURES" != "" ]]
then
echo "test_failures<<EOF" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "* **TEST FAILURES:**" >> $GITHUB_ENV
echo '```' >> $GITHUB_ENV
echo "$TEST_FAILURES" >> $GITHUB_ENV
echo '```' >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
fi
- name: Create Comment Flaky
if: ${{ github.event_name == 'pull_request_target' && success() && env.result != 'SUCCESS' }}
Expand All @@ -119,12 +119,12 @@ jobs:
with:
issue-number: ${{ env.pr_number }}
body: |
### Gradle Check (Jenkins) Run Completed with:
* **RESULT:** ${{ env.result }} :x: ${{ env.test_failures }}
* **URL:** ${{ env.workflow_url }}
* **CommitID:** ${{ env.pr_from_sha }}
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
Is the failure [a flaky test](https:/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?
### Gradle Check (Jenkins) Run Completed with:
* **RESULT:** ${{ env.result }} :x: ${{ env.test_failures }}
* **URL:** ${{ env.workflow_url }}
* **CommitID:** ${{ env.pr_from_sha }}
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
Is the failure [a flaky test](https:/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?
- name: Create Issue On Push Failure
if: ${{ github.event_name == 'push' && failure() }}
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/poc-checklist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Add comment
on:
issues:
types:
- labeled
jobs:
add-comment:
if: github.event.label.name == 'poc'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add comment
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.issue.number }}
body: |
### POC Checklist:
Please go through the following checklist to ensure these items are taken into account while designing the POC.
- [ ] Supports safe upgrade paths from all supported BWC versions to the current version
- [ ] Supports compatibility with all plugins
- [ ] opensearch-alerting
- [ ] opensearch-anomaly-detection
- [ ] opensearch-asynchronous-search
- [ ] opensearch-cross-cluster-replication
- [ ] opensearch-geospatial
- [ ] opensearch-index-management
- [ ] opensearch-job-scheduler
- [ ] opensearch-knn
- [ ] opensearch-ml
- [ ] opensearch-notifications
- [ ] opensearch-notifications-core
- [ ] opensearch-observability
- [ ] opensearch-performance-analyzer
- [ ] opensearch-reports-scheduler
- [ ] opensearch-security
- [ ] opensearch-sql
- [ ] Supports lucene upgrades across minor lucene versions
- [ ] Supports lucene upgrades across major lucene versions
- [ ] Supports lucene upgrades across underlying lucene codec bumps (Eg: Lucene95Codec -> Lucene96Codec)
- [ ] Supports wire compatibility of OpenSearch
- [ ] Plan to measure performance degradation/improvement (if any)
- [ ] Plan to document any user facing changes introduced by this feature
- [ ] Ensure working and passing CI
Thank you for your contribution!
4 changes: 2 additions & 2 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Gradle Precommit
on: [pull_request]

jobs:
precommit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest, macos-latest] # precommit on ubuntu-latest is run as a part of the gradle-check workflow
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/stalled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Close Stalled PRs
on:
schedule:
- cron: '15 15 * * *' # Run every day at 15:15 UTC / 7:15 PST / 8:15 PDT
permissions:
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780
- name: Stale PRs
uses: actions/stale@v8
with:
repo-token: ${{ steps.github_app_token.outputs.token }}
stale-pr-label: 'stalled'
stale-pr-message: 'This PR is stalled because it has been open for 30 days with no activity. Remove stalled label or comment or this will be closed in 7 days.'
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
days-before-pr-stale: 30
days-before-pr-close: 7
days-before-issue-stale: -1
days-before-issue-close: -1
6 changes: 5 additions & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ jobs:
CURRENT_VERSION_ARRAY[2]=$((CURRENT_VERSION_ARRAY[2]+1))
NEXT_VERSION=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}")
NEXT_VERSION_UNDERSCORE=$(IFS=_ ; echo "V_${CURRENT_VERSION_ARRAY[*]:0:3}")
NEXT_VERSION_ID=$(IFS=0 ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}99")
if [[ ${#CURRENT_VERSION_ARRAY[2]} -gt 1 ]]; then
NEXT_VERSION_ID="${CURRENT_VERSION_ARRAY[0]:0:3}0${CURRENT_VERSION_ARRAY[1]:0:3}${CURRENT_VERSION_ARRAY[2]:0:3}99"
else
NEXT_VERSION_ID=$(IFS=0 ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}99")
fi
echo "TAG=$TAG" >> $GITHUB_ENV
echo "BASE=$BASE" >> $GITHUB_ENV
echo "BASE_X=$BASE_X" >> $GITHUB_ENV
Expand Down
Loading

0 comments on commit efb1aed

Please sign in to comment.