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

MAINT: refactoring existing e2e tests on trace data ingestion #512

Merged
merged 9 commits into from
Nov 3, 2021

Conversation

chenqi0805
Copy link
Collaborator

@chenqi0805 chenqi0805 commented Nov 2, 2021

Description

This PR

(1) refactored the existing trace e2e tests out from data-prepper-core to the new e2e module
(2) updated github workflow on e2e

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc 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.

@chenqi0805
Copy link
Collaborator Author

Note: I see some flaky CI failure with OpenSearchSink integTest which is not touched by this PR.

e2e/build.gradle Outdated
}

ext {
data_prepper_jar_filepath = "build/bin/${DATA_PREPPER_CORE_JAR.archiveName}"
Copy link
Member

Choose a reason for hiding this comment

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

We use Groovy for Gradle build files and should follow the correct coding standards. This should be camelCase: dataPrepperJarFilepath.

Also, this value should be scoped correctly. I'm guessing this should be the root project. In which case it should look more like "${project.rootProject.buildDir}/bin/${DATA_PREPPER_CORE_JAR.archiveName}".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually it should be the scope of qa-test project, I will replace it with project(':qa-test').buildDir

Copy link
Member

Choose a reason for hiding this comment

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

Instead of that, please use ${project.buildDir} which will use the current project.

e2e/build.gradle Outdated
integrationTestRuntime.extendsFrom testRuntime
}

def DATA_PREPPER_CORE_JAR = project(':data-prepper-core').jar
Copy link
Member

Choose a reason for hiding this comment

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

I try to avoid defs in Gradle builds. Is there a way to clean this up?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it is not bad practice since it appeared in docs: https://docs.gradle.org/current/userguide/more_about_tasks.html

Copy link
Member

Choose a reason for hiding this comment

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

I don't think it is bad practice, but I do try to avoid them when possible. But, if there isn't a better way, that is fine too.

Also, this isn't a constant, so it should probably also be camelCase: dataPrepperCoreJar.

settings.gradle Outdated
@@ -38,4 +38,6 @@ include 'data-prepper-plugins:blocking-buffer'
include 'data-prepper-plugins:http-source'
include 'data-prepper-plugins:grok-prepper'
include 'data-prepper-logstash-configuration'
include 'e2e'
Copy link
Member

Choose a reason for hiding this comment

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

I want to raise the question of what name to use here. This uses e2e, but there may be some other options: e2e-test, qa, qa-test, test.

I don't like the name test since it is ambiguous with the other test tasks. I do think I like the idea of a clearer name like e2e-test or qa-test since e2e may not be an immediately obvious convention.

Also, the core OpenSearch project uses qa for its end-to-end tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dlvenable I also went back and forth between qa and e2e. I think qa-test looks good to me.

Copy link
Member

Choose a reason for hiding this comment

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

@cmanning09 @graytaylor0 , Any thoughts on the name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually e2e-test might be better since e2e is already populated in the repo 😄

@chenqi0805 chenqi0805 requested a review from dlvenable November 2, 2021 22:12
@dlvenable
Copy link
Member

Thanks for making this change. This is a very nice improvement to the project structure!

@chenqi0805 chenqi0805 merged commit c4e2d71 into opensearch-project:main Nov 3, 2021
@chenqi0805 chenqi0805 deleted the ref/e2e-tests branch November 3, 2021 01:28
graytaylor0 referenced this pull request in graytaylor0/data-prepper Nov 5, 2021
…512)

* REF: refactoring existing trace e2e tests

Signed-off-by: qchea <[email protected]>

* MAINT: github workflow

Signed-off-by: qchea <[email protected]>

* ADD: README

Signed-off-by: qchea <[email protected]>

* FIX: spotless

Signed-off-by: qchea <[email protected]>

* STY: spotless for markdown

Signed-off-by: qchea <[email protected]>

* MAINT: address PR comments

Signed-off-by: qchea <[email protected]>

* MAINT: directory name

Signed-off-by: qchea <[email protected]>

* MAINT: build directory reference

Signed-off-by: qchea <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants