Mistral saves whole yaml for every wf definition in case of creating multiple wf.

Bug #1792975 reported by Oleg Ovcharuk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Medium
Oleg Ovcharuk

Bug Description

Whenever we want to save multiple wf from one yaml, every saved wf will have all this input in their definitions. This behavior doesn't match with saving one wf. This could be bad for users, who want to parse definition.
For example:
I want to create two workflows from file wfs.yaml
"""
version: '2.0'
wf1:
  type: direct
  tasks:
    task1:
      action: std.noop
wf2:
  type: direct
  tasks:
    task1:
      action: std.noop
"""
mistral workflow-get-definition wf1

Expected output:
"""
version: '2.0'
wf1:
  type: direct
  tasks:
    task1:
      action: std.noop
"""

Actual output:
"""
version: '2.0'
wf1:
  type: direct
  tasks:
    task1:
      action: std.noop
wf2:
  type: direct
  tasks:
    task1:
      action: std.noop
"""

The same behavior appears when I want to update wfs.

Oleg Ovcharuk (vgvoleg)
summary: - Mistral saves wrong wf definition in case of creating multiple wf
+ Mistral saves whole yaml for every wf definition in case of creating
+ multiple wf.
description: updated
Changed in mistral:
milestone: none → stein-1
importance: Undecided → Medium
assignee: nobody → Oleg Ovcharuk (vgvoleg)
status: New → Confirmed
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/603208

Changed in mistral:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

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

commit c712e369edb15f26e7adf1c5a738f884c3246fc8
Author: Oleg Ovcharuk <email address hidden>
Date: Mon Sep 17 19:23:22 2018 +0300

    Divide yaml input to save it into definitions separately.

    In case of creating/updating multiple workflows from one yaml,
    we should not save the whole input to each workflow.

    Closes-Bug: #1792975
    Change-Id: I724c041ab3441805fcfa2cfc4a50afd774998cc7
    Signed-off-by: Oleg Ovcharuk <email address hidden>

Changed in mistral:
status: In Progress → Fix Released
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.

Other bug subscribers

Remote bug watches

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