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

Add publish snapshots to maven via GHA #1359

Merged
merged 3 commits into from
Feb 21, 2023
Merged

Add publish snapshots to maven via GHA #1359

merged 3 commits into from
Feb 21, 2023

Conversation

rupal-bq
Copy link
Contributor

Description

  • Added publish snapshots to maven via GHA

Issues Resolved

#1358

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Rupal Mahajan <maharup@amazon.com>
@rupal-bq rupal-bq requested a review from a team as a code owner February 20, 2023 18:47
@rupal-bq rupal-bq requested a review from gaiksaya February 20, 2023 18:51
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2023

Codecov Report

Merging #1359 (8647e41) into main (76a8d29) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff            @@
##               main    #1359   +/-   ##
=========================================
  Coverage     98.38%   98.38%           
  Complexity     3693     3693           
=========================================
  Files           343      343           
  Lines          9107     9107           
  Branches        585      585           
=========================================
  Hits           8960     8960           
  Misses          142      142           
  Partials          5        5           
Flag Coverage Δ
sql-engine 98.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rupal-bq
Copy link
Contributor Author

Local testing output

maharup@b0f1d879dff7 opensearch-sql % ./gradlew publishPluginZipPublicationToSnapshotsRepository
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 7.4.2
  OS Info               : Mac OS X 13.2 (x86_64)
  JDK Version           : 11 (Amazon Corretto JDK)
  JAVA_HOME             : /Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home
  Random Testing Seed   : 406B6DCF276A5F40
  In FIPS 140 mode      : false
=======================================

> Task :legacy:generateGrammarSource
Execution optimizations have been disabled for task ':legacy:generateGrammarSource' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/maharup/GitRepoWorkspace/opensearch-sql/legacy/build/generated-src/antlr/main/org/opensearch/sql/legacy/antlr/parser'. Reason: Task ':legacy:generateEffectiveLombokConfig' uses this output of task ':legacy:generateGrammarSource' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
warning(125): OpenSearchLegacySqlParser.g4:280:47: implicit definition of token TIME in parser
warning(125): OpenSearchLegacySqlParser.g4:481:21: implicit definition of token ADDDATE in parser
warning(125): OpenSearchLegacySqlParser.g4:481:31: implicit definition of token ADDTIME in parser
warning(125): OpenSearchLegacySqlParser.g4:481:41: implicit definition of token GREATEST in parser
warning(125): OpenSearchLegacySqlParser.g4:481:52: implicit definition of token LEAST in parser

> Task :sql:generateGrammarSource
Execution optimizations have been disabled for task ':sql:generateGrammarSource' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/maharup/GitRepoWorkspace/opensearch-sql/sql/build/generated-src/antlr/main/org/opensearch/sql/sql/antlr/parser'. Reason: Task ':sql:generateEffectiveLombokConfig' uses this output of task ':sql:generateGrammarSource' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
warning(184): OpenSearchSQLLexer.g4:112:0: One of the token MISSING values unreachable. MISSING is always overlapped by token MISSING_LITERAL
warning(154): OpenSearchSQLParser.g4:160:0: rule windowFunction contains an optional block with at least one alternative that can match an empty string

> Task :ppl:generateGrammarSource
Execution optimizations have been disabled for task ':ppl:generateGrammarSource' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/maharup/GitRepoWorkspace/opensearch-sql/ppl/build/generated-src/antlr/main/org/opensearch/sql/ppl/antlr/parser'. Reason: Task ':ppl:generateEffectiveLombokConfig' uses this output of task ':ppl:generateGrammarSource' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 3 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD SUCCESSFUL in 33s
41 actionable tasks: 15 executed, 26 up-to-date
maharup@b0f1d879dff7 opensearch-sql % cd plugin 
maharup@b0f1d879dff7 plugin % find snapshots | sort                                     
snapshots
snapshots/org
snapshots/org/opensearch
snapshots/org/opensearch/plugin
snapshots/org/opensearch/plugin/opensearch-sql-plugin
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/maven-metadata.xml
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/maven-metadata.xml.md5
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/maven-metadata.xml.sha1
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/maven-metadata.xml.sha256
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/maven-metadata.xml.sha512
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.pom
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.pom.md5
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.pom.sha1
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.pom.sha256
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.pom.sha512
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.zip
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.zip.md5
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.zip.sha1
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.zip.sha256
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.183619-1.zip.sha512
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.pom
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.pom.md5
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.pom.sha1
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.pom.sha256
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.pom.sha512
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.zip
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.zip.md5
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.zip.sha1
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.zip.sha256
snapshots/org/opensearch/plugin/opensearch-sql-plugin/3.0.0.0-SNAPSHOT/opensearch-sql-plugin-3.0.0.0-20230220.192650-2.zip.sha512
snapshots/org/opensearch/plugin/opensearch-sql-plugin/maven-metadata.xml
snapshots/org/opensearch/plugin/opensearch-sql-plugin/maven-metadata.xml.md5
snapshots/org/opensearch/plugin/opensearch-sql-plugin/maven-metadata.xml.sha1
snapshots/org/opensearch/plugin/opensearch-sql-plugin/maven-metadata.xml.sha256
snapshots/org/opensearch/plugin/opensearch-sql-plugin/maven-metadata.xml.sha512
maharup@b0f1d879dff7 plugin % 

Signed-off-by: Rupal Mahajan <maharup@amazon.com>
gaiksaya
gaiksaya previously approved these changes Feb 20, 2023
Copy link
Member

@gaiksaya gaiksaya left a comment

Choose a reason for hiding this comment

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

Added PUBLISH_SNAPSHOTS_ROLE secret

@rupal-bq rupal-bq self-assigned this Feb 21, 2023
@dai-chen dai-chen added the infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc. label Feb 21, 2023
.github/workflows/maven-publish.yml Show resolved Hide resolved
.github/workflows/maven-publish.yml Outdated Show resolved Hide resolved
.github/workflows/maven-publish.yml Show resolved Hide resolved
Signed-off-by: Rupal Mahajan <maharup@amazon.com>

Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@rupal-bq rupal-bq merged commit b826835 into opensearch-project:main Feb 21, 2023
@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:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1359-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b82683501de422cd642ffbcad2e0d9f2aa3e6e9a
# Push it to GitHub
git push --set-upstream origin backport/backport-1359-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

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

@rupal-bq
Copy link
Contributor Author

@gaiksaya workflow failing with

/home/runner/work/sql/sql/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java:107: error: cannot access ToXContentObject
      ColumnValue columnValue = row.getValue(i);
                                   ^
  class file for org.opensearch.common.xcontent.ToXContentObject not found

@gaiksaya
Copy link
Member

Yes related PR: opensearch-project/OpenSearch#6414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants