Skip to content

Commit

Permalink
fix: skipped envs with cancel deployments (#2223)
Browse files Browse the repository at this point in the history
Deploying and canceling deployments for a group wasn't taking into
account environments that should be skipped.

Ref: SRX-3I6YKY
  • Loading branch information
EdSwordsmith authored Jan 28, 2025
1 parent 8254704 commit c3f67f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ export const EnvironmentGroupLane: React.FC<{
action.action.deploy.environment === env.name
)
);
const alreadyPlanned = envsWithoutPlannedDeployments.length === 0;
const alreadyPlanned =
envsWithoutPlannedDeployments.filter((env) => release.environments.includes(env.name)).length === 0;

const createEnvGroupLock = React.useCallback(() => {
environmentGroup.environments.forEach((environment) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ exports[`Release Dialog Renders the environment locks normal release 1`] = `
class="first-two"
>
<button
aria-label="Deploy & Lock"
class="mdc-button button-main env-card-deploy-btn mdc-button--unelevated"
aria-label="Cancel Deploy & Lock"
class="mdc-button button-main env-card-deploy-btn mdc-button--unelevated deploy-button-cancel"
>
<div
class="mdc-button__ripple"
/>
<span
class="mdc-button__label"
>
Deploy & Lock
Cancel Deploy & Lock
</span>
</button>
<button
Expand Down Expand Up @@ -431,16 +431,16 @@ exports[`Release Dialog Renders the environment locks normal release with deploy
class="first-two"
>
<button
aria-label="Deploy & Lock"
class="mdc-button button-main env-card-deploy-btn mdc-button--unelevated"
aria-label="Cancel Deploy & Lock"
class="mdc-button button-main env-card-deploy-btn mdc-button--unelevated deploy-button-cancel"
>
<div
class="mdc-button__ripple"
/>
<span
class="mdc-button__label"
>
Deploy & Lock
Cancel Deploy & Lock
</span>
</button>
<button
Expand Down Expand Up @@ -743,16 +743,16 @@ exports[`Release Dialog Renders the environment locks two envs release 1`] = `
class="first-two"
>
<button
aria-label="Deploy & Lock"
class="mdc-button button-main env-card-deploy-btn mdc-button--unelevated"
aria-label="Cancel Deploy & Lock"
class="mdc-button button-main env-card-deploy-btn mdc-button--unelevated deploy-button-cancel"
>
<div
class="mdc-button__ripple"
/>
<span
class="mdc-button__label"
>
Deploy & Lock
Cancel Deploy & Lock
</span>
</button>
<button
Expand Down

0 comments on commit c3f67f5

Please sign in to comment.