plugin test reliability and stabilization#95
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
📝 WalkthroughWalkthroughWires CI and local scripts to new Weblate stack helpers (compose --wait, API ping, token retry), exposes HEALTH_TIMEOUT and PYTEST_PLUGIN_OPTS, adds pytest-rerunfailures and a ChangesPlugin Test Resilience Configuration
Sequence DiagramsequenceDiagram
participant CI as CI Workflow
participant Script as Test Script
participant StackHelper as Weblate Stack Helper
participant Pytest as Pytest
CI->>Script: set HEALTH_TIMEOUT env var
Script->>StackHelper: call stack_up() / stack_wait_healthy(HEALTH_TIMEOUT)
StackHelper->>StackHelper: wait for docker compose healthchecks
Script->>StackHelper: call stack_wait_api_ready()
StackHelper->>StackHelper: poll /boost-endpoint/plugin-ping/
Script->>StackHelper: call stack_create_token_retry(admin)
StackHelper->>StackHelper: retry token creation until non-empty
Script->>Pytest: set PYTEST_PLUGIN_OPTS and invoke pytest with --override-ini addopts
Pytest->>Pytest: run tests with timeouts/reruns and collection ordering
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/lib/weblate-stack.sh (1)
49-50: ⚡ Quick winMake API readiness polling tunable via env defaults.
Line 49 and Line 50 are only configurable through positional args today. Adding env fallbacks makes CI/local tuning possible without touching callers, which helps stabilize slow runners.
♻️ Proposed change
stack_wait_api_ready() { local port="${WEBLATE_PORT:-8080}" local url="http://localhost:${port}/boost-endpoint/plugin-ping/" - local attempts="${1:-12}" - local interval="${2:-5}" + local attempts="${1:-${API_READY_ATTEMPTS:-12}}" + local interval="${2:-${API_READY_INTERVAL:-5}}" local i=0🤖 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 `@scripts/lib/weblate-stack.sh` around lines 49 - 50, The script currently sets local variables attempts and interval only from positional args (local attempts="${1:-12}" and local interval="${2:-5}"), making CI tuning awkward; change these to prefer positional args, then environment variables, then defaults (e.g., attempts = first param || $ATTEMPTS || 12, interval = second param || $INTERVAL || 5) so callers remain compatible while allowing env-based overrides for CI/local tuning; update the variable assignments in scripts/lib/weblate-stack.sh accordingly.
🤖 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.
Nitpick comments:
In `@scripts/lib/weblate-stack.sh`:
- Around line 49-50: The script currently sets local variables attempts and
interval only from positional args (local attempts="${1:-12}" and local
interval="${2:-5}"), making CI tuning awkward; change these to prefer positional
args, then environment variables, then defaults (e.g., attempts = first param ||
$ATTEMPTS || 12, interval = second param || $INTERVAL || 5) so callers remain
compatible while allowing env-based overrides for CI/local tuning; update the
variable assignments in scripts/lib/weblate-stack.sh accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3447f129-ea91-409a-b7dd-25df88a33803
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (13)
.github/README.md.github/workflows/ci-plugin-auth.yml.github/workflows/ci-plugin-functional.yml.github/workflows/ci-plugin-smoke.ymlpyproject.tomlscripts/README.mdscripts/lib/weblate-stack.shscripts/plugin-auth.shscripts/plugin-functional.shscripts/plugin-smoke.shtests/plugin/conftest.pytests/plugin/test_functional.pytests/plugin/test_rate_limit.py
|
@coderabbitai, resume. |
|
✅ Action performedReviews resumed. |
|
@coderabbitai, full review again. |
|
✅ Action performedFull review finished. |
|
@coderabbitai, resume |
|
✅ Action performedReviews resumed. |
Close #84, close #85.
Summary by CodeRabbit
Documentation
Tests
Chores
Dependencies