Repository navigation
refactor: format log messages lazily with %s arguments and enable ruff G004 - #1234
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1234 +/- ##
=======================================
Coverage 93.81% 93.81%
=======================================
Files 54 54
Lines 3800 3800
=======================================
Hits 3565 3565
Misses 235 235
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
apify-factory
left a comment
There was a problem hiding this comment.
Looks good, nothing blocking.
🏭 Factory review — ℹ️ not auto-approved
This change was reviewed but cannot be auto-approved: a gate failed, so the review cannot end in an approval.
| check | result |
|---|---|
| Static gates | ❌ 13/16 — max-files, file-extensions, deny-globs |
| Review findings | ✅ none |
| Reviewer escalation | ✅ none |
Juror 1 — claude-sonnet-5-5, adversarial |
⏭️ skipped — a gate failed |
Why it was not auto-approved
Failed gates:
max-files: 20 changed files, limit 10file-extensions: disallowed extension: pyproject.tomldeny-globs: src/apify/_charging.py matches src/apify/_charging.py
The comments above are the review itself; this section only explains the approval decision. Push a change and request @apify-factory again to re-run it, or ask a human to review.
Reviewed cb4ee7621 · workflow run
|
e2e fail because of new version of w3lib (transitive dependency), will be resolved in #1235 |
…ile with uv (#1235) The E2E test Actors installed unpinned dependencies, so a new upstream release could break every open PR at once. `w3lib` 2.6.0 did that (for example on #1234). - Install the E2E test Actor dependencies with uv, pinned to the project's `uv.lock`. - Build the Actor image in two stages: the builder installs the SDK from source with its dependencies into a virtual environment, and the runner copies it over. The Playwright image works the same way. - Pass the Python version to the build as a required `PYTHON_VERSION` build argument. - Rename the test Actor package from `src` to `actor`. - Run the E2E tests on Python 3.11 and 3.15. - Make the Scrapy E2E test pass with both `w3lib` 2.5.0 and 2.6.0. - Drop the unused `build` dev dependency. *✍️ Drafted by Claude Code*
Logging calls now pass their values as
%-style arguments instead of f-strings, so the message is only formatted when a handler actually emits the record. This also gives log aggregators a stablerecord.msgtemplate to group by. Ruff'sG004is removed from the ignore list so new f-string log calls fail lint.The rendered messages are the same as before. One unit test compared
record.msgagainst the formatted text and now usesrecord.getMessage().✍️ Drafted by Claude Code