Skip to content

fix: show which buildkit we're currently using if non standard#390

Draft
gilescope wants to merge 1 commit intomainfrom
giles-fix-buildkit-warning-more
Draft

fix: show which buildkit we're currently using if non standard#390
gilescope wants to merge 1 commit intomainfrom
giles-fix-buildkit-warning-more

Conversation

@gilescope
Copy link

Let't see what buildkit we're pointing to.

Signed-off-by: Giles Cope <gilescope@gmail.com>
@github-actions
Copy link

➖ Are we earthbuild yet?

No change in "earthly" occurrences

📈 Overall Progress

Branch Total Count
main 5619
This PR 5619
Difference +0

Keep up the great work migrating from Earthly to Earthbuild! 🚀

💡 Tips for finding more occurrences

Run locally to see detailed breakdown:

./.github/scripts/count-earthly.sh

Note that the goal is not to reach 0.
There is anticipated to be at least some occurences of earthly in the source code due to backwards compatibility with config files and language constructs.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the clarity of the warning message displayed when the system detects that a non-standard Buildkit version is in use. By providing the expected and actual package names, it helps users quickly identify and resolve potential compatibility issues.

Highlights

  • Buildkit Version Verification: The PR enhances the warning message when a non-EarthBuild version of Buildkit is detected, providing more specific information about the expected and actual package names.
Changelog
  • buildkitd/buildkitd.go
    • Improved warning message for non-EarthBuild Buildkit versions.
Activity
  • The pull request was created by gilescope.
  • The pull request title is 'fix: show which buildkit we're currently using if non standard'.
  • The pull request description is 'Let't see what buildkit we're pointing to.'
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the warning message for non-standard buildkit usage by including both the expected and actual package paths, which provides clearer diagnostic information. I have one suggestion to improve maintainability by avoiding a duplicated string.

Comment on lines +1155 to +1156
" expected: github.com/EarthBuild/buildkit\n"+
" actual: %s", info.BuildkitVersion.Package)

Choose a reason for hiding this comment

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

medium

The hardcoded string "github.com/EarthBuild/buildkit" is also used in the if condition on line 1153. To improve maintainability and avoid duplication, this string should be defined as a constant at the package level. This constant can then be used in both places.

While defining the constant and modifying the if statement is outside the scope of this diff, you can still avoid duplicating the string in this log message by using a format specifier and passing the string as an argument. This prepares the code for the eventual refactoring to a constant.

Suggested change
" expected: github.com/EarthBuild/buildkit\n"+
" actual: %s", info.BuildkitVersion.Package)
" expected: %s\n"+
" actual: %s", "github.com/EarthBuild/buildkit", info.BuildkitVersion.Package)

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