chore: fix IDE warnings#4049
Conversation
BenchmarksBenchmark execution time: 2025-10-22 15:23:49 Comparing candidate commit c1fbd24 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics. |
|
/merge --skip-checks --reason="changes are good" |
|
View all feedbacks in Devflow UI.
This merge request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
This merge request will be merged without running the pre merge checks for of the following reason: changes are good.
Warning This change was merged without running any pre merge CI checks |
|
@codex review |
There was a problem hiding this comment.
💡 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 "@codex address that feedback".
| log.Warn("Fail to parse Agent URL: %s", urlErr.Err) | ||
| return | ||
| } | ||
| log.Warn("Fail to parse Agent URL") | ||
| log.Warn("Fail to parse Agent URL: %s", err.Error()) | ||
| return | ||
| } | ||
| log.Warn("Fail to parse Agent URL: %s", err.Error()) |
There was a problem hiding this comment.
Avoid logging unredacted Agent URL on parse failure
When WithAgentURL receives an invalid URL, the new branch logs err.Error() even after parsing fails (u == nil). url.Parse includes the original URL string in its error output (e.g. parse "http://user:pass@host:abc": invalid port), so this change will leak any embedded credentials or tokens into the application logs whenever a malformed agent URL is supplied. The previous implementation logged a generic message for this path specifically to avoid exposing secrets. Consider logging urlErr.Err or a sanitized message instead of the raw error.
Useful? React with 👍 / 👎.
What does this PR do?
Fixes some IDE warnings that are present in VSCode/Cursor.
Reviewer's Checklist
./scripts/lint.shlocally.Unsure? Have a question? Request a review!