DC API does not return failure while creating a strategy with no steps

Bug #1949478 reported by Jessica Castelino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Jessica Castelino

Bug Description

Brief Description
-----------------
After creating the strategy to a subcloud group and there is no Steps available, is possible to apply it without an error message.

Severity
-----------------
Minor

Steps to Reproduce
-----------------
Create a strategy.
Check there are no steps available.
Apply the strategy

Expected Behavior
-----------------
Apply strategy button is not available.

Actual Behavior
-----------------
Apply strategy button is available. The strategy applies. An error message is displayed

Reproducibility
-----------------
100%

System Configuration
-----------------
Distributed Cloud

Test Activity
-----------------
Testing in Sprint

Branch/Pull Time/Commit
-----------------
2021-09-13_00-00-10

Last Pass
---------
N/A

Workaround
----------
Check "dcmanager strategy-step-list" and if there are no steps, don't apply the strategy

Ghada Khalil (gkhalil)
tags: added: stx.distcloud
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to distcloud (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/distcloud/+/816536

Changed in starlingx:
status: New → In Progress
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Jessica Castelino (jcasteli)
importance: Undecided → Low
tags: added: stx.6.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

Reviewed: https://review.opendev.org/c/starlingx/distcloud/+/816536
Committed: https://opendev.org/starlingx/distcloud/commit/952ad5fc7b75df4f51c7f603d3e3c6bcd071af0e
Submitter: "Zuul (22348)"
Branch: master

commit 952ad5fc7b75df4f51c7f603d3e3c6bcd071af0e
Author: Jessica Castelino <email address hidden>
Date: Mon Nov 1 09:53:00 2021 -0400

    Raise exception when a strategy is created with no steps

    It is possible for a user to create and apply a strategy with no
    strategy steps. This commit raises an exception in such a scenario
    to make it more intuitive and user friendly.

    Additionally, this commit also fixes the stage numbering.

    Test Plan:
    1) Strategy raises exception when there are no steps
    2) Strategy numbering starts with 1 for all type of strategies

    Change-Id: I2b9c0a757129aa165512718cb93ccdf31d1b69dc
    Signed-off-by: Jessica Castelino <email address hidden>
    Closes-Bug: 1949478

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