Skip to content

fix: stop silent dgoss/build workflow failures on version filters#612

Merged
ianpittwood merged 4 commits into
mainfrom
fix/silent-dgoss-workflow-failures
Jun 15, 2026
Merged

fix: stop silent dgoss/build workflow failures on version filters#612
ianpittwood merged 4 commits into
mainfrom
fix/silent-dgoss-workflow-failures

Conversation

@ianpittwood

@ianpittwood ianpittwood commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #611

Summary

CI workflows were silently passing during bakery dgoss run while testing nothing, accompanied by warnings like:

WARNING  Unparseable version string: '2026\.01\.2\+418\.pro1'   parsed_version.py:84

This PR fixes the root cause and adds a guard so the failure can never be silent again.

Root cause

Commit 50575feb migrated version filtering from re.search() (which needed re.escape() on the filter) to segment-aware version_matches(), and updated the CLI call sites — but missed the dgoss, hadolint, and wizcli plugins. They still called re.escape(image_version), mangling 2026.01.2+418.pro1 into 2026\.01\.2\+418\.pro1. That failed to parse and failed the fallback comparison → zero targets matched → dgoss run tested nothing and exited 0.

Changes

  • Remove re.escape() from the image_version filter in the dgoss, hadolint, and wizcli plugins (and the now-unused import re), matching how the CLI commands already pass it through verbatim.
  • Add a shared exit_if_no_targets() guard (cli/common.py) that aborts with a non-zero exit code, echoing the active filters, when filters resolve to zero image targets. Wired into build, dgoss run (+ deprecated run dgoss), hadolint run, and wizcli scan.

Testing

  • New regression test asserting --image-version reaches the filter unescaped.
  • New zero-match guard tests for every affected command (exit 1, helpful message, execute/build never called).
  • All affected suites pass with -n auto; ruff clean; verified end-to-end against the basic resource context.

🤖 Generated with Claude Code

ianpittwood and others added 2 commits June 15, 2026 10:24
Add a shared exit_if_no_targets() guard that aborts with a non-zero
exit code when the active filters resolve to zero image targets. A
build or tool run that matches nothing was previously exiting 0,
letting broken CI jobs pass while building/testing nothing — the same
silent failure that the re.escape image-version bug surfaced.

Wire the guard into build, dgoss run (and the deprecated run dgoss
alias), hadolint run, and wizcli scan, right after target generation.
The error echoes the active filters back to aid debugging.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ianpittwood ianpittwood requested a review from bschwedler as a code owner June 15, 2026 16:39
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Test Results

1 877 tests   1 877 ✅  8m 10s ⏱️
    1 suites      0 💤
    1 files        0 ❌

Results for commit b13aecf.

♻️ This comment has been updated with latest results.

These dgoss run and run dgoss happy-path fixtures used empty target
lists, which the new zero-match guard now correctly rejects with a
non-zero exit. Set non-empty targets so they exercise the success path
again.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ianpittwood ianpittwood merged commit 0f9fd41 into main Jun 15, 2026
24 checks passed
@ianpittwood ianpittwood deleted the fix/silent-dgoss-workflow-failures branch June 15, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bakery dgoss run silently fails in all workflows

1 participant