From df7f9d64b2ad8a135c27bdeb150b2540e6362882 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:42:10 +0000 Subject: [PATCH 1/2] build(deps): bump theupdateframework/tuf-conformance Bumps the action-dependencies group with 1 update: [theupdateframework/tuf-conformance](https://github.com/theupdateframework/tuf-conformance). Updates `theupdateframework/tuf-conformance` from 2.2.0 to 2.3.0 - [Release notes](https://github.com/theupdateframework/tuf-conformance/releases) - [Commits](https://github.com/theupdateframework/tuf-conformance/compare/dee4e23533d7a12a6394d96b59b3ea0aa940f9bf...9bfc222a371e30ad5511eb17449f68f855fb9d8f) --- updated-dependencies: - dependency-name: theupdateframework/tuf-conformance dependency-type: direct:production update-type: version-update:semver-minor dependency-group: action-dependencies ... Signed-off-by: dependabot[bot] --- .github/workflows/conformance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index a634b02d9f..f8453d66c7 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -17,6 +17,6 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Run test suite - uses: theupdateframework/tuf-conformance@dee4e23533d7a12a6394d96b59b3ea0aa940f9bf # v2.2.0 + uses: theupdateframework/tuf-conformance@9bfc222a371e30ad5511eb17449f68f855fb9d8f # v2.3.0 with: entrypoint: ".github/scripts/conformance-client.py" From 02601f58c4edb3ae118d4a1aa2d3a100b90482b1 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Mon, 17 Feb 2025 15:45:52 +0200 Subject: [PATCH 2/2] workflows: Update conformance client * client was not checking if artifact was cached already: do so to pass test_artifact_cache * Also add some better logging These changes are copied from the client embedded in tuf-conformance Signed-off-by: Jussi Kukkonen --- .github/scripts/conformance-client.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/scripts/conformance-client.py b/.github/scripts/conformance-client.py index bc9054fafc..34ed29156d 100755 --- a/.github/scripts/conformance-client.py +++ b/.github/scripts/conformance-client.py @@ -5,6 +5,7 @@ # SPDX-License-Identifier: MIT OR Apache-2.0 import argparse +import logging import os import shutil import sys @@ -49,7 +50,8 @@ def download_target( target_info = updater.get_targetinfo(target_name) if not target_info: raise RuntimeError(f"{target_name} not found in repository") - updater.download_target(target_info) + if not updater.find_cached_target(target_info): + updater.download_target(target_info) def main() -> int: @@ -61,6 +63,7 @@ def main() -> int: parser.add_argument("--target-name", required=False) parser.add_argument("--target-dir", required=False) parser.add_argument("--target-base-url", required=False) + parser.add_argument("-v", "--verbose", action="count", default=0) sub_command = parser.add_subparsers(dest="sub_command") init_parser = sub_command.add_parser( @@ -81,6 +84,15 @@ def main() -> int: command_args = parser.parse_args() + if command_args.verbose <= 1: + loglevel = logging.WARNING + elif command_args.verbose == 2: + loglevel = logging.INFO + else: + loglevel = logging.DEBUG + + logging.basicConfig(level=loglevel) + # initialize the TUF Client Example infrastructure if command_args.sub_command == "init": init(command_args.metadata_dir, command_args.trusted_root)