This commit is contained in:
Daniel A. Wozniak 2024-11-02 02:18:20 -07:00 committed by Daniel Wozniak
parent 454cb18435
commit db8b24eb53
2 changed files with 12 additions and 9 deletions

View file

@ -182,7 +182,6 @@ jobs:
SKIP_INITIAL_ONEDIR_FAILURES: "1"
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
SKIP_CODE_COVERAGE: "1"
PYTHONUTF8: "1"
OUTPUT_COLUMNS: "190"
GITHUB_ACTIONS_PIPELINE: "1"
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
@ -198,10 +197,12 @@ jobs:
PRINT_SYSTEM_INFO: "0"
RERUN_FAILURES: "1"
GITHUB_ACTIONS_PIPELINE: "1"
SKIP_INITIAL_ONEDIR_FAILURES: "1"
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
COVERAGE_CONTEXT: ${{ inputs.distro-slug }}
OUTPUT_COLUMNS: "190"
run: |
nox --force-color -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} \
env PYTHONUTF8=1 nox --force-color -f noxfile.py -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} \
${{ matrix.version && format('--prev-version={0}', matrix.version) || ''}}
- name: Prepare Test Run Artifacts

View file

@ -847,8 +847,9 @@ def pkg_matrix(
"relenv": f"salt/py3/{name}/{version}/{arch}/minor/",
}
s3 = boto3.client("s3")
paginator = s3.get_paginator("list_objects_v2")
# XXX: fetch versions
# s3 = boto3.client("s3")
# paginator = s3.get_paginator("list_objects_v2")
_matrix = [
{
"tests-chunk": "install",
@ -862,10 +863,10 @@ def pkg_matrix(
if backend == "relenv" and version >= tools.utils.Version("3006.5"):
prefix.replace("/arm64/", "/aarch64/")
# Using a paginator allows us to list recursively and avoid the item limit
page_iterator = paginator.paginate(
Bucket=f"salt-project-{tools.utils.SPB_ENVIRONMENT}-salt-artifacts-release",
Prefix=prefix,
)
# page_iterator = paginator.paginate(
# Bucket=f"salt-project-{tools.utils.SPB_ENVIRONMENT}-salt-artifacts-release",
# Prefix=prefix,
# )
# Uses a jmespath expression to test if the wanted version is in any of the filenames
key_filter = f"Contents[?contains(Key, '{version}')][]"
if pkg_type == "MSI":
@ -877,7 +878,8 @@ def pkg_matrix(
f"Contents[?contains(Key, '{version}')] | [?ends_with(Key, '.exe')]"
)
continue
objects = list(page_iterator.search(key_filter))
# objects = list(page_iterator.search(key_filter))
objects = []
# Testing using `any` because sometimes the paginator returns `[None]`
if any(objects):
ctx.info(