Skip to content
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

[Backport 2.x] Update CI to use jdk-21 #603

Closed
wants to merge 74 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
e6a89a0
Add 2.2.0.0 release note (#105) (#107)
opensearch-trigger-bot[bot] Aug 2, 2022
c64a73d
Staging for version increment automation (#91) (#106)
opensearch-trigger-bot[bot] Aug 2, 2022
f62bf44
Add group = 'org.opensearch' to `build.gradle` (#111) (#112)
opensearch-trigger-bot[bot] Aug 3, 2022
d0aaa1e
Adding gradle task for running integ tests in remote cluster (#116) (…
opensearch-trigger-bot[bot] Aug 3, 2022
cf4a7e4
Update opensearch build name in releases (#121)
junqiu-lei Aug 8, 2022
d9f9833
Fix typo errors (#125) (#127)
opensearch-trigger-bot[bot] Aug 17, 2022
bf2e27e
Include feature branch in workflow to trigger CI (#114)
naveentatikonda Sep 1, 2022
b71f29c
Add XYPoint Field Type to index and query documents that contains car…
naveentatikonda Sep 1, 2022
6e383d7
Increment version to 2.3.0-SNAPSHOT (#137)
opensearch-trigger-bot[bot] Sep 6, 2022
714ca6b
Added release notes for version 2.3.0.0 (#142) (#144)
opensearch-trigger-bot[bot] Sep 9, 2022
f66bb9a
Fix integration test failure with secured cluster (#115) (#138) (#146)
opensearch-trigger-bot[bot] Sep 13, 2022
2f8312a
Updated release notes to add the version increment PR in the release …
opensearch-trigger-bot[bot] Sep 14, 2022
8a599f8
Increment version to 2.4.0-SNAPSHOT (#139)
opensearch-trigger-bot[bot] Sep 16, 2022
5c28508
Flip X and Y coordinates for WKT and array formats in XYPoint (#156) …
opensearch-trigger-bot[bot] Sep 23, 2022
65de887
Remove explicit DCO check (#126) (#143)
opensearch-trigger-bot[bot] Oct 13, 2022
294729d
add group = org.opensearch.plugin (#167) (#169)
opensearch-trigger-bot[bot] Oct 13, 2022
48c59c2
Update to Gradle 7.5.1 (#134) (#172)
opensearch-trigger-bot[bot] Oct 13, 2022
a20bbd3
Add window and mac (#173)
heemin32 Oct 17, 2022
646a0c0
Add geojson support for XYPoint (#162) (#175)
heemin32 Oct 19, 2022
bfaba9c
Remove optional to get features (#177) (#178)
opensearch-trigger-bot[bot] Oct 24, 2022
953337b
Support Uber's H3 geospatial indexing system as geohex_grid (#179) (#…
VijayanB Oct 26, 2022
90e6825
Add release note for 2.4.0 (#185) (#186)
opensearch-trigger-bot[bot] Nov 3, 2022
9d7cf4d
Increment version to 2.5.0-SNAPSHOT (#184)
opensearch-trigger-bot[bot] Dec 21, 2022
5eec5ee
Add description to gradle file to fix build error (#203) (#204)
opensearch-trigger-bot[bot] Jan 10, 2023
0a10fc0
Add release notes for 25 (#206)
opensearch-trigger-bot[bot] Jan 11, 2023
9f835cb
Upgrade version to 2.6
jmazanec15 Jan 19, 2023
ff990a9
Allow API to accept any index name without suffix
VijayanB Oct 27, 2022
b98b5ca
Replace Locale.getDefault() with Local.ROOT
VijayanB Feb 2, 2023
2b52704
Fixed flaky test (#217)
opensearch-trigger-bot[bot] Feb 10, 2023
7d9c3a8
Add limit to geojson upload API
VijayanB Feb 9, 2023
a062c23
Add release notes for 2.6.0
VijayanB Feb 22, 2023
af25b85
Publish snapshots to maven via GHA (#233) (#234)
opensearch-trigger-bot[bot] Feb 28, 2023
39b4d8f
Update snapshot version and fix compilation issues (#237)
VijayanB Mar 1, 2023
e2f4af4
Increment version to 2.7.0-SNAPSHOT (#232)
opensearch-trigger-bot[bot] Mar 8, 2023
ba83a47
Add CHANGELOG (#238) (#239)
opensearch-trigger-bot[bot] Mar 13, 2023
392ac5c
Replace Map, List, and Set in org.opensearch.common.collect with java…
opensearch-trigger-bot[bot] Mar 24, 2023
4960086
Fix upstream refactor changes (#250)
naveentatikonda Mar 29, 2023
2d74e57
Add 2.7.0 Release Notes (#253) (#255)
opensearch-trigger-bot[bot] Apr 17, 2023
ed0eb0b
Update gradle version to 7.6 (#265) (#266)
opensearch-trigger-bot[bot] Apr 26, 2023
e558258
Exclude lombok generated code from jacoco coverage report (#268) (#269)
opensearch-trigger-bot[bot] Apr 26, 2023
c29b1f8
Make jacoco report to be generated faster in local (#267) (#270)
heemin32 Apr 26, 2023
aef2ddf
Update dependency org.json:json to v20230227 (#273) (#276)
opensearch-trigger-bot[bot] May 2, 2023
406b8ab
Increment version to 2.8.0-SNAPSHOT (#259)
opensearch-trigger-bot[bot] May 9, 2023
6070dea
Baseline owners and maintainers (#277)
VijayanB May 9, 2023
5a4acad
Add Auto Release Workflow (#288) (#295)
opensearch-trigger-bot[bot] May 24, 2023
44ff69d
Adding release notes for 2.8 (#323) (#324)
opensearch-trigger-bot[bot] May 26, 2023
5bcefcf
Increment version to 2.9.0-SNAPSHOT (#329)
opensearch-trigger-bot[bot] Jun 6, 2023
afd673e
Fix compilation error and test failure (#228)
opensearch-trigger-bot[bot] Jul 6, 2023
5d7c3d3
Change package for Strings.hasText (#314) (#315)
opensearch-trigger-bot[bot] Jul 8, 2023
f8df9a3
Add 2.9.0 release notes (#350) (#351)
opensearch-trigger-bot[bot] Jul 11, 2023
09bbef7
Increment version to 2.10.0-SNAPSHOT (#352)
opensearch-trigger-bot[bot] Jul 21, 2023
64cd7b7
Update packages according to a change in OpenSearch core (#353) (#359)
heemin32 Jul 21, 2023
15dc669
IP2Geo processor implementation (#362) (#364)
opensearch-trigger-bot[bot] Jul 24, 2023
4f7a585
Add change log for IP2Geo processor PR (#365) (#367)
opensearch-trigger-bot[bot] Jul 25, 2023
7d032ef
Added input parameter validation with few small changes (#371) (#372)
opensearch-trigger-bot[bot] Jul 27, 2023
7a80ae0
Changes in invalid input handling (#373) (#375)
opensearch-trigger-bot[bot] Jul 31, 2023
2d44f03
[Backport 2.x] Fix compile error due to changes in OpenSearch core (#…
heemin32 Aug 17, 2023
fda4f43
Revert datasource state when delete fails (#382) (#384)
opensearch-trigger-bot[bot] Aug 17, 2023
e614632
Update ip2geo test data url (#389) (#390)
opensearch-trigger-bot[bot] Aug 22, 2023
dcd8b68
Remove _primary preference from get/mget requests (#391) (#392)
opensearch-trigger-bot[bot] Aug 31, 2023
bc6d71f
Version bump for spotlss and apache commons (#400) (#401)
opensearch-trigger-bot[bot] Sep 5, 2023
8418cd2
Created release notes for 2.10 release (#396) (#403)
opensearch-trigger-bot[bot] Sep 6, 2023
1afb8b6
Increment version to 2.11.0-SNAPSHOT (#407)
opensearch-trigger-bot[bot] Sep 26, 2023
b309e08
Add integration test against security enabled cluster (#513) (#514)
opensearch-trigger-bot[bot] Oct 5, 2023
abedfb6
Add 2.11 release note (#519) (#524)
opensearch-trigger-bot[bot] Oct 6, 2023
9f1f4d6
Add denylist ip config for datasource endpoint (#573) (#575)
opensearch-trigger-bot[bot] Oct 27, 2023
1fccfce
Onboard jenkins prod docker images to github actions (#578) (#581)
opensearch-trigger-bot[bot] Nov 2, 2023
8776900
Update dependency org.json:json to v20231013 (#579) (#580)
opensearch-trigger-bot[bot] Nov 2, 2023
f48c9da
Add default value in denylist (#583) (#584)
opensearch-trigger-bot[bot] Nov 6, 2023
cc3f52d
Add release note for 2.11.1 (#586) (#587)
opensearch-trigger-bot[bot] Nov 20, 2023
979e350
Update 2.11.1 release notes (#589) (#590)
opensearch-trigger-bot[bot] Nov 28, 2023
bc355fd
Increment version to 2.12.0-SNAPSHOT (#595)
ryanbogan Dec 12, 2023
eb19fb0
Upgrade gradle to 8.4 (#596) (#597)
opensearch-trigger-bot[bot] Dec 26, 2023
b2aeb31
Update CI to use jdk-21
ryanbogan Dec 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams
* @opensearch-project/geospatial
* @heemin32 @navneet1v @VijayanB @vamshin @jmazanec15 @naveentatikonda @junqiu-lei @martin-gaievski
48 changes: 45 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,60 @@ on:
push:
branches:
- "*"
- "feature/**"
pull_request:
branches:
- "*"
- "feature/**"

jobs:
Build:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
with:
product: opensearch

Build-linux:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [11, 17]
java: [11, 17, 21]

name: Build and Test geospatial Plugin
runs-on: ubuntu-latest
container:
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
# this image tag is subject to change as more dependencies and updates will arrive over time
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
# need to switch to root so that github actions can install runner binary on container without permission issues.
options: --user root

steps:
- name: Checkout geospatial
uses: actions/checkout@v1

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Run build
run: |
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "./gradlew build"

- name: Upload Coverage Report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

Build-windows-macos:
strategy:
matrix:
java: [11, 17, 21]
os: [windows-latest, macos-latest]

name: Build and Test geospatial Plugin
runs-on: ${{ matrix.os }}

steps:
- name: Checkout geospatial
Expand All @@ -32,4 +74,4 @@ jobs:
- name: Upload Coverage Report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Releases

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
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: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- uses: actions/checkout@v2
- uses: ncipollo/release-action@v1
with:
github_token: ${{ steps.github_app_token.outputs.token }}
bodyFile: release-notes/opensearch-geospatial.release-notes-${{steps.tag.outputs.tag}}.md
18 changes: 18 additions & 0 deletions .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Changelog Verifier"
on:
pull_request:
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
verify-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}

- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: "autocut, skip-changelog"
18 changes: 0 additions & 18 deletions .github/workflows/dco.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish snapshots to maven

on:
workflow_dispatch:
push:
branches:
- 'main'
- '1.*'
- '2.*'

jobs:
build-and-publish-snapshots:
runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

steps:
- uses: actions/setup-java@v3
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 11
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
aws-region: us-east-1
- name: publish snapshots to maven
run: |
export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
echo "::add-mask::$SONATYPE_USERNAME"
echo "::add-mask::$SONATYPE_PASSWORD"
./gradlew publishPluginZipPublicationToSnapshotsRepository
88 changes: 88 additions & 0 deletions .github/workflows/test_security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Test Geospatial on Secure Cluster
on:
schedule:
- cron: '0 0 * * *' # every night
push:
branches:
- "*"
- "feature/**"
pull_request:
branches:
- "*"
- "feature/**"

jobs:
Build-ad:
strategy:
matrix:
java: [ 11,17,21 ]
os: [ubuntu-latest]
fail-fast: true

name: Test Geospatial on Secure Cluster
runs-on: ${{ matrix.os }}

steps:
- name: Checkout Geospatial
uses: actions/checkout@v1

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Assemble Geospatial
run: |
./gradlew assemble

# example of variables:
# plugin = opensearch-geospatial-2.7.0.0-SNAPSHOT.zip
# version = 2.7.0
# plugin_version = 2.7.0.0
# qualifier = `SNAPSHOT`
- name: Pull and Run Docker
run: |
plugin=`basename $(ls build/distributions/*.zip)`
version=`echo $plugin|awk -F- '{print $3}'| cut -d. -f 1-3`
plugin_version=`echo $plugin|awk -F- '{print $3}'| cut -d. -f 1-4`
qualifier=`echo $plugin|awk -F- '{print $4}'| cut -d. -f 1-1`
if [ $qualifier != `SNAPSHOT` ];
then
docker_version=$version-$qualifier
else
docker_version=$version
fi
echo plugin version plugin_version qualifier docker_version
echo "($plugin) ($version) ($plugin_version) ($qualifier) ($docker_version)"

cd ..
if docker pull opensearchstaging/opensearch:$docker_version
then
echo "FROM opensearchstaging/opensearch:$docker_version" >> Dockerfile
echo "RUN if [ -d /usr/share/opensearch/plugins/opensearch-geospatial ]; then /usr/share/opensearch/bin/opensearch-plugin remove opensearch-geospatial; fi" >> Dockerfile
echo "ADD geospatial/build/distributions/$plugin /tmp/" >> Dockerfile
echo "RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/$plugin" >> Dockerfile
docker build -t opensearch-geospatial:test .
echo "imagePresent=true" >> $GITHUB_ENV
else
echo "imagePresent=false" >> $GITHUB_ENV
fi

- name: Run Docker Image
if: env.imagePresent == 'true'
run: |
cd ..
docker run -p 9200:9200 -d -p 9600:9600 -e "discovery.type=single-node" opensearch-geospatial:test
sleep 90

- name: Run Geospatial Integ Test
if: env.imagePresent == 'true'
run: |
security=`curl -XGET https://localhost:9200/_cat/plugins?v -u admin:admin --insecure |grep opensearch-security|wc -l`
if [ $security -gt 0 ]
then
echo "Security plugin is available"
./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin
else
echo "Security plugin is NOT available, skipping integration tests"
fi
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# CHANGELOG
All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
See the [CONTRIBUTING guide](./CONTRIBUTING.md#Changelog) for instructions on how to add changelog entries.

## [Unreleased 3.0](https://github.com/opensearch-project/geospatial/compare/2.x...HEAD)
### Features
### Enhancements
### Bug Fixes
### Infrastructure
### Documentation
### Maintenance
### Refactoring

## [Unreleased 2.x](https://github.com/opensearch-project/geospatial/compare/2.11...2.x)
### Features
* Add denylist ip config for datasource endpoint ([#573](https://github.com/opensearch-project/geospatial/pull/573))
### Enhancements
### Bug Fixes
### Infrastructure
### Documentation
### Maintenance
* Upgrade gradle to 8.4 ([#596](https://github.com/opensearch-project/geospatial/pull/596))
### Refactoring
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [Documentation Changes](#documentation-changes)
- [Contributing Code](#contributing-code)
- [Developer Certificate of Origin](#developer-certificate-of-origin)
- [Changelog](#changelog)
- [Review Process](#review-process)

## Contributing to OpenSearch
Expand Down Expand Up @@ -89,6 +90,42 @@ Signed-off-by: Jane Smith <[email protected]>

You may type this line on your own when writing your commit messages. However, if your user.name and user.email are set in your git configs, you can use `-s` or `– – signoff` to add the `Signed-off-by` line to the end of the commit message.

## Changelog

OpenSearch maintains version specific changelog by enforcing a change to the ongoing [CHANGELOG](CHANGELOG.md) file adhering to the [Keep A Changelog](https://keepachangelog.com/en/1.0.0/) format. The purpose of the changelog is for the contributors and maintainers to incrementally build the release notes throughout the development process to avoid a painful and error-prone process of attempting to compile the release notes at release time. On each release the "unreleased" entries of the changelog are moved to the appropriate release notes document in the `./release-notes` folder. Also, incrementally building the changelog provides a concise, human-readable list of significant features that have been added to the unreleased version under development.

### Which changes require a CHANGELOG entry?
Changelogs are intended for operators/administrators, developers integrating with libraries and APIs, and end-users interacting with OpenSearch Dashboards and/or the REST API (collectively referred to as "user"). In short, any change that a user of OpenSearch might want to be aware of should be included in the changelog. The changelog is _not_ intended to replace the git commit log that developers of OpenSearch itself rely upon. The following are some examples of changes that should be in the changelog:

- A newly added feature
- A fix for a user-facing bug
- Dependency updates
- Fixes for security issues

The following are some examples where a changelog entry is not necessary:

- Adding, modifying, or fixing tests
- An incremental PR for a larger feature (such features should include _one_ changelog entry for the feature)
- Documentation changes or code refactoring
- Build-related changes

Any PR that does not include a changelog entry will result in a failure of the validation workflow in GitHub. If the contributor and maintainers agree that no changelog entry is required, then the `skip-changelog` label can be applied to the PR which will result in the workflow passing.

### How to add my changes to [CHANGELOG](CHANGELOG.md)?

Adding in the change is two step process:
1. Add your changes to the corresponding section within the CHANGELOG file with dummy pull request information, publish the PR
2. Update the entry for your change in [`CHANGELOG.md`](CHANGELOG.md) and make sure that you reference the pull request there.

### Where should I put my CHANGELOG entry?
Please review the [branching strategy](https://github.com/opensearch-project/.github/blob/main/RELEASING.md#opensearch-branching) document. The changelog on the `main` branch will contain sections for the _next major_ and _next minor_ releases. Your entry should go into the section it is intended to be released in. In practice, most changes to `main` will be backported to the next minor release so most entries will likely be in that section.

The following examples assume the _next major_ release on main is 3.0, then _next minor_ release is 2.5, and the _current_ release is 2.4.

- **Add a new feature to release in next minor:** Add a changelog entry to `[Unreleased 2.x]` on main, then backport to 2.x (including the changelog entry).
- **Introduce a breaking API change to release in next major:** Add a changelog entry to `[Unreleased 3.0]` on main, do not backport.
- **Upgrade a dependency to fix a CVE:** Add a changelog entry to `[Unreleased 2.x]` on main, then backport to 2.x (including the changelog entry), then backport to 2.4 and ensure the changelog entry is added to `[Unreleased 2.4.1]`.

## Review Process

We deeply appreciate everyone who takes the time to make a contribution. We will review all contributions as quickly as possible. As a reminder, [opening an issue](https://github.com/opensearch-project/geospatial/issues) discussing your change before you make it is the best way to smooth the PR process. This will prevent a rejection because someone else is already working on the problem, or because the solution is incompatible with the architectural direction.
Expand Down
Loading
Loading