-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Ensure api-runner image includes build tools #135
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
fix: Ensure api-runner image includes build tools #135
Conversation
Summary of ChangesHello @gocanto, 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 addresses the requirement for build tools within the Highlights
Using Gemini Code AssistThe 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
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 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
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThe PR changes the Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant Make as make run-cli
participant FS as File System
participant Docker as Docker/Compose
rect rgba(220,235,245,0.4)
note over Make: Secret validation
Dev->>Make: make run-cli DB_SECRET_*=...
Make->>FS: Check secret values or files exist
alt Any missing values/files
Make-->>Dev: Print missing items and exit (non-zero)
else All secrets valid
note over Make,Docker: Execution branch
alt Docker unavailable
Make-->>Dev: Run CLI locally (no Docker)
else Docker available
Make->>Docker: docker compose run api-runner ...
Docker-->>Make: Exit status
Make-->>Dev: Propagate exit status
end
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Code Review
This pull request correctly updates the api-runner service to use a custom Docker image with build tools, which is necessary for cgo builds to succeed. My review includes a couple of suggestions to improve build reproducibility and security by pinning the base image digest and the version of the installed build-base package. These changes would align the new Dockerfile with best practices already in use elsewhere in this repository.
|
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
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.
Actionable comments posted: 1
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
metal/makefile/app.mk(2 hunks)
🔇 Additional comments (4)
metal/makefile/app.mk (4)
3-5: LGTM! Clear default secret paths.The conditional variable assignments allow easy override while providing sensible defaults.
42-82: Solid validation logic with good error messages.The secret validation correctly distinguishes between missing values and missing files, accumulates all errors before exiting, and uses POSIX-compatible shell syntax. The path pattern
/*|./*|../*covers the common cases, though it won't match tilde-expanded paths like~/secrets/file.
83-101: Secret masking implementation looks good.The case-based masking correctly distinguishes file paths from inline values and redacts sensitive data appropriately. This addresses the previous concern about printing raw secrets.
Note: Past review comment about printing raw DB secrets is now resolved.
108-108: Clean delegation pattern.The target correctly forwards DB_SECRET_* variables to run-cli using Make's variable override mechanism. This maintains consistency and avoids duplicating validation logic.
| @DB_SECRET_USERNAME="$(DB_SECRET_USERNAME)" DB_SECRET_PASSWORD="$(DB_SECRET_PASSWORD)" DB_SECRET_DBNAME="$(DB_SECRET_DBNAME)" docker compose run --rm api-runner go run ./metal/cli/main.go || { \ | ||
| status=$$?; \ | ||
| printf "\n$(RED)❌ CLI exited with status $$status.$(NC)\n"; \ | ||
| exit $$status; \ | ||
| } |
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.
Critical: Recipe lines must use tabs, not spaces.
Lines 102-106 appear to have leading spaces instead of tab characters. Makefile recipes must begin with a tab (not spaces), or Make will reject the file with "missing separator" errors. Please replace the leading whitespace on these lines with a single tab character.
Apply this fix to correct the indentation:
- @DB_SECRET_USERNAME="$(DB_SECRET_USERNAME)" DB_SECRET_PASSWORD="$(DB_SECRET_PASSWORD)" DB_SECRET_DBNAME="$(DB_SECRET_DBNAME)" docker compose run --rm api-runner go run ./metal/cli/main.go || { \
- status=$$?; \
- printf "\n$(RED)❌ CLI exited with status $$status.$(NC)\n"; \
- exit $$status; \
- }
+ @DB_SECRET_USERNAME="$(DB_SECRET_USERNAME)" DB_SECRET_PASSWORD="$(DB_SECRET_PASSWORD)" DB_SECRET_DBNAME="$(DB_SECRET_DBNAME)" docker compose run --rm api-runner go run ./metal/cli/main.go || { \
+ status=$$?; \
+ printf "\n$(RED)❌ CLI exited with status $$status.$(NC)\n"; \
+ exit $$status; \
+ }Note: The inline environment variable assignment (VAR=value command) correctly exports values to the child process, resolving the previous concern about variable export.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @DB_SECRET_USERNAME="$(DB_SECRET_USERNAME)" DB_SECRET_PASSWORD="$(DB_SECRET_PASSWORD)" DB_SECRET_DBNAME="$(DB_SECRET_DBNAME)" docker compose run --rm api-runner go run ./metal/cli/main.go || { \ | |
| status=$$?; \ | |
| printf "\n$(RED)❌ CLI exited with status $$status.$(NC)\n"; \ | |
| exit $$status; \ | |
| } | |
| @DB_SECRET_USERNAME="$(DB_SECRET_USERNAME)" DB_SECRET_PASSWORD="$(DB_SECRET_PASSWORD)" DB_SECRET_DBNAME="$(DB_SECRET_DBNAME)" docker compose run --rm api-runner go run ./metal/cli/main.go || { \ | |
| status=$$?; \ | |
| printf "\n$(RED)❌ CLI exited with status $$status.$(NC)\n"; \ | |
| exit $$status; \ | |
| } |
🤖 Prompt for AI Agents
In metal/makefile/app.mk around lines 102 to 106 the recipe lines currently
start with spaces which causes Make to error with "missing separator"; replace
the leading spaces on each of these recipe lines with a single tab character so
the command lines are valid Makefile recipe entries (preserve the rest of the
line exactly, only change the indentation to a tab).
Summary
Summary by CodeRabbit
New Features
Bug Fixes
Chores