Bug 2125728

Summary: Content view Promote always warns for 'Force promotion' even if correct path is followed.
Product: Red Hat Satellite Reporter: Avijit Roy <avroy>
Component: Content ViewsAssignee: Samir Jha <sajha>
Status: POST --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.1CC: iballou, msviriko, sajha
Target Milestone: UnspecifiedKeywords: Triaged, UserExperience
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Avijit Roy 2022-09-09 21:24:16 UTC
Description of problem:

Content View Promotion warns below message even if the correct promotion path is followed. 

Force promotion
Selected environment PREPROD is out of the environment path order. The recommended practice is to promote to the next environment in the path.

Version-Release number of selected component (if applicable):

6.11

How reproducible:
100%

Steps to Reproduce:

Scenario 1: 
~~~~~~~~~~

1. Create an environment path Library >> Test >> Preprod >> Prod.
2. Create a content view and publish (promote) to Library.
3. Promote Version:1 to Test.
4. Publish Version:2. 
5. Now Version:2 in Library and Version:1 in Test. 
6. If we try to Promote version:1 to Preprod it gives us the below warning. Though the Preprod Environment is in path. 

-----------
Force promotion
Selected environment PREPROD is out of the environment path order. The recommended practice is to promote to the next environment in the path.
-----------

7. But if we try again Promote Version:2 to Test it will not give us the error. 

Scenario:2
~~~~~~~~~~~

The above message is true when we do not follow the path at any time. Like below:

- Created a CV
- Initially, it is in the 'Library'
- Promoted directly to 'Preprod' [ Got the warning Selected environment PREPROD is out of the environment....]
- Now when I am trying to promote it to 'Prod' which is on the path I am getting the warning. 

Promotion path of the CV: Library  >>  Preprod  >> Prod
Actualt Environment Path of the CV: Library >> Test >> Preprod >> Prod.


Expected results:

The warning should only be applicable for Scenario 2. When we are already following the path Satellite should not give us a warning.

Comment 3 Maria Svirikova 2023-05-30 09:48:47 UTC
Scenario 1.
There shouldn't be a warning as the promotion is on the path (no warning for any of these steps 3, 6, 7)

Scenario 2.
Here we should get a warning just the first time (promotion from Library to Preprod) when we are skipping Test env.
When there is a promotion from Preprod to Prod, it's following the path again. There shouldn't be any warning.

RULE: If we skip any environment in the promotion path of one specific version - users will get a warning just in that case and within that specific version.

PATH: Library >> Test >> Preprod >> Prod - promoting Version 4

Library >> Test (none)
Library >> Preprod (warning)
Library >> Prod (warning)
Test >> Preprod (none)
Test >> Prod(warning)
Preprod >> Prod (none)

Comment 5 Samir Jha 2023-06-16 17:52:57 UTC
Created redmine issue https://projects.theforeman.org/issues/36515 from this bug

Comment 6 Bryan Kearney 2023-06-24 00:02:23 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36515 has been resolved.