Skip to content

Conversation

@ahkcs
Copy link
Contributor

@ahkcs ahkcs commented May 30, 2025

Description

Publish to Maven: Grammar Files & Async Query Core
This PR adds a GitHub Actions workflow to automate the publication of artifacts to the Maven snapshot repository for the language-grammar package and the async-query-core module.

Key Features

  1. Grammar File Publishing (language-grammar)
    Collects .g4 ANTLR grammar files from the language-grammar module.

Packages them into a .zip artifact with a generated POM.

Publishes the zip artifact to Maven snapshot repo under org.opensearch:language-grammar.

Injects the current Git commit SHA into maven-metadata.xml as for traceability.

  1. Async Query Core Publishing (async-query-core)
    Builds a shaded JAR (shadowJar) of the async-query-core module using Gradle.

Prepares and publishes the JAR and generated POM to Maven snapshot repo under org.opensearch:async-query-core.

Similarly injects the current Git commit SHA into version metadata.

Copy link
Collaborator

@noCharger noCharger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several duplicate logics defined on grammar flow and async-query-core flow. Can we refactor?

@ahkcs ahkcs requested a review from noCharger May 31, 2025 00:06
noCharger
noCharger previously approved these changes Jun 2, 2025
Copy link
Collaborator

@noCharger noCharger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Let's also ensure that no new syntax or grammar is introduced from g4 files; everything should be the same as the current ones on main branch

Signed-off-by: Kai Huang <ahkcs@amazon.com>
@ahkcs ahkcs force-pushed the feat/change_workflow branch from 1197029 to 86a10af Compare June 2, 2025 19:41
@ahkcs ahkcs requested a review from noCharger June 2, 2025 21:11
@noCharger noCharger merged commit 5eb2e5b into opensearch-project:main Jun 3, 2025
22 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/sql/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-2.x
# Create a new branch
git switch --create backport/backport-3715-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5eb2e5ba9bb3cea40beacd2fae4d180480c9ed93
# Push it to GitHub
git push --set-upstream origin backport/backport-3715-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-3715-to-2.x.

@noCharger
Copy link
Collaborator

can you double check the versioning of async-query-core?

Index of /repositories/snapshots/org/opensearch/async-query-core
Name	Last Modified	Size	Description
Parent Directory
0.1.0-SNAPSHOT/	Mon Jun 02 19:17:14 UTC 2025	 	
1.0.0-SNAPSHOT/	Tue Jun 03 00:54:17 UTC 2025	 	
2.20.0.0-SNAPSHOT/	Wed May 28 00:41:29 UTC 2025

on 2.x it should starts from 0.1.0
on main starts from 1.0.0
is this the plan?

@ahkcs
Copy link
Contributor Author

ahkcs commented Jun 3, 2025

can you double check the versioning of async-query-core?

Index of /repositories/snapshots/org/opensearch/async-query-core
Name	Last Modified	Size	Description
Parent Directory
0.1.0-SNAPSHOT/	Mon Jun 02 19:17:14 UTC 2025	 	
1.0.0-SNAPSHOT/	Tue Jun 03 00:54:17 UTC 2025	 	
2.20.0.0-SNAPSHOT/	Wed May 28 00:41:29 UTC 2025

on 2.x it should starts from 0.1.0 on main starts from 1.0.0 is this the plan?

It extracts version from build.gradle(async-query-core) file, which is set to be 1.0.0 on main, should I modify it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants