File tree 4 files changed +29
-17
lines changed
4 files changed +29
-17
lines changed Original file line number Diff line number Diff line change @@ -86,13 +86,14 @@ is invoked, as shown in the example below.
86
86
87
87
The scripts return with an exit code that depends on the outcome of running a given experiment.
88
88
89
- | Exit Code | Reason |
90
- | -----------| --------------------------------------------------------------------------------------------------------|
91
- | 0 | The experiment completed successfully |
92
- | 1 | An invalid input was provided while attempting to run the experiment |
93
- | 2 | One of the builds that is part of the experiment failed |
94
- | 3 | The build was not fully cacheable for the given task graph and ` --fail-if-not-fully-cacheable ` was set |
95
- | 100 | An unclassified, fatal error happened while running the experiment |
89
+ | Exit Code | Reason |
90
+ | -----------| --------------------------------------------------------------------------------------------------------------------------------|
91
+ | 0 | The experiment completed successfully |
92
+ | 1 | An invalid input was provided while attempting to run the experiment |
93
+ | 2 | One of the builds that is part of the experiment failed |
94
+ | 3 | Option ` --fail-if-not-fully-cacheable ` was set and the build was not fully cacheable for the given task graph |
95
+ | 4 | Option ` --fail-if-not-fully-cacheable ` was set and performance characteristics are unknown, e.g., due to a failed API response |
96
+ | 100 | An unclassified, fatal error happened while running the experiment |
96
97
97
98
## Verifying the setup
98
99
Original file line number Diff line number Diff line change @@ -84,13 +84,14 @@ is invoked, as shown in the example below.
84
84
85
85
The scripts return with an exit code that depends on the outcome of running a given experiment.
86
86
87
- | Exit Code | Reason |
88
- | -----------| ------------------------------------------------------------------------------------------------------------|
89
- | 0 | The experiment completed successfully |
90
- | 1 | An invalid input was provided while attempting to run the experiment |
91
- | 2 | One of the builds that is part of the experiment failed |
92
- | 3 | The build was not fully cacheable for the given execution plan and ` --fail-if-not-fully-cacheable ` was set |
93
- | 100 | An unclassified, fatal error happened while running the experiment |
87
+ | Exit Code | Reason |
88
+ | -----------| --------------------------------------------------------------------------------------------------------------------------------|
89
+ | 0 | The experiment completed successfully |
90
+ | 1 | An invalid input was provided while attempting to run the experiment |
91
+ | 2 | One of the builds that is part of the experiment failed |
92
+ | 3 | Option ` --fail-if-not-fully-cacheable ` was set and the build was not fully cacheable for the given execution plan |
93
+ | 4 | Option ` --fail-if-not-fully-cacheable ` was set and performance characteristics are unknown, e.g., due to a failed API response |
94
+ | 100 | An unclassified, fatal error happened while running the experiment |
94
95
95
96
## Verifying the setup
96
97
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ SUCCESS=0
4
4
INVALID_INPUT=1
5
5
BUILD_FAILED=2
6
6
BUILD_NOT_FULLY_CACHEABLE=3
7
+ PERFORMANCE_CHARACTERISTICS_UNKNOWN=4
7
8
UNEXPECTED_ERROR=100
8
9
9
- readonly SUCCESS INVALID_INPUT UNEXPECTED_ERROR BUILD_FAILED BUILD_NOT_FULLY_CACHEABLE
10
+ readonly SUCCESS INVALID_INPUT UNEXPECTED_ERROR BUILD_FAILED BUILD_NOT_FULLY_CACHEABLE PERFORMANCE_CHARACTERISTICS_UNKNOWN
10
11
11
12
# Overrides the die() function loaded from the argbash-generated parsing libs
12
13
die () {
@@ -25,11 +26,20 @@ exit_with_return_code() {
25
26
fi
26
27
27
28
if [[ " ${fail_if_not_fully_cacheable} " == " on" ]]; then
29
+ if [[ -z " ${executed_cacheable_num_tasks[1]} " ]]; then
30
+ print_bl
31
+ die " FAILURE: Unable to determine if build is fully cacheable: Performance characteristics are unknown and --fail-if-not-fully-cacheable was used." " ${PERFORMANCE_CHARACTERISTICS_UNKNOWN} "
32
+ fi
33
+
28
34
local executed_avoidable_tasks
29
35
executed_avoidable_tasks=$(( executed_cacheable_num_tasks[1 ] ))
30
36
if (( executed_avoidable_tasks > 0 )) ; then
31
37
print_bl
32
- die " FAILURE: Build is not fully cacheable for the given task graph." " ${BUILD_NOT_FULLY_CACHEABLE} "
38
+ if [[ " ${BUILD_TOOL} " == " Maven" ]]; then
39
+ die " FAILURE: Build is not fully cacheable for the given execution plan." " ${BUILD_NOT_FULLY_CACHEABLE} "
40
+ else
41
+ die " FAILURE: Build is not fully cacheable for the given task graph." " ${BUILD_NOT_FULLY_CACHEABLE} "
42
+ fi
33
43
fi
34
44
fi
35
45
exit " ${SUCCESS} "
Original file line number Diff line number Diff line change 1
1
> [ !IMPORTANT]
2
2
> The distributions of the Develocity Build Validation Scripts prefixed with ` gradle-enterprise ` are deprecated and will be removed in a future release. Migrate to the distributions prefixed with ` develocity ` instead.
3
3
4
- - [ NEW ] TBD
4
+ - [ FIX ] Successful exit code returned when performance characteristics are unknown and ` --fail-if-not-fully-cacheable ` is used
You can’t perform that action at this time.
0 commit comments