-
Notifications
You must be signed in to change notification settings - Fork 210
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
TST: trace event migration backward compatibility e2e tests #1264
TST: trace event migration backward compatibility e2e tests #1264
Conversation
Signed-off-by: Qi Chen <[email protected]>
Signed-off-by: Qi Chen <[email protected]>
Signed-off-by: Qi Chen <[email protected]>
Signed-off-by: Qi Chen <[email protected]>
Signed-off-by: Qi Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1264 +/- ##
=========================================
Coverage 94.08% 94.08%
Complexity 1156 1156
=========================================
Files 162 162
Lines 3248 3248
Branches 263 263
=========================================
Hits 3056 3056
Misses 138 138
Partials 54 54 Continue to review full report at Codecov.
|
@@ -24,5 +24,8 @@ jobs: | |||
java-version: ${{ matrix.java }} | |||
- name: Checkout Data-Prepper | |||
uses: actions/checkout@v2 | |||
- name: Run raw-span compatibility end-to-end tests with Gradle | |||
run: ./gradlew :e2e-test:trace:rawSpanCompatibilityEndToEndTest |
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 propose that we keep the rawSpanCompatibilityEndToEndTest
. It can just be a task which depends on the other two tests.
This approach allows for developers to have few test commands to run locally.
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.
So the current rawSpanCompatibilityEndToEndTest is renamed as rawSpanOTLPLatestReleaseCompatibilityEndToEndTest. I only added a similar test with event type named rawSpanEventLatestReleaseCompatibilityEndToEndTest. Can you specify what two other tests this should depend on?
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.
You have renamed rawSpanCompatibilityEndToEndTest
to rawSpanOTLPLatestReleaseCompatibilityEndToEndTest
. So keep that.
But, you can also add a task named rawSpanCompatibilityEndToEndTest
. Just make it depend on rawSpanOTLPLatestReleaseCompatibilityEndToEndTest
and rawSpanEventLatestReleaseCompatibilityEndToEndTest
.
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.
Tried the following:
task rawSpanEndToEndTest(type: Test) {
dependsOn rawSpanOTLPEndToEndTest
dependsOn rawSpanOTLPAndEventEndToEndTest
rawSpanOTLPEndToEndTest.doLast {
sleep(10 * 1000)
}
rawSpanOTLPAndEventEndToEndTest.mustRunAfter(rawSpanOTLPEndToEndTest)
}
but unfortunately the container conflict between the two tasks remains:
Status 409: {"message":"Conflict. The container name \"/dataprepper2\" is already in use by container \"d3f18cb07a9ef6625aa830db8dbaf27f85029d5ae7a23967162bec7a3b2c6154\". You have to remove (or rename) that container to be able to reuse that name."}
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.
OK - it appears it isn't quite so easy due to using Docker. Maybe we can improve this later.
name: "entry-pipeline" | ||
processor: | ||
- otel_trace_raw: | ||
root_span_flush_delay: 1 # TODO: remove after 1.1 release |
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.
Apparently this was never removed after the 1.1 release. Maybe we should remove it now.
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.
Thanks for the catch!
@@ -1,15 +1,20 @@ | |||
/* | |||
* Copyright OpenSearch Contributors | |||
* SPDX-License-Identifier: Apache-2.0 | |||
* SPDX-License-Identifier: Apache-2.0 |
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.
Please use the shorter license file.
Unless you copied this code from another project, the shorter license file is the correct one.
name: "entry-pipeline" | ||
processor: | ||
- otel_trace_raw: | ||
root_span_flush_delay: 1 # TODO: remove after 1.1 release |
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.
This comment is out-dated. Can we delete it?
// Wait for data to flow through pipeline and be indexed by ES | ||
await().atMost(10, TimeUnit.SECONDS).untilAsserted( | ||
await().atLeast(6, TimeUnit.SECONDS).atMost(20, TimeUnit.SECONDS).untilAsserted( |
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.
Why do we need to increase the time out to 20 seconds?
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.
This is just add some cushion for async assertion due to removal of L116:
Thread.sleep(6000);
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. |
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.
This license header is out of date. Please keep the original header:
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
e2e-test/trace/build.gradle
Outdated
def createServiceMapDataPrepperOTLP2Task = createDataPrepperDockerContainer( | ||
"serviceMapDataPrepper2", "dataprepper2", 21891, 4901, "/app/${SERVICE_MAP_PIPELINE_YAML}") | ||
|
||
// TODO: replace with Event type in 2.0 |
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.
Let's provide a link to a Github issue and include a reference to this work in that issue. This way we can easily track the work required when we pick it up.
// wait for data-preppers to be ready | ||
doFirst { | ||
sleep(10*1000) | ||
def createEndToEndTest(final String testName, final String includeTestsMatchPattern, |
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.
Nice work removing the repetitive code blocks.
Signed-off-by: Qi Chen <[email protected]>
…lity-e2e-tests Signed-off-by: Qi Chen <[email protected]>
Description
This PR
Issues Resolved
Resolves #1158
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.