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

Integ Test Refactoring #1383

Merged

Conversation

vamsi-amazon
Copy link
Member

@vamsi-amazon vamsi-amazon commented Feb 28, 2023

Description

Refactored to skip integ tests with datasources and prometheus in windows platform.

Changes Included:

  • Changed release integ tests script to perform datasource creation action only in case of non-windows OS types.
  • Changed integ test task to exclude org/opensearch/sql/ppl/PrometheusDataSourceCommandsIT.class
    org/opensearch/sql/ppl/ShowDataSourcesCommandIT.class, org/opensearch/sql/ppl/InformationSchemaCommandIT.class in case of non-windows OS Types.
  • Fixed Integ Tests failures in windows platform due to line separators.
  • Added support for windows in SpawnGradleTask and KillGradleTask. This is required for doctests. Even after fixing this doctests are still failing in windows due to bootstrap.sh. We can tackle doctests fix in a separate issue.

Issues Resolved

[List any issues this PR will resolve]

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: Vamsi Manohar <reddyvam@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2023

Codecov Report

Merging #1383 (54e11a5) into 2.x (a32bcbe) 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            @@
##                2.x    #1383   +/-   ##
=========================================
  Coverage     98.38%   98.38%           
  Complexity     3698     3698           
=========================================
  Files           345      345           
  Lines          9113     9113           
  Branches        585      585           
=========================================
  Hits           8966     8966           
  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.

@vamsi-amazon vamsi-amazon self-assigned this Feb 28, 2023
@vamsi-amazon vamsi-amazon marked this pull request as ready for review February 28, 2023 02:50
@vamsi-amazon vamsi-amazon requested a review from a team as a code owner February 28, 2023 02:50
derek-ho
derek-ho previously approved these changes Feb 28, 2023
Copy link
Collaborator

@derek-ho derek-ho left a comment

Choose a reason for hiding this comment

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

LGTM other than verifying the workflow with github workflow, thanks for the changes!

scripts/integtest.sh Outdated Show resolved Hide resolved
integ-test/build.gradle Outdated Show resolved Hide resolved
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
@vamsi-amazon vamsi-amazon force-pushed the prom-integ-test-refactor branch 2 times, most recently from 54dd12d to 63f20bd Compare March 1, 2023 21:31
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
@vamsi-amazon vamsi-amazon added the infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc. label Mar 1, 2023
joshuali925
joshuali925 previously approved these changes Mar 2, 2023
yes | $OPENSEARCH_HOME/bin/opensearch-keystore add-file plugins.query.federation.datasources.config $OPENSEARCH_HOME/datasources.json

if [ $SECURITY_ENABLED == "true" ]
if [ $OS != "WindowsNT" ]
Copy link
Member

Choose a reason for hiding this comment

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

windows doesn't have a uname or bash, I remember different uname gives different outputs on windows. which uname is this? maybe document prerequisite dependencies in case user wants to run tests on windows

Copy link
Member Author

Choose a reason for hiding this comment

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

This requires Cygwin or MinGW packages and these are installed in the ami used in our build systems. Will mention it as a comment.

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
joshuali925
joshuali925 previously approved these changes Mar 2, 2023
@joshuali925
Copy link
Member

CI failed?

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
…to gitignore.

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to main 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-main main
# Navigate to the new working tree
cd .worktrees/backport-main
# Create a new branch
git switch --create backport/backport-1383-to-main
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8f6793ba63cb8c0301447276ae65a3e3f46563bd
# Push it to GitHub
git push --set-upstream origin backport/backport-1383-to-main
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-main

Then, create a pull request where the base branch is main and the compare/head branch is backport/backport-1383-to-main.

opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 3, 2023
* Integ Test Refactoring

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
(cherry picked from commit 8f6793b)
vamsi-amazon added a commit that referenced this pull request Mar 3, 2023
* Integ Test Refactoring

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
(cherry picked from commit 8f6793b)

Co-authored-by: vamsi-amazon <reddyvam@amazon.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to main 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-main main
# Navigate to the new working tree
cd .worktrees/backport-main
# Create a new branch
git switch --create backport/backport-1383-to-main
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8f6793ba63cb8c0301447276ae65a3e3f46563bd
# Push it to GitHub
git push --set-upstream origin backport/backport-1383-to-main
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-main

Then, create a pull request where the base branch is main and the compare/head branch is backport/backport-1383-to-main.

vamsi-amazon added a commit that referenced this pull request Mar 3, 2023
* Integ Test Refactoring

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
(cherry picked from commit 8f6793b)
vamsi-amazon added a commit that referenced this pull request Mar 7, 2023
* Integ Test Refactoring

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
(cherry picked from commit 8f6793b)
vamsi-amazon added a commit that referenced this pull request Mar 7, 2023
* Integ Test Refactoring

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
(cherry picked from commit 8f6793b)
matthewryanwells pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Mar 10, 2023
…1393)

* Integ Test Refactoring

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
(cherry picked from commit 8f6793b)
Signed-off-by: Matthew Wells <matthew.wells@improving.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport main backport 2.6 infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants