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

Qol touch up #44

Merged
merged 16 commits into from
Mar 15, 2024
Merged

Qol touch up #44

merged 16 commits into from
Mar 15, 2024

Conversation

bohendo
Copy link
Collaborator

@bohendo bohendo commented Mar 15, 2024

  • add colorful logger
  • clean up unnecessary logs and clarify necessary ones
  • fix the built-in cloudexec example
  • better error handling

resolves #23 & other issues similar to this

Copy link

github-actions bot commented Mar 15, 2024

Image description CodeRabbit

Walkthrough

This pull request introduces significant improvements to the logging system, refactors function names and signatures for clarity, and optimizes package installation and error handling. It also includes changes to the setup process, updates to Nix expressions, and modifications to the logic and functionality of the state management.

Changes

Files Summary
.gitignore Updated exclusions for environment-specific files and directories.
cmd/cloudexec/*.go, pkg/digitalocean/digitalocean.go, pkg/config/config.go Introduced colorful logger, replaced fmt.Printf with log functions, renamed functions, updated log messages, and modified function signatures.
cmd/cloudexec/user_data.sh.tmpl, pkg/ssh/ssh.go Optimized package installation, improved error handling, and introduced a colorful logger.
example/input/flags.sol Renamed three functions in the Test contract.
flake.nix Added Nix expressions for various Python packages and manual testing dependencies.
pkg/log/log.go Added a package for colorful logging.
pkg/s3/s3.go Removed unnecessary log statements from the CreateBucket and PutObject functions.
pkg/state/state.go Added helper function, changed MergeStates function to handle job updates and deletions, altered exported function signatures, and cleaned up GetState function.

🐇💻

In the land of code where the shadows lie,
A rabbit hopped forth under the clouded sky.
With each leap and bound, it made a change,
Refactoring, optimizing, isn't it strange?

Logs now shine with colors so bright,
Making debugging a much easier fight.
Functions renamed, signatures refined,
In the maze of code, easier to find.

So let's celebrate this coding spree,
For better software, as you can see! 🎉🥳


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

@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 1f11b45 and a686048 commits.
Files selected (19)
  • .gitignore (1)
  • cmd/cloudexec/cancel.go (2)
  • cmd/cloudexec/clean.go (2)
  • cmd/cloudexec/configure.go (3)
  • cmd/cloudexec/init.go (4)
  • cmd/cloudexec/launch.go (4)
  • cmd/cloudexec/logs.go (1)
  • cmd/cloudexec/main.go (15)
  • cmd/cloudexec/pull.go (4)
  • cmd/cloudexec/push.go (6)
  • cmd/cloudexec/user_data.sh.tmpl (6)
  • example/input/flags.sol (1)
  • flake.nix (3)
  • pkg/config/config.go (2)
  • pkg/digitalocean/digitalocean.go (5)
  • pkg/log/log.go (1)
  • pkg/s3/s3.go (3)
  • pkg/ssh/ssh.go (5)
  • pkg/state/state.go (3)
Files ignored due to filter (2)
  • example/cloudexec.toml
  • example/input/medusa.json
Files not reviewed due to errors (3)
  • flake.nix (no response)
  • pkg/digitalocean/digitalocean.go (no response)
  • pkg/log/log.go (no response)
Files skipped from review due to trivial changes (4)
  • cmd/cloudexec/init.go
  • cmd/cloudexec/user_data.sh.tmpl
  • pkg/config/config.go
  • pkg/s3/s3.go
Review comments generated (57)
  • Review: 21
  • LGTM: 36

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.

cmd/cloudexec/configure.go Show resolved Hide resolved
cmd/cloudexec/logs.go Show resolved Hide resolved
cmd/cloudexec/clean.go Show resolved Hide resolved
cmd/cloudexec/clean.go Show resolved Hide resolved
cmd/cloudexec/clean.go Show resolved Hide resolved
pkg/ssh/ssh.go Show resolved Hide resolved
pkg/ssh/ssh.go Show resolved Hide resolved
pkg/state/state.go Show resolved Hide resolved
pkg/state/state.go Show resolved Hide resolved
pkg/state/state.go Show resolved Hide resolved
@bohendo bohendo merged commit cbba8d8 into main Mar 15, 2024
6 checks passed
@bohendo bohendo deleted the qol-touch-up branch March 15, 2024 21:26
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.

Panic when trying to pull nonexistent output
1 participant