OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
162 stars 20 forks source link

When adjusting Phase settings for Lifecycles, the radio buttons don't reflect the actual settings #8122

Open donnybell opened 1 year ago

donnybell commented 1 year ago

Severity

No response

Version

Confirmed in 2023.2.5010 and 2023.1.9732

Latest Version

None

What happened?

When adjusting Phase settings for Lifecycles, the radio buttons don't reflect the actual settings.

Reproduction

  1. Create a new Lifecycle with 2 Phases
  2. Set the Phases to A minimum of 1 must complete
  3. Save
  4. Expand either phase and notice the radio button is on All must complete

In this state, you are eligible to save again (if needed) if you select A minimum of 1 must complete, then any other option Example in a test instance [Internal Only]

Error and Stacktrace

No response

More Information

Screenshot of the UI: image

Here is the JSON for the API for the same Lifecycle. Notice the MinimumEnvironmentsBeforePromotion option is set to 1, but would be 0 if it matched the UI:

{
"Id": "Lifecycles-1774",
"SpaceId": "Spaces-84",
"Phases": [
{
"Id": "049fa94e-65c6-417f-9015-452811c8cff5",
"Name": "Dev",
"AutomaticDeploymentTargets": [],
"OptionalDeploymentTargets": [
"Environments-301"
],
"MinimumEnvironmentsBeforePromotion": 1,
"IsOptionalPhase": false,
"ReleaseRetentionPolicy": null,
"TentacleRetentionPolicy": null
},
{
"Id": "1db585da-3fc1-40e1-8e37-d35610b325ca",
"Name": "Test",
"AutomaticDeploymentTargets": [],
"OptionalDeploymentTargets": [
"Environments-347"
],
"MinimumEnvironmentsBeforePromotion": 1,
"IsOptionalPhase": false,
"ReleaseRetentionPolicy": null,
"TentacleRetentionPolicy": null
}
],
"Slug": "test",
"Name": "Test",
"ReleaseRetentionPolicy": {
"Unit": "Days",
"QuantityToKeep": 30,
"ShouldKeepForever": false
},
"TentacleRetentionPolicy": {
"Unit": "Days",
"QuantityToKeep": 30,
"ShouldKeepForever": false
},
"Description": "",
"Links": {
"Self": "[/api/Spaces-84/lifecycles/Lifecycles-1774](https://octopus-operations.octopus.app/api/Spaces-84/lifecycles/Lifecycles-1774)",
"Preview": "[/api/Spaces-84/lifecycles/Lifecycles-1774/preview](https://octopus-operations.octopus.app/api/Spaces-84/lifecycles/Lifecycles-1774/preview)",
"Projects": "[/api/Spaces-84/lifecycles/Lifecycles-1774/projects](https://octopus-operations.octopus.app/api/Spaces-84/lifecycles/Lifecycles-1774/projects)"
}
}

Workaround

You can find the true settings for your Lifecycle by making a quick edit to the URL for the Lifecycle. See my example below.

Example URL for a Lifecycle: https://YOUR_OCTOPUS_URL/app#/Spaces-84/library/lifecycles/Lifecycles-1774

Edit the URL by making app# -> api and delete library/ from the URL. Here is what the final result should look like: https://YOUR_OCTOPUS_URL/api/Spaces-84/lifecycles/Lifecycles-1774

These are the two settings that represent the 3 radio buttons: image All must complete is the same as "MinimumEnvironmentsBeforePromotion": 0 in the JSON

donnybell commented 1 year ago

Affected Customer [Internal Link]