Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
e050689
Add 3.3 release notes (#4422) (#4423)
opensearch-trigger-bot[bot] Oct 1, 2025
ca5a5bd
Support `multisearch` command in calcite (#4332)
ahkcs Oct 2, 2025
416a327
reverting to _doc + _id (#4435)
ahkcs Oct 3, 2025
e1a1bd8
PPL `fillnull` command enhancement (#4421)
ahkcs Oct 6, 2025
344af4a
Add ignorePrometheus Flag for integTest and docTest (#4442)
penghuo Oct 6, 2025
d940e4e
Update eventstats.rst (#4447)
alexey-temnikov Oct 7, 2025
773066f
Update delete_backport_branch workflow to include release-chores bran…
RileyJergerAmazon Oct 7, 2025
93aef3f
Remove shared mutable optimizer field that caused race condition (#4454)
noCharger Oct 8, 2025
9e173f7
Refactor name resolution in Calcite PPL (#4393)
ykmr1224 Oct 8, 2025
3d2043d
Fix join type ambiguous issue when specify the join type with sql-lik…
LantaoJin Oct 9, 2025
009b53d
Switch to Guice#createInjector and add concurrent SQL/PPL regression …
penghuo Oct 9, 2025
a57796f
Fix issue 4441 (#4449)
penghuo Oct 9, 2025
5c784fe
Add mvappend function for Calcite PPL (#4438)
ykmr1224 Oct 9, 2025
4954cab
Fix missing keywordsCanBeId (#4491)
LantaoJin Oct 10, 2025
7d6357d
Fix the bug of explicit makeNullLiteral for UDT fields (#4475)
songkant-aws Oct 10, 2025
abd5bd3
Fallback to sub-aggregation if composite aggregation doesn't support …
qianheng-aws Oct 10, 2025
095e8cf
Revert partial of #4401 (#4503)
LantaoJin Oct 10, 2025
b170cf1
Support eval returns decimal division result instead of integer (#4440)
penghuo Oct 10, 2025
fdb09e8
Add data anonymizer for spath command (#4479)
ykmr1224 Oct 10, 2025
f8767e0
Throw an error when the condiditons of case are not boolean values (#…
yuancu Oct 13, 2025
9257889
Fix mapping after aggregation push down (#4500)
qianheng-aws Oct 13, 2025
a8f08ad
Support Regex for replace eval function (#4456)
ahkcs Oct 13, 2025
ef783f1
Add MAP_CONCAT internal function (#4477)
ykmr1224 Oct 13, 2025
4d416db
Add `per_second` function support for `timechart` command (#4464)
dai-chen Oct 13, 2025
fddbb70
Add configurable sytem limitations for `subsearch` and `join` command…
LantaoJin Oct 14, 2025
977b7ab
Update stalled action (#4485)
Swiddis Oct 14, 2025
de2fdc8
[FollowUp] Set 0 and negative value of subsearch.maxout as unlimited …
LantaoJin Oct 14, 2025
8de0386
Fix percentile bug (#4539)
xinyual Oct 14, 2025
42a415f
Including metadata fields type when doing agg/filter script push down…
qianheng-aws Oct 14, 2025
fe62472
Update request builder after pushdown sort into agg buckets (#4541)
LantaoJin Oct 14, 2025
89dbc31
Check server status before starting Prometheus (#4537)
LantaoJin Oct 14, 2025
9c97cfb
Add JSON_EXTRACT_ALL internal function for Calcite PPL (#4489)
ykmr1224 Oct 14, 2025
0b7e86c
[Enhancement] Error handling for illegal character usage in java rege…
RyanL1997 Oct 14, 2025
02ee33e
Add more examples to the `where` command doc (#4457)
ahkcs Oct 14, 2025
1e62fba
Fix JsonExtractAllFunctionIT failure (#4556)
ykmr1224 Oct 15, 2025
5630119
Fix sort push down into agg after project already pushed (#4546)
qianheng-aws Oct 15, 2025
3388dc7
Use `_doc` + `_shard_doc` as sort tiebreaker to get better performanc…
LantaoJin Oct 15, 2025
cba8d02
Add MAP_APPEND internal function to Calcite PPL (#4515)
ykmr1224 Oct 15, 2025
e3ab9d0
Add internal MAP_REMOVE function for Calcite PPL (#4511)
ykmr1224 Oct 16, 2025
5677765
Add replace command with Calcite (#4451)
ahkcs Oct 16, 2025
0499e95
Add value type hint for derived aggregate group by field (#4583)
qianheng-aws Oct 17, 2025
31f81b1
Make composite bucket size configurable (#4544)
LantaoJin Oct 17, 2025
0257aa5
Fix push down failure for min/max on derived field (#4572)
qianheng-aws Oct 17, 2025
7be143c
Increment version to 3.4.0-SNAPSHOT (#4452)
opensearch-trigger-bot[bot] Oct 18, 2025
279eb67
Onboarding new maven snapshots publishing to s3 (sql) (#4588)
peterzhuamazon Oct 18, 2025
ab6ab0a
Onboarding async query core and grammar files to maven snapshots (#4598)
peterzhuamazon Oct 20, 2025
d6a9719
Support format=yaml in Explain API (#4446)
penghuo Oct 20, 2025
f6bb654
Fix compile issue in main (#4608)
penghuo Oct 20, 2025
c30d5d0
Support refering to implicit `@timestamp` field in span (#4138)
yuancu Oct 21, 2025
e76754c
Optimize pushdown script size with necessary fields per expression (#…
songkant-aws Oct 21, 2025
99e38ae
Pushdown distinct count approx (#4614)
xinyual Oct 21, 2025
60b7d98
Fix filter parsing failure on date fields with non-default format (#4…
qianheng-aws Oct 21, 2025
bdd42bc
Update GEOIP function to support IP types as input (#4613)
yuancu Oct 21, 2025
1f5bb8b
poc to convert PPL to substrait plan and add to OpenSearchQueryRequest
vinaykpud Sep 19, 2025
7bcddcc
Added support for average metric aggregation
expani Oct 8, 2025
e5d252c
Making avg work with other metric functions
expani Oct 14, 2025
9183166
Added Span for numeric
vinaykpud Oct 21, 2025
ea08de1
Updated Span conversion
vinaykpud Oct 22, 2025
11c877d
Removed unwanted comments
vinaykpud Oct 22, 2025
e844036
Added support for ILIKE function substrait conversion
vinaykpud Oct 22, 2025
7ec519e
Making average work with GroupBy
expani Oct 23, 2025
94d3306
Making average work with GroupBy
vinaykpud Oct 23, 2025
ef6646d
Added logs for substrait and time
vinaykpud Oct 24, 2025
4667cb9
Making terms agg work for string and date work for substrait schema
expani Nov 3, 2025
a798876
Merge pull request #4 from expani/origin/feature/substrait-plan
expani Nov 3, 2025
a65602e
Added time measure to convert calcite to substrait
vinaykpud Oct 27, 2025
bf79d01
Updated substrait and added extract function support
vinaykpud Oct 29, 2025
8fe3a46
Added a todo for format for date function
vinaykpud Nov 3, 2025
cc66509
Pushdown case function in aggregations as range queries (#4400)
yuancu Oct 22, 2025
7689f66
Refactor JsonExtractAllFunctionIT and MapConcatFunctionIT (#4623)
ykmr1224 Oct 22, 2025
e6edd44
Return comparable LinkedHashMap in `valueForCalcite()` of ExprTupleVa…
LantaoJin Oct 23, 2025
f11f673
Replace all dots in fields of table scan's PhysType (#4633)
LantaoJin Oct 23, 2025
b7b66f8
Support Automatic Type Conversion for REX/SPATH/PARSE Command Extract…
penghuo Oct 23, 2025
510acaf
Revert "Update grammar files and developer guide (#4301)" (#4643)
ahkcs Oct 23, 2025
b87a169
Publish internal modules separately for downstream reuse (#4484)
Swiddis Oct 23, 2025
9de6113
Allow renaming group-by fields to existing field names (#4586)
yuancu Oct 24, 2025
70c73d9
Mitigate the CI failure caused by 500 Internal Server Error (#4646)
LantaoJin Oct 24, 2025
539ead6
Followup: Change ComparableLinkedHashMap to compare Key than Value (#…
LantaoJin Oct 24, 2025
5b30305
Pushdown sort aggregate metrics (#4603)
LantaoJin Oct 24, 2025
025b6c3
Add `per_minute`, `per_hour`, `per_day` function support (#4531)
dai-chen Oct 24, 2025
36c29a2
Fix bin nested fields issue (#4606)
ahkcs Oct 24, 2025
c0d4e56
Fix: Support Alias Fields in MIN, MAX, FIRST, LAST, and TAKE Aggregat…
ahkcs Oct 24, 2025
2fc4c61
Use table scan rowType in filter pushdown could fix rename issue (#4670)
LantaoJin Oct 27, 2025
06dfddf
Support push down sort after limit (#4657)
qianheng-aws Oct 27, 2025
ea1ad6a
Update big5 ppl queries and check plans (#4668)
LantaoJin Oct 28, 2025
ea4d59a
Make nested alias type support referring to outer context (#4673)
qianheng-aws Oct 28, 2025
cd8aa4a
Enhance dynamic source clause to support only metadata filters (#4554)
vamsimanohar Oct 28, 2025
501bf13
Fixes for `Multisearch` and `Append` command (#4512)
ahkcs Oct 28, 2025
5872b1a
Fix asc/desc keyword behavior for sort command (#4651)
ritvibhatt Oct 28, 2025
7cfb904
[BugFix] Fix unexpected shift of extraction for `rex` with nested cap…
RyanL1997 Oct 29, 2025
28d19c7
Update search.rst documentation (#4686)
vamsimanohar Oct 29, 2025
642e6b0
Fix CVE-2025-48924 (#4665)
RyanL1997 Oct 29, 2025
63401da
Support millisecond span (#4672)
yuancu Oct 30, 2025
47a7546
Support 'usenull' option in PPL `top` and `rare` commands (#4696)
LantaoJin Oct 30, 2025
ac4a231
bin command error message enhancement (#4690)
ahkcs Oct 30, 2025
9237ab2
BucketAggretationParser should handle more non-composite bucket types…
LantaoJin Oct 31, 2025
4294aad
Merge group fields for aggregate if having dependent group fields (#4…
qianheng-aws Oct 31, 2025
6297084
Do not remove nested fields in resolving AllFieldsExcludeMeta (#4708)
LantaoJin Oct 31, 2025
1f3651d
Pushdown the `top` `rare` commands to nested aggregation (#4707)
LantaoJin Nov 3, 2025
6797338
Support serializing external OpenSearch UDFs at pushdown time (#4618)
yuancu Nov 3, 2025
4250862
Split bwc-tests to bwc-rolling-upgrade and bwc-full-restart (#4716)
LantaoJin Nov 3, 2025
1e0c150
Fix sub-fields accessing of generated structs (#4683)
yuancu Nov 3, 2025
93da3e6
Bump Calcite to 1.41.0 (#4714)
LantaoJin Nov 3, 2025
9657a6a
Support `Streamstats` command with calcite (#4297)
ishaoxy Nov 4, 2025
647e927
Support access to nested field of struct after fields command (#4719)
qianheng-aws Nov 4, 2025
a7d6c10
Enhance tests and doc for eval isnull/isnotnull functions (#4724)
ahkcs Nov 4, 2025
435a0e6
Update clickbench queries with parameter bucket_nullable=false (#4732)
qianheng-aws Nov 4, 2025
ddafd1d
Add allowed_warnings in yaml restful tests (#4731)
LantaoJin Nov 4, 2025
f298a11
Support wildcard for replace command (#4698)
ahkcs Nov 4, 2025
f6ff5a9
poc to convert PPL to substrait plan and add to OpenSearchQueryRequest
vinaykpud Sep 19, 2025
b057a0d
Making terms agg work for string and date work for substrait schema
expani Nov 3, 2025
9c053a2
Removed lingering merge conflict
expani Nov 4, 2025
5851065
Pushing down as terms agg where applicable
expani Nov 4, 2025
33b8cb0
Merge pull request #5 from expani/feature/substrait-plan
vinaykpud Nov 5, 2025
4dd65a4
Ensuring all sub aggs are pushed down and remove reliance on doc_count
expani Nov 5, 2025
ff3cece
Merge pull request #6 from expani/feature/substrait-plan
expani Nov 5, 2025
8506e5f
Pushing down MultiTerms Aggregation
expani Nov 6, 2025
2403fe5
get testing going
mch2 Nov 7, 2025
ce5a307
Merge pull request #7 from mch2/feature/substrait-plan
expani Nov 7, 2025
99bdc48
Injecting count sub agg if absent to ensure doc_count is correct
expani Nov 18, 2025
c900ed7
Changed order of traversal for adding count agg
expani Nov 18, 2025
2ec264c
Removed response ignoring
expani Nov 19, 2025
3f040f9
count changes
sandeshkr419 Nov 19, 2025
eaab86f
Added support for Timestamp fields in filter
vinaykpud Nov 21, 2025
922d11b
Revert "Added support for Timestamp fields in filter"
vinaykpud Nov 21, 2025
91dfee3
add e2e test workflow to sql
mch2 Nov 21, 2025
29b9265
Merge pull request #9 from mch2/feature/substrait-plan Adding e2e tes…
vinaykpud Nov 21, 2025
7269da1
Added support for Timestamp field in the filter (#10)
vinaykpud Nov 21, 2025
a217407
Add ITs to E2E workflow (#11)
mch2 Nov 22, 2025
4b48638
Update RelBuilder to use OpenSearchTypeFactory.TYPE_FACTORY to handle…
vinaykpud Nov 22, 2025
a75f268
Merge pull request #8 from sandeshkr419/df6
mch2 Nov 24, 2025
43e3154
update gh workflow to display pass/fail output and update supported list
mch2 Nov 24, 2025
d7c6467
Merge pull request #13 from mch2/feature/substrait-plan
mch2 Nov 24, 2025
7e52db9
Change supported list to df_ignored list for queries we're still work…
mch2 Nov 24, 2025
0b6ceaa
update index to multi shard and update ignored set to ignore fetch qu…
mch2 Nov 24, 2025
dd1237a
Merge pull request #14 from mch2/feature/substrait-plan
mch2 Nov 24, 2025
61a7082
ignore query 4
mch2 Dec 1, 2025
09fa100
Merge pull request #17 from mch2/feature/substrait-plan
mch2 Dec 1, 2025
6b6ea74
Added a common visitor for RelNode traversing and update to support f…
vinaykpud Dec 2, 2025
2d492d9
Added clear ThreadLocal variable after use (#18)
vinaykpud Dec 2, 2025
8b907c7
[Fix] Incorrect Field Index Mapping in AVG to SUM/COUNT Conversion (#15)
sandeshkr419 Dec 2, 2025
3236ed2
Merge branch '3.3-df' into feature/substrait-plan
sandeshkr419 Dec 3, 2025
ca3c661
force version to 3.3.0
sandeshkr419 Dec 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
205 changes: 205 additions & 0 deletions .github/workflows/datafusion-e2e-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
name: DataFusion E2E Integration Test

on:
pull_request:
branches:
- feature/substrait-plan
push:
branches:
- feature/substrait-plan
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-A unused_variables -A unused_mut"

steps:
- name: Checkout OpenSearch
uses: actions/checkout@v4
with:
repository: opensearch-project/OpenSearch
ref: feature/datafusion
path: OpenSearch

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt

- name: Install Protocol Buffers
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler

- name: Install Protocol Buffers
if: runner.os == 'macOS'
run: brew install protobuf

- name: Install Protocol Buffers
if: runner.os == 'Windows'
run: choco install protoc

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Publish OpenSearch to Maven Local
working-directory: OpenSearch
run: ./gradlew publishToMavenLocal -x test -PrustDebug=true

- name: Checkout SQL Plugin
uses: actions/checkout@v4
with:
path: opensearch-sql

- name: Publish SQL Plugin to Maven Local
working-directory: opensearch-sql
run: ./gradlew publishToMavenLocal -x test

- name: Run DataFusionReaderManager Tests
working-directory: OpenSearch
run: ./gradlew :plugins:engine-datafusion:test --tests "org.opensearch.datafusion.DataFusionReaderManagerTests"

- name: Run OpenSearch with DataFusion Plugin
working-directory: OpenSearch
run: |
./gradlew run \
--preserve-data \
-PremotePlugins="['org.opensearch.plugin:opensearch-job-scheduler:3.3.0.0-SNAPSHOT', 'org.opensearch.plugin:opensearch-sql-plugin:3.3.0.0-SNAPSHOT']" \
-PinstalledPlugins="['engine-datafusion']" &

# Wait for OpenSearch to start
timeout 300 bash -c 'until curl -s http://localhost:9200; do sleep 5; done'

- name: Run SQL CalcitePPLClickbenchIT
working-directory: opensearch-sql
run: ./gradlew :integ-test:integTest --tests "org.opensearch.sql.calcite.clickbench.CalcitePPLClickBenchIT" -Dtests.method="testDataFusion" -Dtests.cluster=localhost:9200 -Dtests.rest.cluster=localhost:9200 -DignorePrometheus=true -Dtests.clustername=opensearch -Dtests.output=true

- name: Run E2E Tests
run: |
# Create index
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X PUT 'http://localhost:9200/index-7' \
-H 'Content-Type: application/json' \
-d '{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"refresh_interval": -1
},
"mappings": {
"properties": {
"id": {"type": "keyword"},
"name": {"type": "keyword"},
"age": {"type": "integer"},
"salary": {"type": "long"},
"score": {"type": "double"},
"active": {"type": "boolean"},
"created_date": {"type": "date"}
}
}
}')
if [ "$HTTP_CODE" != "200" ]; then
echo "Failed to create index. HTTP status: $HTTP_CODE"
exit 1
fi

# Index documents
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST 'http://localhost:9200/_bulk' \
-H 'Content-Type: application/json' \
-d '{"index":{"_index":"index-7"}}
{"id":"1","name":"Alice","age":30,"salary":75000,"score":95.5,"active":true,"created_date":"2024-01-15"}
{"index":{"_index":"index-7"}}
{"id":"2","name":"Bob","age":25,"salary":60000,"score":88.3,"active":true,"created_date":"2024-02-20"}
{"index":{"_index":"index-7"}}
{"id":"3","name":"Charlie","age":35,"salary":90000,"score":92.7,"active":false,"created_date":"2024-03-10"}
{"index":{"_index":"index-7"}}
{"id":"4","name":"Diana","age":28,"salary":70000,"score":89.1,"active":true,"created_date":"2024-04-05"}
{"index":{"_index":"index-7"}}
{"id":"5","name":"Bob","age":30,"salary":55000,"score":81.1,"active":true,"created_date":"2024-04-05"}
{"index":{"_index":"index-7"}}
{"id":"6","name":"Diana","age":35,"salary":65000,"score":71.1,"active":true,"created_date":"2024-02-05"}
')
if [ "$HTTP_CODE" != "200" ]; then
echo "Failed to index documents. HTTP status: $HTTP_CODE"
exit 1
fi

# Refresh index
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST 'localhost:9200/index-7/_refresh')
if [ "$HTTP_CODE" != "200" ]; then
echo "Failed to refresh index. HTTP status: $HTTP_CODE"
exit 1
fi

# Query 1: stats with min, max, avg
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST 'http://localhost:9200/_plugins/_ppl' \
-H 'Content-Type: application/json' \
-d '{"query": "source=index-7 | stats count(), min(age) as min, max(age) as max, avg(age) as avg"}')
if [ "$HTTP_CODE" != "200" ]; then
echo "Query 1 failed. HTTP status: $HTTP_CODE"
exit 1
fi

# Query 2: count by name with sort
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST 'http://localhost:9200/_plugins/_ppl' \
-H 'Content-Type: application/json' \
-d '{"query": "source=index-7 | stats count() as c by name | sort c"}')
if [ "$HTTP_CODE" != "200" ]; then
echo "Query 2 failed. HTTP status: $HTTP_CODE"
exit 1
fi

# Query 3: count and sum by name with sort
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST 'http://localhost:9200/_plugins/_ppl' \
-H 'Content-Type: application/json' \
-d '{"query": "source=index-7 | stats count(), sum(age) as c by name | sort c"}')
if [ "$HTTP_CODE" != "200" ]; then
echo "Query 3 failed. HTTP status: $HTTP_CODE"
exit 1
fi

# Query 4: where clause with stats
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST 'http://localhost:9200/_plugins/_ppl' \
-H 'Content-Type: application/json' \
-d '{"query": "source=index-7 | where name = \"Bob\" | stats sum(age)"}')
if [ "$HTTP_CODE" != "200" ]; then
echo "Query 4 failed. HTTP status: $HTTP_CODE"
exit 1
fi

# Query 5: sum by name sorted by sum
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST 'http://localhost:9200/_plugins/_ppl' \
-H 'Content-Type: application/json' \
-d '{"query": "source=index-7 | stats sum(age) as s by name | sort s"}')
if [ "$HTTP_CODE" != "200" ]; then
echo "Query 5 failed. HTTP status: $HTTP_CODE"
exit 1
fi

# Query 6: sum by name sorted by name
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST 'http://localhost:9200/_plugins/_ppl' \
-H 'Content-Type: application/json' \
-d '{"query": "source=index-7 | stats sum(age) as s by name | sort name"}')
if [ "$HTTP_CODE" != "200" ]; then
echo "Query 6 failed. HTTP status: $HTTP_CODE"
exit 1
fi

# Query 7: count by name
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST 'http://localhost:9200/_plugins/_ppl' \
-H 'Content-Type: application/json' \
-d '{"query": "source=index-7 | stats count() as c by name"}')
if [ "$HTTP_CODE" != "200" ]; then
echo "Query 7 failed. HTTP status: $HTTP_CODE"
exit 1
fi

echo "All E2E tests passed successfully!"
15 changes: 11 additions & 4 deletions .github/workflows/delete_backport_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ on:
jobs:
delete-branch:
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.head.ref,'backport/')
permissions:
pull-requests: write
if: startsWith(github.event.pull_request.head.ref,'backport/') || startsWith(github.event.pull_request.head.ref,'release-chores/')
steps:
- name: Delete merged branch
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/github-script@v7
with:
script: |
github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `heads/${context.payload.pull_request.head.ref}`,
})
47 changes: 47 additions & 0 deletions .github/workflows/maven-publish-modules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish unified query modules to maven

on:
workflow_dispatch:
push:
branches:
- main
- '[0-9]+.[0-9]+'
- '[0-9]+.x'

env:
SNAPSHOT_REPO_URL: https://ci.opensearch.org/ci/dbc/snapshots/maven/

jobs:
publish-unified-query-modules:
strategy:
fail-fast: false
if: github.repository == 'opensearch-project/sql'
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: 21
- uses: actions/checkout@v3
- name: Load secret
uses: 1password/load-secrets-action@v2
with:
# Export loaded secrets as environment variables
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
aws-region: us-east-1
- name: publish snapshots to maven
run: |
./gradlew publishUnifiedQueryPublicationToSnapshotsRepository
3 changes: 0 additions & 3 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
- '[0-9]+.[0-9]+'
- '[0-9]+.x'

env:
SNAPSHOT_REPO_URL: https://ci.opensearch.org/ci/dbc/snapshots/maven/

jobs:
build-and-publish-snapshots:
strategy:
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/publish-async-query-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
push:
branches:
- main
- 1.*
- 2.*
- '[0-9]+.[0-9]+'
- '[0-9]+.x'
paths:
- 'async-query-core/**'
- '.github/workflows/publish-async-query-core.yml'
Expand All @@ -18,7 +18,6 @@ concurrency:
cancel-in-progress: false

env:
SNAPSHOT_REPO_URL: https://central.sonatype.com/repository/maven-snapshots/
COMMIT_MAP_FILENAME: commit-history-async-query-core.json

jobs:
Expand Down Expand Up @@ -47,8 +46,19 @@ jobs:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username
SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role

- name: Export SNAPSHOT_REPO_URL
run: |
snapshot_repo_url=${{ env.MAVEN_SNAPSHOTS_S3_REPO }}
echo "SNAPSHOT_REPO_URL=$snapshot_repo_url" >> $GITHUB_ENV

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
aws-region: us-east-1

- name: Set commit ID
id: set_commit
Expand Down Expand Up @@ -83,4 +93,4 @@ jobs:
source ./.github/maven-publish-utils.sh

# Call the main function for async-query-core
publish_async_query_core "${{ steps.extract_version.outputs.VERSION }}" "${{ steps.set_commit.outputs.commit_id }}"
publish_async_query_core "${{ steps.extract_version.outputs.VERSION }}" "${{ steps.set_commit.outputs.commit_id }}"
20 changes: 15 additions & 5 deletions .github/workflows/publish-grammar-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
push:
branches:
- main
- 1.*
- 2.*
- '[0-9]+.[0-9]+'
- '[0-9]+.x'
paths:
- 'language-grammar/src/main/antlr4/**'
- 'language-grammar/build.gradle'
Expand All @@ -19,7 +19,6 @@ concurrency:
cancel-in-progress: false

env:
SNAPSHOT_REPO_URL: https://central.sonatype.com/repository/maven-snapshots/
COMMIT_MAP_FILENAME: commit-history-language-grammar.json

jobs:
Expand Down Expand Up @@ -51,8 +50,19 @@ jobs:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username
SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role

- name: Export SNAPSHOT_REPO_URL
run: |
snapshot_repo_url=${{ env.MAVEN_SNAPSHOTS_S3_REPO }}
echo "SNAPSHOT_REPO_URL=$snapshot_repo_url" >> $GITHUB_ENV

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
aws-region: us-east-1

- name: Set version
id: set_version
Expand Down
Loading
Loading