-
Notifications
You must be signed in to change notification settings - Fork 282
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
Clean up -x task exclusions in ci.yml #2913
Comments
Right now code in #2861 have one task exclusion: - name: Build and Test
uses: gradle/gradle-build-action@v2
with:
arguments: |
${{ matrix.gradle_task }} -Dbuild.snapshot=false
-x test JaCoCo plugin does not force anything. We need to exclude "test" task because we want to generate coverage report, which is done by "jacocoTestReport" task, which task has circular dependency on "test" task (If you start "test" it always starts "jacocoTestReport" in the end AND if you start "jacocoTestReport" it begins from "test") That's why our every test is also trigerring "test" task. Dependency between "test" and "JacocoTestReport" was introduced in commit Simplest fix is to remove this line: |
I've removed unnecessary exclusions from "integration-tests" job in commit e48b74 which means that only exclusion in |
👍 has my blessing |
Closes issue opensearch-project#2913. This will allow us to not to exclude the "test" job from every other test. Unfortunately, this will break creating the coverage reports from only starting "jacocoTestReport" task in Gradle.
Closes issue opensearch-project#2913. This will allow us to not to exclude the "test" job from every other test. Unfortunately, this will break creating the coverage reports from only starting "jacocoTestReport" task in Gradle. Signed-off-by: Pawel Gudel <[email protected]>
[Triage] Thank you @nibix for filing this issue. Seems like removing the jacoco line is the preferred option for the time being. Marking this issue as help wanted and good first issue. |
…t" (#2935) As a part of discussions in #2861 there's been determined that CI workflow in Github Actions is excluding a lot of unnecessary task. @nibix created #2913 to address this problem. Most of the unneeded tasks has been already removed in #2861. This PR removes last existing part. @peternied's confirmed removal of dependency in his [comment](#2913 (comment)). This change removes the dependency between "_jacocoTestReport_" and "_test_" tasks. Specifically the dependency that forces to start "_test_" task always when "_jacocoTestReport_" is called. This allows us to always generate coverage report in the end of every task run in "CI" workflow without having to exclude "_test_" task in every single one of them. Unfortunately this will break functionality to create code coverage by starting only "_jacocoTestReport_" task. It looks like this was not used widely and was certainly not used in any of Github Actions Workflows. This will not break creating coverage reports in the end of "_test_" task. Signed-off-by: Pawel Gudel <[email protected]>
Closing after #2935 merged. |
At the moment, ci.yml contains many gradle task invocations with long exclusion lists like this:
This is because the jacoco plugin enforces explicit incoming dependencies from all test tasks. This will however also cause the execution of these "through the backdoor" if only a single test task is supposed to be executed.
It would be nice if a solution could be found to avoid that.
See also the conversation in this PR: #2861 (comment)
The text was updated successfully, but these errors were encountered: