Merge changes Id732c31a,I022583e9,I2f08bd2f,I85090f4c into main

* changes:
  aws s3 cp: Note issue with `--checksum-algorithm=SHA256`
  releng/docker_assemble.py: fix empty `auths` error
  releng: remove unused variables
  releng: ignore `prev-git-branch.txt`
This commit is contained in:
rebecca “wiggles” turner
2025-05-14 19:15:53 +00:00
committed by Lix Systems Gerrit
4 changed files with 20 additions and 9 deletions
+2
View File
@@ -0,0 +1,2 @@
# Created by `python -m releng tag`
/prev-git-branch.txt
+16 -6
View File
@@ -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):
+2 -1
View File
@@ -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 {}
-2
View File
@@ -1,8 +1,6 @@
{
self,
system,
lib,
config,
pkgs,
...
}: