Skip to content

Fix droplet destruction#40

Merged
bohendo merged 7 commits intomainfrom
fix-droplet-destruction
Mar 15, 2024
Merged

Fix droplet destruction#40
bohendo merged 7 commits intomainfrom
fix-droplet-destruction

Conversation

@bohendo
Copy link
Copy Markdown
Collaborator

@bohendo bohendo commented Mar 13, 2024

resolved #32

Summary by CodeRabbit

  • Refactor: Updated ConfirmDeleteDroplets function in cmd/cloudexec/clean.go, cmd/cloudexec/main.go, and pkg/state/state.go to return a slice of confirmed droplets for deletion, improving the reliability of droplet management.
  • New Feature: Enhanced CancelRunningJobs function in pkg/state/state.go to accept a list of job IDs to cancel, providing more control over job cancellation.
  • Refactor: Modified EnsureSSHIncludeConfig function in pkg/ssh/ssh.go for better SSH configuration management.
  • Chore: Updated build and installation commands in justfile for improved development experience.
  • Documentation: Revised comments and documentation in CONTRIBUTING.md, Makefile, and justfile for better clarity.
  • Chore: Changed vendorSha256 attribute to vendorHash in flake.nix, aligning with latest nix configurations.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 13, 2024

Image description CodeRabbit

Walkthrough

This pull request introduces changes to the build process, SSH configuration, and job cancellation logic. It modifies comments and documentation, alters the handling of droplet deletion confirmation, and updates the way running jobs are cancelled. The SSH configuration file's content is also adjusted. These changes aim to improve the system's robustness and maintainability without altering any exported function signatures or global data structures.

Changes

Files Summary
CONTRIBUTING.md, Makefile, justfile Comments and documentation have been updated for clarity. The nix-install target has been removed from the Makefile, which may impact the build process. A new command for launching an example has been added in justfile.
flake.nix The attribute vendorSha256 has been replaced with vendorHash, which could affect dependent code.
cmd/cloudexec/clean.go, cmd/cloudexec/main.go, pkg/state/state.go The function ConfirmDeleteDroplets now returns a slice of confirmed droplets to delete along with any error. The main function handles confirmed deletions and job cancellations more effectively. The CancelRunningJobs function accepts an additional parameter to specify which jobs to cancel.
pkg/ssh/ssh.go, pkg/state/state.go The EnsureSSHIncludeConfig function in ssh.go has been modified to change the content written to the SSH config file. The CancelRunningJobs function in state.go now takes an additional parameter to specify which jobs to cancel.

🐇💻

"In the land of code, where the shadows lie,

Changes come, under the clouded sky.

Build commands shift, and functions grow,

As we refactor, the improvements show.

With each PR, our codebase gleams,

Like moonlight dancing on silver streams."


Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between c27310b and 4671849 commits.
Files selected (8)
  • CONTRIBUTING.md (1)
  • Makefile (1)
  • cmd/cloudexec/clean.go (2)
  • cmd/cloudexec/main.go (4)
  • flake.nix (1)
  • justfile (1)
  • pkg/ssh/ssh.go (3)
  • pkg/state/state.go (1)
Files ignored due to filter (2)
  • example/input/archive.zip
  • example/input/echidna_config.yml
Review comments generated (18)
  • Review: 9
  • LGTM: 9

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 4671849 and 9dc8c34 commits.
Files selected (2)
  • cmd/cloudexec/clean.go (2)
  • pkg/state/state.go (1)
Review comments generated (3)
  • Review: 3
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@bohendo bohendo merged commit 9d3aa08 into main Mar 15, 2024
@bohendo bohendo deleted the fix-droplet-destruction branch March 15, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cloudexec status --all displays job as cancelled even if job is still running

1 participant