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

Install latest fuzzer #46

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Install latest fuzzer #46

wants to merge 5 commits into from

Conversation

bohendo
Copy link
Collaborator

@bohendo bohendo commented Mar 29, 2024

Query github to determine the most recently released version of echidna, medusa, and doctl. Then install that version.

Removes the need to periodically update packer/provision.sh to update to the latest version. Instead, we can just re-run the packer command.

Summary by CodeRabbit

  • Chore: Updated the indentation in cancel.go and main.go for better code readability.
  • Refactor: Updated dependency URLs and hashes in flake.nix and packer/provision.sh. Removed the gocode package from native build inputs.
  • New Feature: Automated the installation process for doctl, echidna, and medusa in packer/provision.sh to always fetch and install the latest versions, reducing the need for manual updates.
  • Needs Review: Changes made in justfile require further review.

Copy link

github-actions bot commented Mar 29, 2024

Image description CodeRabbit

Walkthrough

This pull request introduces updates to the dependencies in flake.nix and packer/provision.sh, enhancing the installation process for tools like doctl, echidna, and medusa. It also includes minor formatting changes in cmd/cloudexec/cancel.go and cmd/cloudexec/main.go. The justfile requires further review.

Changes

Files Summary
cmd/cloudexec/cancel.go, cmd/cloudexec/main.go Minor formatting changes, replacing tab indentations with spaces for return statements.
flake.nix, packer/provision.sh Updates to URLs and hashes for dependencies. Improved installation process for doctl, echidna, and medusa by querying GitHub for the latest released versions. Removed gocode package from native build inputs.
justfile Needs further review.

"In the land of code, where the shadows lie,
🐇 A rabbit hopped, under the cloudless sky.
With each leap forward, a bug was slain,
Bringing joy to all, in the open-source domain.
So here's to the changes, big and small,
May our code be strong, and never fall! 🎉"


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 bfae614 and 35e8616 commits.
Files selected (6)
  • .shellcheckrc (1)
  • cmd/cloudexec/cancel.go (1)
  • cmd/cloudexec/main.go (1)
  • flake.nix (3)
  • justfile (1)
  • packer/provision.sh (3)
Files ignored due to filter (1)
  • flake.lock
Files skipped from review due to trivial changes (1)
  • cmd/cloudexec/cancel.go
Review comments generated (10)
  • Review: 8
  • LGTM: 2

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.

.shellcheckrc Show resolved Hide resolved
justfile Show resolved Hide resolved
justfile Show resolved Hide resolved
flake.nix Show resolved Hide resolved
flake.nix Show resolved Hide resolved
flake.nix Show resolved Hide resolved
Comment on lines +5 to +21
########################################
## Helper Functions

function github_api {
project="$1"
github_api="https://api.github.com/repos/${project}/releases/latest"
curl -s "${github_api}"
}

function get_latest_version {
github_api "$1" | jq '.tag_name' | tr -d 'v' | tr -d '"'
}

function get_latest_artifact {
github_api "$1" | jq '.assets[] | select(.name | test("linux")) | .browser_download_url' | tr -d '"'
}

Choose a reason for hiding this comment

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

Image description CodeRabbit

The helper functions github_api, get_latest_version, and get_latest_artifact are well implemented. They use the GitHub API to fetch the latest version of a given project and the URL for the latest artifact for a Linux system. However, there is no error handling in case the GitHub API request fails or returns an unexpected response. Consider adding some error checking to these functions.

function github_api {
	project="$1"
	github_api="https://api.github.com/repos/${project}/releases/latest"
	response=$(curl -s "${github_api}")
    if [ $? -ne 0 ]; then
        echo "Failed to fetch data from GitHub API for project ${project}"
        exit 1
    fi
    echo "${response}"
}

packer/provision.sh Show resolved Hide resolved
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.

1 participant