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

Stop prometheus in doctest build.gradle now runs upon project failure in startOpenSearch #1747

Merged
merged 3 commits into from
Jun 21, 2023

Conversation

MitchellGale
Copy link
Contributor

Stop Prometheus was not running in doctest in cases of some run errors causing Prometheus to keep running after build is stopped. This will cause failure upon next attempt of startPrometheus due to the existing Prometheus running on localhost:9090.

Steps to reproduce error that is fixed.

  1. Run an OpenSearch instance
  2. Run build in OpenSearch SQL
  3. Observe that OpenSearch SQL crashes due to step 1
  4. Stop OpenSearch instance started in step 1
  5. Re-run build for OpenSearch SQL
  6. Observe that there is error about Prometheus already running.

Same steps can be taken working from this PR branch and it will not show the error in step 6.

Issues Resolved

1083

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.

MitchellGale and others added 3 commits June 15, 2023 14:10
Signed-off-by: Mitchell Gale <Mitchell.Gale@improving.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Stop prometheus in doctest build.gradle now runs upon project failure in startOpenSearch
@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #1747 (07f6a8a) into main (94d5479) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #1747   +/-   ##
=========================================
  Coverage     97.33%   97.33%           
  Complexity     4408     4408           
=========================================
  Files           388      388           
  Lines         10938    10938           
  Branches        773      773           
=========================================
  Hits          10647    10647           
  Misses          284      284           
  Partials          7        7           
Flag Coverage Δ
sql-engine 97.33% <ø> (ø)

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

Copy link
Collaborator

@acarbonetto acarbonetto left a comment

Choose a reason for hiding this comment

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

Thanks.

@Yury-Fridlyand Yury-Fridlyand merged commit ded014d into opensearch-project:main Jun 21, 2023
16 checks passed
@Yury-Fridlyand Yury-Fridlyand deleted the Integ/FixPrometheus branch June 21, 2023 22:20
@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-1747-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ded014d1f5cea3ee8fda282e831f67ad66461961
# Push it to GitHub
git push --set-upstream origin backport/backport-1747-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-1747-to-2.x.

acarbonetto pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jun 22, 2023
… in startOpenSearch (opensearch-project#1747)

* Stop prometheus now runs when project start fails :)

Signed-off-by: Mitchell Gale <Mitchell.Gale@improving.com>

* Bump bwc opensearch version to 2.9

Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>

---------

Signed-off-by: Mitchell Gale <Mitchell.Gale@improving.com>
Signed-off-by: MaxKsyunz <maxk@bitquilltech.com>
Co-authored-by: MaxKsyunz <maxk@bitquilltech.com>
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.

None yet

6 participants