-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request introduces updates to the dependencies in Changes
Uplevel your code reviews with CodeRabbit ProCodeRabbit ProIf 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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.
######################################## | ||
## 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 '"' | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}"
}
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
cancel.go
andmain.go
for better code readability.flake.nix
andpacker/provision.sh
. Removed thegocode
package from native build inputs.doctl
,echidna
, andmedusa
inpacker/provision.sh
to always fetch and install the latest versions, reducing the need for manual updates.justfile
require further review.