Update/workflow - #56
Conversation
Updated checkout action to v7 and added step to download and convert author avatar to WebP format.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughChangesGitHub workflow updates
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActionsRunner
participant GitHubAvatarSource
participant WebPTooling
participant ReleaseBuild
GitHubActionsRunner->>GitHubAvatarSource: Download configured author avatar
GitHubActionsRunner->>WebPTooling: Install WebP tooling
GitHubActionsRunner->>WebPTooling: Convert avatar to author.webp
WebPTooling->>ReleaseBuild: Provide drawable asset
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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 |
|
@coderabbitai pause |
✅ Debug APK Build Successful
📲 Download
🤖 This comment is auto-generated by the PR Debug APK build workflow. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release-build.yml:
- Around line 151-152: Update the avatar download step in the release workflow
to make curl fail on HTTP errors, retry transient failures, and enforce
connection and transfer timeouts. Before invoking cwebp, validate that
/tmp/author.png exists and is non-empty, and stop the step with an error if
validation fails.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f5e9b1f1-79fa-41e0-a3be-f7238ac15565
📒 Files selected for processing (3)
.github/workflows/debug-build.yml.github/workflows/mirror-to-gitlab.yml.github/workflows/release-build.yml
| curl -sL "https://avatars.githubusercontent.com/u/172272341?s=460" -o /tmp/author.png | ||
| cwebp -q 95 /tmp/author.png -o app/src/main/res/drawable/author.webp |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== workflow context =="
if [ -f .github/workflows/release-build.yml ]; then
sed -n '1,210p' .github/workflows/release-build.yml | cat -n
else
echo "workflow file missing"
git ls files .github/workflows || true
fi
echo
echo "== curl docs/options installed =="
if command -v curl >/dev/null 2>&1; then
curl --version | head -5
curl --help short | rg -n "silent|fail|location|connect-timeout|max-time|retry|L \^S" || true
else
echo "curl not installed"
fi
echo
echo "== behavioral probe: local curl options =="
if command -v curl >/dev/null 2>&1; then
python3 - <<'PY'
import subprocess
urls = [
("ok", "data:text/plain,hello"),
("no_flag_404", "data:text/plain,not ok"),
("fail_flag_404", "data:text/plain,not ok"),
]
for name, url in urls:
cmd = ["curl", "--silent", "--location", url, "-o", "/tmp/author_curl_probe.png"]
if name.startswith("fail"):
cmd.insert(1, "--fail")
ret = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
body = open("/tmp/author_curl_probe.png","rb").read() if __import__("os").path.exists("/tmp/author_curl_probe.png") else b""
print(f"{name}: returncode={ret.returncode} size={len(body)} error={ret.stderr.decode(errors='replace').strip()}")
__import__("os").remove("/tmp/author_curl_probe.png")
PY
fi
echo
echo "== repository references to timeout in workflow =="
rg -n "timeout|retry|curl --|cwebp" .github/workflows/release-build.yml || trueRepository: RajnishKMehta/DhwaniControl
Length of output: 9267
🌐 Web query:
curl man page --silent --fail HTTP return code --max-time --connect-timeout --retry --location
💡 Result:
The following options are used in curl to control behavior, timeout, and failure handling: --silent (-s): Disables the progress meter and error messages. It prevents curl from showing any transfer progress or diagnostic information to standard error, effectively making it silent [1][2]. --fail (-f): Instructs curl to fail silently (with no output at all) on server errors, defined as HTTP response codes of 400 or greater [3][4]. When this occurs, curl exits with exit code 22 [3][5]. This is useful for scripts to detect failed HTTP requests, as by default, curl considers HTTP communication successful regardless of the status code [6][4]. This option is not fail-safe, as some non-successful codes (such as 401 and 407) may still be passed through depending on authentication scenarios [3]. --max-time (-m): Sets the maximum time in seconds that you allow the entire operation to take [7]. If the operation exceeds this duration, curl will exit [7]. It accepts decimal values [7]. --connect-timeout : Sets the maximum time in seconds allowed for the connection phase (DNS lookup, TCP/TLS/QUIC handshakes) [3][1]. If the connection is not established within this period, curl exits [3]. It accepts decimal values [3]. --retry : Specifies the number of times to retry the transfer if a transient error occurs. When enabled, curl will attempt the request again if it encounters issues like connection failures or HTTP 5xx errors. --location (-L): Instructs curl to follow HTTP redirects [1][7]. If the server responds with a 3xx status code indicating the page has moved, curl will automatically make a new request to the provided location [1]. HTTP Return Codes: By default, curl does not treat HTTP error codes (4xx or 5xx) as transfer errors [6][4]. To change this behavior so that curl returns an error code on HTTP failures, you must use --fail or --fail-with-body [6][4]. When using --fail, curl exits with exit code 22 for HTTP errors 400 and above [3][5]. The --fail-with-body option is similar but allows the response body (such as an error page) to be outputted before exiting with code 22 [1][4]. You can extract the specific HTTP response code received by using the --write-out option [6].
Citations:
- 1: https://man.archlinux.org/man/curl.1
- 2: https://manpages.debian.org/bookworm/curl/curl.1
- 3: https://man7.org/linux/man-pages/man1/curl.1.html
- 4: https://curl.se/docs/manpage.html
- 5: https://everything.curl.dev/cmdline/exitcode.html
- 6: https://everything.curl.dev/http/response.html
- 7: https://helpmanual.io/man1/curl/
Make the avatar download fail fast.
curl -sL follows redirects successfully even for HTTP 4xx/5xx responses and has no transfer timeout, so a bad or stalled avatar response can still keep the 120-minute release job active. Use --fail, retry/transient-error handling, connection/transfer timeouts, and check that /tmp/author.png exists and is non-empty before running cwebp.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/release-build.yml around lines 151 - 152, Update the
avatar download step in the release workflow to make curl fail on HTTP errors,
retry transient failures, and enforce connection and transfer timeouts. Before
invoking cwebp, validate that /tmp/author.png exists and is non-empty, and stop
the step with an error if validation fails.
Source: MCP tools
✅ Action performedReviews paused. |
Summary by CodeRabbit
New Features
Bug Fixes
Chores