Skip to content

Commit 549bdb6

Browse files
Don't set the HOST_JOB_SELECTION env var to a 404 error page (#4690)
#4663 was not widely deployed but it stops fuzzing wherever HOST_JOB_SELECTION isn't set. That's because it gets set to a 404 HTML page if unset. This in turn interferes with job selection.
1 parent 38e4f10 commit 549bdb6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docker/base/setup_clusterfuzz.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ if [ -z "$DEPLOYMENT_BUCKET" ]; then
1919
fi
2020

2121
if [ -z "$HOST_JOB_SELECTION" ]; then
22-
# Get list of jobs to focus on from instance metadata, if any.
23-
export HOST_JOB_SELECTION=$(curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/attributes/host-job-selection || true)
22+
HOST_JOB_SELECTION=$(curl -sf -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/attributes/host-job-selection)
23+
# Don't set the env var to a 404 error page.
24+
if [ $? -eq 0 ]; then
25+
export HOST_JOB_SELECTION
26+
else
27+
unset HOST_JOB_SELECTION
28+
fi
2429
fi
2530

2631
CLUSTERFUZZ_FILE=clusterfuzz_package.zip

0 commit comments

Comments
 (0)