on-clause cannot reference a task name that contains characters other than [a-zA-Z0-9_]

Bug #1797439 reported by Bob Haddleton
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Bob Haddleton

Bug Description

The OnClauseSpec defines a Task name as a string that matches '\w+' which equates to [a-zA-Z0-9_], but this limitation is not enforced on task names, so it is possible to define a task name with a "-" character - or just about any other character outside that range, and the task will not be reachable from an on-clause.

Given the possibility of breaking existing workflows by imposing restrictions on the characters that could be used in task names, I'd suggest relaxing the definition of a Task name in the OnClauseSpec, to something like \S+, which more closely aligns with the permitted values for key names by YAML and JSON.

Changed in mistral:
assignee: nobody → Bob Haddleton (bob-haddleton)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/609794

Changed in mistral:
milestone: none → stein-1
importance: Undecided → High
tags: added: backport rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/609794
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=e98614cd606a863030fb98b23eff099b19ec868d
Submitter: Zuul
Branch: master

commit e98614cd606a863030fb98b23eff099b19ec868d
Author: Bob Haddleton <email address hidden>
Date: Thu Oct 11 14:31:11 2018 -0500

    Update OnClauseSPec task name criteria

    The OnClauseSpec required Task names to be \w+ or [a-zA-Z0-9_]
    which is not enforced by the DSL, so it was possible to have
    valid task names that could not be referenced in an on-clause.

    YAML enforces some restrictions on characters in task names (#, !, |)
    but other than that any JSON-schema valid string should be a valid Task
    name

    Change-Id: I3f1056cad7c67e160a082c2a0de2e3bfd476bc63
    Closes-Bug: 1797439

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/611550

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (stable/rocky)

Reviewed: https://review.openstack.org/611550
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=718dbeb23709887e806f4f5328d37cd4bde82917
Submitter: Zuul
Branch: stable/rocky

commit 718dbeb23709887e806f4f5328d37cd4bde82917
Author: Bob Haddleton <email address hidden>
Date: Thu Oct 11 14:31:11 2018 -0500

    Update OnClauseSPec task name criteria

    The OnClauseSpec required Task names to be \w+ or [a-zA-Z0-9_]
    which is not enforced by the DSL, so it was possible to have
    valid task names that could not be referenced in an on-clause.

    YAML enforces some restrictions on characters in task names (#, !, |)
    but other than that any JSON-schema valid string should be a valid Task
    name

    Change-Id: I3f1056cad7c67e160a082c2a0de2e3bfd476bc63
    Closes-Bug: 1797439
    (cherry picked from commit e98614cd606a863030fb98b23eff099b19ec868d)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 7.0.4

This issue was fixed in the openstack/mistral 7.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 8.0.0.0b1

This issue was fixed in the openstack/mistral 8.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.