Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Pause/Resume Deployments #2954

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thorbenbelow
Copy link
Contributor

@thorbenbelow thorbenbelow commented Nov 10, 2024

This PR adds a new feature requested in #2792.

Deployments can be paused and resumed.

Description

There is now a new column in the deployments view that shows if a deployment is paused.
paused-column

Deployments can be paused or resumed using the z shortcut. The action depends on the current status of the deployment.
Screenshot 2024-11-10 at 17 38 23
Screenshot 2024-11-10 at 17 38 45

When there are multiple deployments selected the user has to choose between pausing or resuming them. The default is Pause.
Screenshot 2024-11-10 at 17 39 23

@thorbenbelow thorbenbelow force-pushed the feat/add-pause-and-resume-cmds branch from 3c0a834 to c5ee027 Compare November 10, 2024 16:56
Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thorbenbelow Thank you for this update!

@@ -123,6 +123,30 @@ func (d *Deployment) Restart(ctx context.Context, path string) error {
return err
}

// Pause a Deployment
func (d *Deployment) Pause(ctx context.Context, path string) error {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given pause/resume are used in tandem, I think we could dry this up and use TogglePause(...) instead.
This will be inline with cronjobs and other resources where we offer toggling behavior
What do you think?

@derailed
Copy link
Owner

@thorbenbelow Looks like this has conflicts and needs TLC. Could you take another look?

@derailed derailed added enhancement New feature or request needs-tlc Pr needs additional updates conflicts labels Feb 16, 2025
@thorbenbelow thorbenbelow force-pushed the feat/add-pause-and-resume-cmds branch 3 times, most recently from ba4e273 to 3d1920b Compare February 17, 2025 17:32
@thorbenbelow
Copy link
Contributor Author

Hey @derailed, I followed your suggestion and aligned the behavior with existing toggle implementations. As a result, I removed the multi-selection switch since I felt it would have made things more confusing. Let me know if you have any further suggestions!

Signed-off-by: Thorben Below <56894536+thorbenbelow@users.noreply.github.com>
@thorbenbelow thorbenbelow force-pushed the feat/add-pause-and-resume-cmds branch from 3d1920b to 99ab3cc Compare February 17, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts enhancement New feature or request needs-tlc Pr needs additional updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants