Repository navigation
Lint duplicate step labels as errors - #268
Merged
jmchilton merged 3 commits intoOct 20, 2026
Merged
Conversation
Galaxy refuses to import a workflow whose steps (inputs included) share a
label ("Duplicated step label ... in request."), but neither lint_ga nor
lint_format2 checked for it, so planemo workflow_lint passed workflows that
then failed at import (galaxyproject/iwc#310).
Add a StepLabelNotUnique structural rule, checked per workflow level like
Galaxy (subworkflows have their own namespace, empty labels ignored). The
Format2 check uses the same label helpers as conversion, now shared as
native_input_label / native_step_label, so it flags exactly the native
labels Galaxy would see.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #268 +/- ##
=======================================
Coverage 42.45% 42.45%
=======================================
Files 51 51
Lines 1974 1974
Branches 441 441
=======================================
Hits 838 838
Misses 1102 1102
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Recurse native lint with a child context so subworkflow pointers carry the /steps/<key>/subworkflow prefix (also fixes NativeStepKeyNotInteger). Assert exact message and pointer for the nested case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add fixtures for an id-less input defaulting to 'Input 0' clashing with a step, duplicates inside an inline subworkflow, and a label reused across levels. Assert exact messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jmchilton
pushed a commit
to jmchilton/galaxy-tool-util-ts
that referenced
this pull request
Oct 20, 2026
Port gxformat2's StepLabelNotUnique rule (galaxyproject/gxformat2#268). Galaxy refuses to import a workflow whose steps (inputs included) share a label. Native lint checks each workflow level's step labels; Format2 lint checks the native labels conversion assigns, via nativeInputLabel / nativeStepLabel now shared with toNative. Fixtures, lint_native/lint_format2 expectations and lint_profiles.yml synced from the gxformat2 PR branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Galaxy rejects a workflow at import when two of its steps share a label, and that includes input steps:
Neither
lint_ganorlint_format2checked for this. As a result,planemo workflow_lint --iwc --fail_level errorpassed galaxyproject/iwc#310, where aparameter_inputand atp_sed_toolstep had the same label, and CI only failed once Galaxy was running.Change
New structural lint rule
StepLabelNotUnique, an error added to thestructuralprofile. It mirrors Galaxy's check inlib/galaxy/managers/workflows.py:The message lists every occurrence, e.g.
Duplicated step label 'X' (step 15, step 16). Native errors carryjson_pointer/steps/<key>/label.Format2 gets the same check. It catches three cases:
label:in list-form steps;To avoid false positives or misses, the lint reuses the labelling that conversion applies.
_step_labeland the input-label logic from_build_input_stepare now shared asnative_step_labelandnative_input_label. This also covers theInput Nfallback and the_unlabeled_*sentinels.Tests
Declarative cases in
lint_native.ymlandlint_format2.yml, with new fixtures:The four positive cases fail without the lint change.
Checks
GXFORMAT2_TEST_IWC_DIRECTORYset, 1895 tests..gaworkflows trip the new rule, natively or after conversion to Format2.Duplicated step label 'Strip version from reference sequence ids' (step 15, step 16). The fixed revision lints clean.Not included (open for discussion)
Follow-up
For IWC CI to benefit, this needs a gxformat2 release and a planemo release that picks it up.