-
Notifications
You must be signed in to change notification settings - Fork 0
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
Made changes to build.gradle for doctest and integ-test to make stop Prometheus #270
Conversation
Codecov Report
@@ Coverage Diff @@
## Integ/Fix-StopPrometheus #270 +/- ##
==============================================================
+ Coverage 97.16% 97.30% +0.14%
- Complexity 4116 4326 +210
==============================================================
Files 371 385 +14
Lines 10365 10807 +442
Branches 704 762 +58
==============================================================
+ Hits 10071 10516 +445
+ Misses 287 284 -3
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
doctest/build.gradle
Outdated
logger.quiet "No Prometheus server running!" | ||
} else { | ||
def pid = pidFile.text | ||
def process = "kill $pid".execute() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work on all platforms, namely Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should, it's using the same logic to stop prometheus that already existed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see it's a copy of the stopPrometheus task, right?
And you can't call it from here because that creates a circular dependency?
doctest/build.gradle
Outdated
file("$projectDir/bin/prometheus").deleteDir() | ||
file("$projectDir/bin/prometheus.tar.gz").delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this cause Prometheus to be downloaded again immediately after?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it exists and would have been deleted had the previous run been successful, it will delete it then download it again after. Do you suggest if it exists we just go with the previously running version? I worried that if there were changes made to it, if it was not deleted it could create issues in testing.
file("$projectDir/bin/prometheus.tar.gz").delete() | ||
} | ||
} | ||
|
||
download.run { | ||
src getPrometheusBinaryLocation() | ||
dest new File("$projectDir/bin", 'prometheus.tar.gz') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dest new File("$projectDir/bin", 'prometheus.tar.gz') | |
dest new File("$projectDir/bin", 'prometheus.tar.gz') | |
overwrite false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will this change do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should prevent redownloading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, because the .tar.gz should already exist? I assume I should delete line 49 in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I think we shouldn't delete and shouldn't re-download it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it does not re-download Prometheus, how would a developer get a newer version of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version is hardcoded. CI will always download the file, because it starts with a clean VM.
doctest/build.gradle
Outdated
def process = "kill $pid".execute() | ||
|
||
try { | ||
process.waitFor() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not want to check result?
Normally, this is crucial when spawning other processes. Is "we tried, I hope it worked" sufficient in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should happen if it was not successful? I think now it'll produce an error.
doctest/build.gradle
Outdated
if(getOSFamilyType() != "windows") { | ||
stopPrometheus.mustRunAfter startPrometheus | ||
startOpenSearch.dependsOn startPrometheus | ||
stopOpenSearch.finalizedBy stopPrometheus | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this still necessary?
startOpenSearch needs startPrometheus because there are some integration tests that use both.
stopPrometheus needs to be run after stopOpenSearch.
5ee27d0
to
4af2601
Compare
Can you rebase integ branch to clean up commit history? |
Signed-off-by: Derek Ho <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* Changed gradle version and removed values iterator Signed-off-by: Guian Gumpac <[email protected]> * Update a test to match new indexResponse.aliases() type. Signed-off-by: MaxKsyunz <[email protected]> * Ran ./gradlew wrapper Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: MaxKsyunz <[email protected]> Co-authored-by: MaxKsyunz <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* Keep up with refactoring in OpenSearch. Signed-off-by: MaxKsyunz <[email protected]> * Updating code formatting. Signed-off-by: MaxKsyunz <[email protected]> --------- Signed-off-by: MaxKsyunz <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* feat: PPL parser for ccs Signed-off-by: Sean Kao <[email protected]> * feat: disable describe remote cluster index in PPL Allowing the syntax will lead to misunderstanding in the query result, because we will do a local cluster query for index mapping, even for remote indices. This is due to the restriction that OpenSearch doesn't support remote cluster index mapping query at the moment. Signed-off-by: Sean Kao <[email protected]> * feat: Query system index without cluster name We require system index query to happen at the local cluster. Currently, OpenSearch does not support cross cluster system index query. Thus, mapping of a remote index is unavailable. Therefore, we require the local cluster to have the system index of the remote cluster index. The full "cluster:index" name is still used to query OpenSearch for datarows, as CCS is natively supported. Signed-off-by: Sean Kao <[email protected]> * fix: index name parsing for datasources To identify datasources in the index qualified names, they need to be parsed into parts (separated only by dots). clusterQualifiedName can't contain custom datasources, hence the distinction. Signed-off-by: Sean Kao <[email protected]> * multi clusters setup for integration test Signed-off-by: Sean Kao <[email protected]> * Add IT test case Signed-off-by: Sean Kao <[email protected]> * Document ccs for ppl Signed-off-by: Sean Kao <[email protected]> * documentation update Signed-off-by: Sean Kao <[email protected]> * feat: allow describe remote cluster index in PPL Signed-off-by: Sean Kao <[email protected]> * feat: allow "*:index" to match all remote clusters Signed-off-by: Sean Kao <[email protected]> * use local index names for field mappings request Signed-off-by: Sean Kao <[email protected]> * allow ':' in index identifier Signed-off-by: Sean Kao <[email protected]> * docs update Signed-off-by: Sean Kao <[email protected]> * limit cluster prefix to table names only Signed-off-by: Sean Kao <[email protected]> * move multicluster capability to sql rest test case Signed-off-by: Sean Kao <[email protected]> * add IT for failure case Signed-off-by: Sean Kao <[email protected]> * remove logger info for connection in IT test case Signed-off-by: Sean Kao <[email protected]> --------- Signed-off-by: Sean Kao <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
…h-project#1598) * Bump org.json version for CVE * Fix assertion by json array similar method * Fix more assertions which failed on query path return BigDecimal * Fix legacy expr value factory --------- Signed-off-by: Chen Dai <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
…ject#1610) Signed-off-by: Sean Kao <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Dhrubo Saha <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* Add hash join benchmark doc Signed-off-by: Chen Dai <[email protected]> * Fix graph link Signed-off-by: Chen Dai <[email protected]> * Reformat with new lines Signed-off-by: Chen Dai <[email protected]> * Rename doc title Signed-off-by: Chen Dai <[email protected]> * Add note for OOM Signed-off-by: Chen Dai <[email protected]> --------- Signed-off-by: Chen Dai <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
…#1620) * Initial commit for adding nested documentation and select clause specific documentation. Signed-off-by: forestmvey <[email protected]> * Adding priorities, additional examples, cleaning up diagrams based on comments and adding table of contents. Signed-off-by: forestmvey <[email protected]> * Fixing using complete class names for state diagrams, added clarification for examples, and used a better example to describe response flattening and cross join. Signed-off-by: forestmvey <[email protected]> * Removing release schedule, removing unnecessary portions to DSL for query examples, minor clarifications on descriptions. Signed-off-by: forestmvey <[email protected]> * Cleaning up Class diagram. Signed-off-by: forestmvey <[email protected]> --------- Signed-off-by: forestmvey <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
…roject#1645) Signed-off-by: MaxKsyunz <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
…oject#1662) Signed-off-by: Mitchell Gale <[email protected]>
…prometheus before start. Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Mitchell Gale <[email protected]>
…Prometheus. Signed-off-by: Mitchell Gale <[email protected]>
…o run stopPrometheus before startPrometheus runs. Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Peng Huo <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
…rch-project#1640) * Adding documentation for nested function use in WHERE clause. Signed-off-by: forestmvey <[email protected]> * Revising sections based on PR feedback. Signed-off-by: forestmvey <[email protected]> * Adding link for flattening details and filling in section with normalization strategy. Signed-off-by: forestmvey <[email protected]> --------- Signed-off-by: forestmvey <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
…on (opensearch-project#1657) * Adding support for nested function used in predicate expression. Signed-off-by: forestmvey <[email protected]> * Add support for LIKE with nested query in predicate expression. Signed-off-by: forestmvey <[email protected]> --------- Signed-off-by: forestmvey <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* Create new anonymizer for new engine (#266) * Created anonymizer listener for anonymizing SQL queries through the new engine Signed-off-by: Matthew Wells <[email protected]> * Update for review comments Signed-off-by: Andrew Carbonetto <[email protected]> * added missing file header, change public variable to private Signed-off-by: Matthew Wells <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: Matthew Wells <[email protected]> Co-authored-by: Andrew Carbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* Support Alternate Datetime Formats (#268) * Add OpenSearchDateType as a datatype for matching with Date/Time OpenSearch types Signed-off-by: Andrew Carbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: GabeFernandez310 <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: MaxKsyunz <[email protected]> Co-authored-by: Andrew Carbonetto <[email protected]> Co-authored-by: GabeFernandez310 <[email protected]> Co-authored-by: MaxKsyunz <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
opensearch-project#1666) v2 SQL engine can now paginate simple queries. Pagination is initiated by setting fetch_size property in the request JSON. Pagination is implemented using the OpenSearch Scroll API. Please see pagination-v2.md for implementation details. --------- Signed-off-by: MaxKsyunz <[email protected]> Signed-off-by: Yury-Fridlyand <[email protected]> Signed-off-by: Max Ksyunz <[email protected]> Co-authored-by: Yury-Fridlyand <[email protected]> Co-authored-by: GabeFernandez310 <[email protected]> Co-authored-by: Andrew Carbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* Allow backtick around fields in sort cmd Signed-off-by: Joshua Li <[email protected]> * Add test Signed-off-by: Joshua Li <[email protected]> * Update test setup Signed-off-by: Joshua Li <[email protected]> * revert ignoring sql-cli repo if exists Signed-off-by: Joshua Li <[email protected]> --------- Signed-off-by: Joshua Li <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
Signed-off-by: Mitchell Gale <[email protected]>
…on (opensearch-project#1657) * Adding support for nested function used in predicate expression. Signed-off-by: forestmvey <[email protected]> * Add support for LIKE with nested query in predicate expression. Signed-off-by: forestmvey <[email protected]> --------- Signed-off-by: forestmvey <[email protected]>
opensearch-project#1666) v2 SQL engine can now paginate simple queries. Pagination is initiated by setting fetch_size property in the request JSON. Pagination is implemented using the OpenSearch Scroll API. Please see pagination-v2.md for implementation details. --------- Signed-off-by: MaxKsyunz <[email protected]> Signed-off-by: Yury-Fridlyand <[email protected]> Signed-off-by: Max Ksyunz <[email protected]> Co-authored-by: Yury-Fridlyand <[email protected]> Co-authored-by: GabeFernandez310 <[email protected]> Co-authored-by: Andrew Carbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
4bc72c6
to
630a715
Compare
Description
This stops any prometheus server before doctests and integ tests are run. Prometheus is stopped after a successful execution of the program, but when a failure occurs, it does not clean up prometheus.
Steps to reproduce error that is fixed.
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
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.