Commit 6dae487
authored
feat: Add USE_GCLOUD_STORAGE_RSYNC=1 to Cloud Batch Jobs (#5017)
### Descrição:
This PR enables the `USE_GCLOUD_STORAGE_RSYNC=1` environment variable
for all containers running as part of a Cloud Batch job. This change is
intended to improve the performance and reliability of GCS operations
within these jobs by enabling `gcloud storage rsync`.
#### Context
An investigation into the Cloud Batch infrastructure revealed that the
environment variables for containers are not set via `user-data` scripts
or instance templates. Instead, they are hardcoded in the `docker run`
options string that the ClusterFuzz application builds when creating a
Batch job.
The `user-data` field in `batch.yaml` files is ignored, and the GCE
instance templates defined in Terraform are only used for persistent
bots, not for ephemeral Batch VMs.
#### Changes
This PR makes a single, targeted change to correctly inject the
environment variable:
- **Modified `src/clusterfuzz/_internal/google_cloud_utils/batch.py`**:
- The `-e USE_GCLOUD_STORAGE_RSYNC=1` flag has been added to the
`runnable.container.options` string within the `_get_task_spec`
function.1 parent 1bf69bb commit 6dae487
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
0 commit comments