Skip to content

Convert duplicate-keyed asserts blocks to list form (passing subset)#1275

Merged
mvdbeek merged 1 commit into
galaxyproject:mainfrom
jmchilton:convert-asserts-list-form-passing
Jul 13, 2026
Merged

Convert duplicate-keyed asserts blocks to list form (passing subset)#1275
mvdbeek merged 1 commit into
galaxyproject:mainfrom
jmchilton:convert-asserts-list-form-passing

Conversation

@jmchilton

@jmchilton jmchilton commented Jul 10, 2026

Copy link
Copy Markdown
Member

Opened by Claude (AI assistant) on behalf of @jmchilton — not authored by them personally.

Summary

YAML silently collapses duplicate mapping keys, so asserts: blocks that repeat an assertion type (has_text:, has_line:, has_text_matching:) only ran the last assertion per type — every earlier assertion was silently dropped by the loader and never executed. This converts the affected workflow-tests files to list form so every assertion runs:

# Before — second has_text: overwrites first, "gene" assertion never ran
asserts:
  has_text:
    text: "gene"
  has_text:
    text: "BUSTED"

# After — both run
asserts:
  - that: has_text
    text: "gene"
  - that: has_text
    text: "BUSTED"

Successor to closed #1217, reduced to the files whose tests are genuinely green with this change. Files whose tests fail/error are split into their own PRs.

Files (6)

  • bacterial_quality_and_contamination_control_post_assembly-tests.yml
  • quality_and_contamination_control_raw_reads-tests.yml
  • host-or-contamination-removal-on-long-reads-tests.yml
  • short-read-quality-control-and-trimming-tests.yml
  • pe-artic-variation-tests.yml
  • genotype-variant-calling-wgs-pe-test.yml

Split out

How this was found

Galaxy's new gxwf validate-tests validator swept IWC workflow-tests against the Pydantic Tests model; ordered_load raises on duplicate mapping keys (per YAML 1.2), surfacing these authoring bugs.

FOR CONTRIBUTOR:

YAML silently collapses duplicate mapping keys, so `asserts:` blocks
with repeated `has_text:` / `has_line:` / `has_text_matching:` entries
were only running the *last* assertion per type — the rest were dead.

Convert to list form (`- that: has_text` ...) so each assertion is a
distinct item and actually runs. Semantic change: tests that silently
passed earlier assertions may now fail if the previously-dropped
assertion text doesn't actually match tool output.

Surfaced by the Galaxy gxwf workflow-test validator IWC sweep.
@jmchilton
jmchilton force-pushed the convert-asserts-list-form-passing branch from ac56ce0 to 6c09f87 Compare July 10, 2026 21:08
@mvdbeek
mvdbeek merged commit 01181c0 into galaxyproject:main Jul 13, 2026
11 checks passed
@mvdbeek

mvdbeek commented Jul 13, 2026

Copy link
Copy Markdown
Member

Attention: deployment failure!

https://github.com/galaxyproject/iwc/actions/runs/29231569359

@wm75 wm75 mentioned this pull request Jul 16, 2026
12 tasks
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.

2 participants