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

Run Integ test in a secure opensearch cluster #535

Conversation

vibrantvarun
Copy link
Member

@vibrantvarun vibrantvarun commented Jan 8, 2024

Description

The PR adds a github workflow test-security.yml which consists actions to run integ tests in secure opensearch cluster.

  • Optimize build.gradle
  • Add a test-security.yml (Consists of command to run integ tests in secure cluster environment.
  • Zip archive the security plugin from opensearch artifact.
  • Install the security plugin in the integ cluster
  • Run the tests

Issues Resolved

#201

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as 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: Varun Jain <varunudr@amazon.com>
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bd1dfbf) 84.33% compared to head (a3bf2df) 84.33%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #535   +/-   ##
=========================================
  Coverage     84.33%   84.33%           
  Complexity      533      533           
=========================================
  Files            40       40           
  Lines          1564     1564           
  Branches        244      244           
=========================================
  Hits           1319     1319           
  Misses          133      133           
  Partials        112      112           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Varun Jain <varunudr@amazon.com>
Signed-off-by: Varun Jain <varunudr@amazon.com>
Signed-off-by: Varun Jain <varunudr@amazon.com>
Signed-off-by: Varun Jain <varunudr@amazon.com>
Copy link
Member

@owaiskazi19 owaiskazi19 left a comment

Choose a reason for hiding this comment

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

LGTM with a small nit

.github/workflows/test_security.yml Outdated Show resolved Hide resolved
Co-authored-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Varun Jain <varunudr@amazon.com>
@vibrantvarun vibrantvarun changed the title Run Integ test in secure opensearch cluster Run Integ test in a secure opensearch cluster Jan 16, 2024
DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
dependencies {
classpath "${opensearch_group}.gradle:build-tools:${opensearch_version}"
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.23.2"
classpath "io.freefair.gradle:lombok-plugin:8.4"
Copy link
Member

Choose a reason for hiding this comment

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

Why adding spotless and lombok again? It's already there in the build.gradle. Looks like a copy/paste issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

After removing those 2 lines I get below error. It is because in these two lines adds spotless and lombok with a version in the classpath. And in below lines I just do apply lombok

./gradlew spotlessApply

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/varunudr/neuralsearch/neural-search/build.gradle' line: 56

* What went wrong:
A problem occurred evaluating root project 'neural-search'.
> Plugin with id 'com.diffplug.spotless' not found.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring root project 'neural-search'.
> Failed to notify project evaluation listener.
   > Must specify license and notice file for project :
   > description is a required setting for opensearchplugin

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

Copy link
Member

@joshpalis joshpalis left a comment

Choose a reason for hiding this comment

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

LGTM, just a small comment

DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
vibrantvarun and others added 2 commits January 16, 2024 14:21
Co-authored-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Varun Jain <varunudr@amazon.com>
Co-authored-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Varun Jain <varunudr@amazon.com>
Copy link
Member

@jmazanec15 jmazanec15 left a comment

Choose a reason for hiding this comment

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

LGTM

@martin-gaievski martin-gaievski added backport 2.x Label will add auto workflow to backport PR to 2.x branch Infrastructure labels Jan 16, 2024
@martin-gaievski martin-gaievski merged commit a6841cc into opensearch-project:main Jan 16, 2024
58 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

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-535-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a6841cc346aabf1f25fe2a33d45fa2cb8ab13e9e
# Push it to GitHub
git push --set-upstream origin backport/backport-535-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-535-to-2.x.

martin-gaievski pushed a commit that referenced this pull request Jan 24, 2024
* Run Integ test in secure opensearch cluster

Signed-off-by: Varun Jain <varunudr@amazon.com>
Co-authored-by: Owais Kazi <owaiskazi19@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Label will add auto workflow to backport PR to 2.x branch Infrastructure
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants