Skip to content

Commit bd3167a

Browse files
authored
Merge branch 'main' into remove_old_snapshot_repo
Signed-off-by: Jeff Zemerick <[email protected]>
2 parents 1af6189 + 97e9743 commit bd3167a

File tree

16 files changed

+153
-32
lines changed

16 files changed

+153
-32
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @epugh @jzonthemtn @msfroh
1+
* @epugh @jzonthemtn @msfroh @sstults

.github/workflows/backport.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Backport
2+
on:
3+
pull_request_target:
4+
types:
5+
- closed
6+
- labeled
7+
8+
jobs:
9+
backport:
10+
name: Backport
11+
runs-on: ubuntu-latest
12+
# Only react to merged PRs for security reasons.
13+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
14+
if: >
15+
github.event.pull_request.merged
16+
&& (
17+
github.event.action == 'closed'
18+
|| (
19+
github.event.action == 'labeled'
20+
&& contains(github.event.label.name, 'backport')
21+
)
22+
)
23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
steps:
27+
- name: GitHub App token
28+
id: github_app_token
29+
uses: tibdex/[email protected]
30+
with:
31+
app_id: ${{ secrets.APP_ID }}
32+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
33+
installation_id: 22958780
34+
35+
- name: Backport
36+
uses: VachaShah/[email protected]
37+
with:
38+
github_token: ${{ steps.github_app_token.outputs.token }}
39+
head_template: backport/backport-<%= number %>-to-<%= base %>
40+
failure_labels: backport-failed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Delete merged branch of the backport PRs
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
7+
jobs:
8+
delete-branch:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
if: github.repository == 'opensearch-project/user-behavior-insights' && startsWith(github.event.pull_request.head.ref,'backport/')
13+
steps:
14+
- name: Delete merged branch
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
github.rest.git.deleteRef({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
ref: `heads/${context.payload.pull_request.head.ref}`,
22+
})

.github/workflows/maven-publish.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ jobs:
3131
export-env: true
3232
env:
3333
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
34-
SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username
35-
SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password
34+
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
35+
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role
36+
37+
- name: Configure AWS credentials
38+
uses: aws-actions/configure-aws-credentials@v5
39+
with:
40+
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
41+
aws-region: us-east-1
3642

3743
- name: Publish snapshots to maven
3844
run: |

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
FROM opensearchstaging/opensearch:3.1.0-SNAPSHOT
1+
FROM opensearchstaging/opensearch:3.3.0
22

3-
ARG UBI_VERSION="3.1.0.0-SNAPSHOT"
3+
ARG UBI_VERSION="3.3.0.0-SNAPSHOT"
44

55
COPY ./build/distributions/opensearch-ubi-${UBI_VERSION}.zip /tmp/
66

77
# Required for OTel capabilities.
88
#RUN /usr/share/opensearch/bin/opensearch-plugin install --batch telemetry-otel
99

10-
RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/opensearch-ubi-${UBI_VERSION}.zip
10+
RUN /usr/share/opensearch/bin/opensearch-plugin remove opensearch-ubi
11+
12+
RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/opensearch-ubi-${UBI_VERSION}.zip

MAINTAINERS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
1212
| ------------------ | --------------------------------------------------------- | ----------- |
1313
| Eric Pugh | [epugh](https://github.com/epugh) | OpenSource Connections |
1414
| Jeff Zemerick | [jzonthemtn](https://github.com/jzonthemtn) | Mountain Fog |
15-
| Michael Froh | [msfroh](https://github.com/msfroh) | Amazon |
15+
| Michael Froh | [msfroh](https://github.com/msfroh) | Uber |
16+
| Scott Stults | [sstults](https://github.com/sstults) | OpenSource Connections |
1617

1718
## Emeritus
1819

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ UBI and this plugin project was originally proposed in the [OpenSearch UBI RFC](
1111
Please note that this repository is the implementation of the UBI plugin for OpenSearch.
1212

1313
> [!IMPORTANT]
14-
> This release targets to the 1.0.0 version of the UBI Specification.
14+
> This release targets to the 1.3.0 version of the UBI Specification.
1515
1616
For details on the JSON Schema used by UBI to send and receive queries and events please see the [UBI](https://github.com/o19s/ubi) repository and the links below.
17-
* [Query Request Schema](https://o19s.github.io/ubi/docs/html/query.request.schema.html)
18-
* [Query Response Schema](https://o19s.github.io/ubi/docs/html/query.response.schema.html)
19-
* [Event Schema](https://o19s.github.io/ubi/docs/html/event.schema.html)
17+
* [Query Request Schema](https://o19s.github.io/ubi/docs/html/latest/query.request.schema.html)
18+
* [Query Response Schema](https://o19s.github.io/ubi/docs/html/latest/query.response.schema.html)
19+
* [Event Schema](https://o19s.github.io/ubi/docs/html/latest/event.schema.html)
20+
21+
Visit [https://ubisearch.dev](https://ubisearch.dev) to learn more about UBI.
2022

2123
## UBI, Data Prepper, and Open Telemetry
2224

@@ -34,7 +36,7 @@ The UBI plugin can store UBI query data in one of three ways:
3436

3537
## Useful Commands
3638

37-
The `scripts/` directory contains example UBI requests for common use cases.
39+
The `src/test/scripts/` directory contains example UBI requests for common use cases.
3840

3941
## User Quick Start
4042

@@ -43,7 +45,7 @@ The `scripts/` directory contains example UBI requests for common use cases.
4345
To get started, download the plugin zip file from the [releases](https://github.com/opensearch-project/user-behavior-insights/releases). Next, install the plugin into OpenSearch with the following command:
4446

4547
```
46-
bin/opensearch-plugin install file:/opensearch-ubi-2.18.0.0.zip
48+
bin/opensearch-plugin install file:/opensearch-ubi-3.2.0.0.zip
4749
```
4850

4951
You will be prompted while installing the plugin because the plugin defines additional security permissions. These permissions allow the plugin to serialize query requests to JSON for storing and to allow the plugin to send query requests to Data Prepper. You can skip the prompt by adding the `--batch` argument to the above command.

build.gradle

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ forbiddenApisTest.enabled = false
3535

3636
buildscript {
3737
ext {
38-
opensearch_version = System.getProperty("opensearch.version", "3.3.0-SNAPSHOT")
38+
opensearch_version = System.getProperty("opensearch.version", "3.4.0-SNAPSHOT")
3939
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
4040
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
4141
version_tokens = opensearch_version.tokenize('-')
@@ -54,7 +54,7 @@ buildscript {
5454

5555
repositories {
5656
mavenLocal()
57-
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
57+
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
5858
mavenCentral()
5959
maven { url "https://plugins.gradle.org/m2/" }
6060
maven { url 'https://jitpack.io' }
@@ -68,8 +68,7 @@ buildscript {
6868

6969
repositories {
7070
mavenLocal()
71-
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
72-
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
71+
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
7372
mavenCentral()
7473
maven { url "https://plugins.gradle.org/m2/" }
7574
}
@@ -126,10 +125,11 @@ publishing {
126125
repositories {
127126
maven {
128127
name = "Snapshots"
129-
url = "https://central.sonatype.com/repository/maven-snapshots/"
130-
credentials {
131-
username "$System.env.SONATYPE_USERNAME"
132-
password "$System.env.SONATYPE_PASSWORD"
128+
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
129+
credentials(AwsCredentials) {
130+
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
131+
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
132+
sessionToken = System.getenv("AWS_SESSION_TOKEN")
133133
}
134134
}
135135
maven {
@@ -305,6 +305,10 @@ diffCoverageReport {
305305
}
306306
}
307307

308+
run {
309+
useCluster testClusters.integTest
310+
}
311+
308312
// updateVersion: Task to auto update version to the next development iteration
309313
task updateVersion {
310314
onlyIf { System.getProperty('newVersion') }
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Version 3.3.0 Release Notes
2+
3+
Compatible with OpenSearch and OpenSearch Dashboards version 3.3.0
4+
5+
### Maintenance
6+
* Increment version to 3.3.0-SNAPSHOT ([#127](https://github.com/opensearch-project/user-behavior-insights/pull/127))
7+
8+
### Bug Fixes
9+
* fix dependencies ([#128](https://github.com/opensearch-project/user-behavior-insights/pull/128))
10+
* fix: Update System.env syntax for Gradle 9 compatibility ([#122](https://github.com/opensearch-project/user-behavior-insights/pull/122))

src/main/java/org/opensearch/ubi/QueryRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class QueryRequest {
4040
* @param userQuery The user-entered query.
4141
* @param clientId The ID of the client that initiated the query.
4242
* @param query The raw query.
43+
* @param application The application that initiated the query.
4344
* @param queryAttributes An optional map of additional attributes for the query.
4445
* @param queryResponse The {@link QueryResponse} for this query request.
4546
*/

0 commit comments

Comments
 (0)