Bug 1764711: Move boto3 to requirement file r=ahal

The `upload_geneated_sources.py` script needs `boto3`, but was:
* Running in CI with Mach having a site-packages-source of `None`
* Using the `common` site (which inherits Mach's site-packages-source)
* Installing `boto3` outside of the knowledge of the centralized
  dependency system.

Make a `upload-generated-sources` site, and move `boto3` to it.

Differential Revision: https://phabricator.services.mozilla.com/D143715
This commit is contained in:
Mitchell Hentges 2022-04-14 18:00:30 +00:00
parent eeeed6c37f
commit 97b39cb317
3 changed files with 2 additions and 6 deletions

View File

@ -10,7 +10,6 @@ from contextlib import contextmanager
import gzip
import io
import logging
from mozbuild.base import MozbuildObject
from mozbuild.generated_sources import (
get_filename_with_digest,
get_s3_region_and_bucket,
@ -161,10 +160,6 @@ def main(argv):
args = parser.parse_args(argv)
region, bucket = get_s3_region_and_bucket()
config = MozbuildObject.from_environment()
config.activate_virtualenv()
config.virtualenv_manager.install_pip_package("boto3==1.4.4")
with timed() as elapsed:
do_work(region=region, bucket=bucket, artifact=args.artifact)
log.info("Finished in {:.03f}s".format(elapsed()))

View File

@ -0,0 +1 @@
pypi:boto3==1.4.4

View File

@ -32,7 +32,7 @@ job-template:
max-run-time: 600
run:
using: mach
mach: {artifact-reference: "python build/upload_generated_sources.py <build/public/build/target.generated-files.tar.gz>"}
mach: {artifact-reference: "python --virtualenv upload-generated-sources build/upload_generated_sources.py <build/public/build/target.generated-files.tar.gz>"}
sparse-profile: upload-generated-sources
scopes:
- secrets:get:project/releng/gecko/build/level-{level}/gecko-generated-sources-upload