From 84822ce7ec839b91ffc8f99edb7a2fa775972e88 Mon Sep 17 00:00:00 2001 From: Dave Evans Date: Mon, 26 Jan 2026 17:42:54 +0000 Subject: [PATCH 1/2] fix: Bump `pipeline` version --- requirements.prod.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.prod.in b/requirements.prod.in index 176d15f4..18117b7b 100644 --- a/requirements.prod.in +++ b/requirements.prod.in @@ -1,4 +1,4 @@ -opensafely-pipeline@https://github.com/opensafely-core/pipeline/archive/refs/tags/v2025.03.06.161237.zip +opensafely-pipeline@https://github.com/opensafely-core/pipeline/archive/refs/tags/v2026.01.26.163426.zip ruyaml requests opentelemetry-api==1.33.1 From 1529a452cd0adadf8d59bcb9ec19b464872bad65 Mon Sep 17 00:00:00 2001 From: Dave Evans Date: Mon, 26 Jan 2026 17:44:11 +0000 Subject: [PATCH 2/2] Update vendored requirements This involved running: pip-compile --output-file=requirements.prod.txt requirements.prod.in ./scripts/update.sh --- opensafely/_vendor/pipeline/validation.py | 16 +++++++++++++++- ...ip.LICENSE => v2026.01.26.163426.zip.LICENSE} | 0 requirements.prod.txt | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) rename opensafely/_vendor/{v2025.03.06.161237.zip.LICENSE => v2026.01.26.163426.zip.LICENSE} (100%) diff --git a/opensafely/_vendor/pipeline/validation.py b/opensafely/_vendor/pipeline/validation.py index 14567e77..a630f0b6 100644 --- a/opensafely/_vendor/pipeline/validation.py +++ b/opensafely/_vendor/pipeline/validation.py @@ -154,7 +154,13 @@ def validate_ehrql_outputs(action_id: str, action: Action) -> None: output_patterns = (action.outputs.highly_sensitive or {}).values() if not output_patterns_match_spec(output_spec, list(output_patterns)): - raise ValidationError("--output in run command and outputs must match") + expected = expected_pattern_for_spec(output_spec) + formatted_patterns = " \n".join(output_patterns) + raise ValidationError( + f"output specification must match the `--output` argument in the `run` command\n" + f" got: {formatted_patterns}\n" + f"but was expecting: {expected}" + ) def get_output_spec_from_args(args: list[str]) -> str | None: @@ -176,6 +182,14 @@ def output_patterns_match_spec(spec: str, patterns: list[str]) -> bool: return spec in patterns +def expected_pattern_for_spec(spec: str) -> str: + directory, extension = split_directory_and_extension(PurePosixPath(spec)) + if extension: + return f"{directory}/:{extension[1:]}" + else: + return spec + + # Borrowed directly from ehrQL: # https://github.com/opensafely-core/ehrql/blob/e511dca176d0/ehrql/file_formats/main.py#L153-L166 def split_directory_and_extension(filename: PurePath) -> tuple[PurePath, str]: diff --git a/opensafely/_vendor/v2025.03.06.161237.zip.LICENSE b/opensafely/_vendor/v2026.01.26.163426.zip.LICENSE similarity index 100% rename from opensafely/_vendor/v2025.03.06.161237.zip.LICENSE rename to opensafely/_vendor/v2026.01.26.163426.zip.LICENSE diff --git a/requirements.prod.txt b/requirements.prod.txt index 449cf5f5..d388556e 100644 --- a/requirements.prod.txt +++ b/requirements.prod.txt @@ -16,7 +16,7 @@ idna==3.10 # via requests importlib-metadata==8.5.0 # via opentelemetry-api -opensafely-pipeline @ https://github.com/opensafely-core/pipeline/archive/refs/tags/v2025.03.06.161237.zip +opensafely-pipeline @ https://github.com/opensafely-core/pipeline/archive/refs/tags/v2026.01.26.163426.zip # via -r requirements.prod.in opentelemetry-api==1.33.1 # via -r requirements.prod.in