Repository: google/clusterfuzz

Issue:
upgrade process fails due to upload of clusterfuzz-source.manifest file
So I tired to deploy the latest version for 2.5.7 and I kept getting this error that it could not upload the clusterfuzz-source.manifest file.  The command look like this.

gsutil cp -a public-read src/appengine/resources/clusterfuzz-source.manifest gs://deployment.clusterfuzz9-dev.appspot.com/clusterfuzz-source.manifest.3

which generated the following error.

BadRequestException: 400 Cannot insert legacy ACL for an object when uniform bucket-level access is enabled. 

I fixed this by removing the "-a public-read" from the python script in the following file.

clusterfuzz/src/local/butler/deploy.py

After removing that -a ACL setting in the butler deploy script that seem to fix this issue and was able to update my clusterfuzz instance.  So we have all our GCS buckets with uniform ACL access.  Is this setup changed since i first deployed this clusterfuzz?  Does the manifest file need to be a public-read ACL?  Is it a problem that that file is not publicly viewable?  Honestly I would prefer not to set any of the buckets with non-uniform ACL and especially not expose any buckets or objects to be publicly viewable.





Discussion:
We haven't changed this in years, so it's likely a newly introduced restriction in GCS or your org policies. 

Removing `-a public-read` should be safe to do here. I'll upload a PR.

Resolving patch:
diff --git a/src/local/butler/deploy.py b/src/local/butler/deploy.py
--- a/src/local/butler/deploy.py
+++ b/src/local/butler/deploy.py
@@ -225,7 +225,7 @@ def _deploy_manifest(bucket_name, manifest_path):
   else:
     manifest_suffix = ''
 
-  common.execute('gsutil cp -a public-read %s '
+  common.execute('gsutil cp %s '
                  'gs://%s/clusterfuzz-source.manifest%s' %
                  (manifest_path, bucket_name, manifest_suffix))
 


Test patch:
diff --git a/src/clusterfuzz/_internal/tests/core/local/butler/deploy_test.py b/src/clusterfuzz/_internal/tests/core/local/butler/deploy_test.py
--- a/src/clusterfuzz/_internal/tests/core/local/butler/deploy_test.py
+++ b/src/clusterfuzz/_internal/tests/core/local/butler/deploy_test.py
@@ -184,7 +184,7 @@ def test_app(self):
                   'mac.zip'),
         mock.call('gsutil cp /linux.zip gs://test-deployment-bucket/'
                   'linux.zip'),
-        mock.call('gsutil cp -a public-read src/appengine/resources/'
+        mock.call('gsutil cp src/appengine/resources/'
                   'clusterfuzz-source.manifest '
                   'gs://test-deployment-bucket/' + self.manifest_target),
         mock.call('python butler.py run setup --config-dir /config_dir '
@@ -266,7 +266,7 @@ def test_app_retry(self):
                   'mac.zip'),
         mock.call('gsutil cp /linux.zip gs://test-deployment-bucket/'
                   'linux.zip'),
-        mock.call('gsutil cp -a public-read src/appengine/resources/'
+        mock.call('gsutil cp src/appengine/resources/'
                   'clusterfuzz-source.manifest '
                   'gs://test-deployment-bucket/' + self.manifest_target),
         mock.call('python butler.py run setup --config-dir /config_dir '