Skip to content

Predictive Test Selection is disabled when running builds #524

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

Merged
merged 4 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ execute_build() {
}

print_gradle_command() {
info "./gradlew --no-build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} $*$(print_extra_args)"
info "./gradlew --no-build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false $*$(print_extra_args)"
}

fetch_build_cache_metrics() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ execute_build() {
}

print_gradle_command() {
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
}

fetch_build_cache_metrics() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ execute_build() {
}

print_gradle_command() {
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
}

fetch_build_cache_metrics() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ Make sure the CI configuration uses the proper branch and performs a fresh
checkout to avoid any build artifacts lingering around from a previous build
that could influence the experiment.

Also, make sure the CI configuration builds the project with Predictive Test
Selection (PTS) disabled, as test results will not be stored in the build cache
when only a subset of tests are selected for execution. PTS can be globally
disabled using the '-Dpts.enabled=false' system property.

Once the build completes, make a note of the commit id that was used, and enter
the URL of the build scan produced by the build.
EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ execute_build() {
args+=(clean ${tasks})

info "Running build:"
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"

invoke_gradle 1 "${args[@]}"
}
Expand Down Expand Up @@ -284,6 +284,11 @@ Make sure the CI configuration uses the proper branch and performs a fresh
checkout to avoid any build artifacts lingering around from a previous build
that could influence the experiment.

Also, make sure the CI configuration builds the project with Predictive Test
Selection (PTS) disabled, as test results will not be stored in the build cache
when only a subset of tests are selected for execution. PTS can be globally
disabled using the '-Dpts.enabled=false' system property.

Once the build completes, make a note of the commit id that was used, and enter
the URL of the build scan produced by the build.
EOF
Expand Down
1 change: 1 addition & 0 deletions components/scripts/lib/gradle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ invoke_gradle() {
-Dcom.gradle.enterprise.build-validation.runNum="${run_num}"
-Dcom.gradle.enterprise.build-validation.scriptsVersion="${SCRIPT_VERSION}"
-Dscan.capture-task-input-files=true
-Dpts.enabled=false
)

# https://stackoverflow.com/a/31485948
Expand Down
1 change: 1 addition & 0 deletions components/scripts/lib/maven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ invoke_maven() {
-Dcom.gradle.enterprise.build-validation.runNum="${run_num}"
-Dcom.gradle.enterprise.build-validation.scriptsVersion="${SCRIPT_VERSION}"
-Dgradle.scan.captureGoalInputFiles=true
-Dpts.enabled=false
)

# https://stackoverflow.com/a/31485948
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ execute_build() {
}

print_maven_command() {
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
}

fetch_build_cache_metrics() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ execute_build() {
}

print_maven_command() {
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
}

fetch_build_cache_metrics() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ Make sure the CI configuration uses the proper branch and performs a fresh
checkout to avoid any build artifacts lingering around from a previous build
that could influence the experiment.

Also, make sure the CI configuration builds the project with Predictive Test
Selection (PTS) disabled, as test results will not be stored in the build cache
when only a subset of tests are selected for execution. PTS can be globally
disabled using the '-Dpts.enabled=false' system property.

Once the build completes, make a note of the commit id that was used, and enter
the URL of the build scan produced by the build.
EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ execute_build() {
args+=(clean ${tasks})

info "Running build:"
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"

# shellcheck disable=SC2086 # we want tasks to expand with word splitting in this case
invoke_maven 1 "${args[@]}"
Expand Down Expand Up @@ -284,6 +284,11 @@ Make sure the CI configuration uses the proper branch and performs a fresh
checkout to avoid any build artifacts lingering around from a previous build
that could influence the experiment.

Also, make sure the CI configuration builds the project with Predictive Test
Selection (PTS) disabled, as test results will not be stored in the build cache
when only a subset of tests are selected for execution. PTS can be globally
disabled using the '-Dpts.enabled=false' system property.

Once the build completes, make a note of the commit id that was used, and enter
the URL of the build scan produced by the build.
EOF
Expand Down
2 changes: 1 addition & 1 deletion release/changes.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- [NEW] TBD
- [NEW] Predictive Test Selection is disabled when running builds