diff --git a/releng/.gitignore b/releng/.gitignore new file mode 100644 index 000000000..8d033f940 --- /dev/null +++ b/releng/.gitignore @@ -0,0 +1,2 @@ +# Created by `python -m releng tag` +/prev-git-branch.txt diff --git a/releng/create_release.xsh b/releng/create_release.xsh index 0091a6728..41fc84c19 100644 --- a/releng/create_release.xsh +++ b/releng/create_release.xsh @@ -32,9 +32,6 @@ RELENG_MSG = "Release created with releng/create_release.xsh" BUILD_CORES = 16 MAX_JOBS = 2 -# Workaround for bug in garage: https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/963 -S3_ARGS = ['--checksum-algorithm=SHA256'] - def setup_creds(env: RelengEnvironment): key = keys.get_ephemeral_key(env) @@ -240,7 +237,20 @@ def upload_artifacts(env: RelengEnvironment, noconfirm=False, no_check_git=False docker.upload_docker_images(target, docker_images) print('[+] Upload to release bucket') - aws s3 cp @(S3_ARGS) --recursive @(ARTIFACTS)/ @(env.releases_bucket)/ + + # There may or may not be a bug in `garage` here. Previously we added + # `--checksum-algorithm=SHA256` here to fix it, but when @9999years was + # running the release for 2.93.0, she found it actually made the S3 uploads + # fail. + # + # If this command is failing, here are some links to investigate. + # + # See: https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/963 + # See: https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/1017 + # See: https://github.com/boto/boto3/issues/4392 + # See: https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-envvars.html#envvars-list-AWS_REQUEST_CHECKSUM_CALCULATION + aws s3 cp --recursive @(ARTIFACTS)/ @(env.releases_bucket)/ + print('[+] Upload manual') upload_manual(env) @@ -287,9 +297,9 @@ def upload_manual(env: RelengEnvironment): version = 'nightly' print('[+] aws s3 sync manual') - aws s3 sync @(S3_ARGS) --delete @(MANUAL)/ @(env.docs_bucket)/manual/lix/@(version)/ + aws s3 sync --delete @(MANUAL)/ @(env.docs_bucket)/manual/lix/@(version)/ if OFFICIAL_RELEASE: - aws s3 sync @(S3_ARGS) --delete @(MANUAL)/ @(env.docs_bucket)/manual/lix/stable/ + aws s3 sync --delete @(MANUAL)/ @(env.docs_bucket)/manual/lix/stable/ def build_artifacts(build_profile, no_check_git=False): diff --git a/releng/docker_assemble.py b/releng/docker_assemble.py index d5b47c328..21754336b 100644 --- a/releng/docker_assemble.py +++ b/releng/docker_assemble.py @@ -248,7 +248,8 @@ class AuthState: with path.open() as fh: try: json_obj = json.load(fh) - return {k: v['auth'] for k, v in json_obj['auths'].items()} + auths = json_obj.get('auths', {}) + return {k: v['auth'] for k, v in auths.items()} except (json.JSONDecodeError, KeyError) as e: log.exception('JSON decode error in %s', path, exc_info=e) return {} diff --git a/releng/local/default.nix b/releng/local/default.nix index 64c617a57..48d710dd2 100644 --- a/releng/local/default.nix +++ b/releng/local/default.nix @@ -1,8 +1,6 @@ { self, system, - lib, - config, pkgs, ... }: