Skip to content

Conversation

@HardMax71
Copy link
Owner

@HardMax71 HardMax71 commented Dec 31, 2025

Summary by CodeRabbit

  • Chores

    • Updated backend and frontend dependency versions and CI Node setup.
    • Improved CI with multi-image builds, per-image caching, local registry usage, explicit image tags, and Docker image caching.
    • Frontend build images switched to slimmer base and deterministic installs using lockfile-aware npm ci; CI compose now prefers prebuilt images.
  • Tests

    • Added automatic per-test E2E cleanup and improved test isolation.
    • Ensured DLQ tests run serially with unique IDs to avoid cross-worker conflicts.
    • Minor logging and assertion adjustments to reduce flakiness.
  • Documentation

    • Added and expanded "Build optimizations" and CI workflow guidance.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 31, 2025

Warning

Rate limit exceeded

@HardMax71 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 5 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3c25d2b and 7efb2a8.

📒 Files selected for processing (1)
  • frontend/Dockerfile
📝 Walkthrough

Walkthrough

Updates CI workflows to use multi-image Docker build/push with caching and setup-node v6; adds image fields to CI compose; bumps backend/frontend dependencies; introduces an autouse E2E DB+Redis cleanup fixture; reclassifies several tests to e2e and adds test reliability tweaks; documents CI build optimizations.

Changes

Cohort / File(s) Summary
GitHub Actions & CI compose
​.github/workflows/frontend-ci.yml, ​.github/workflows/backend-ci.yml, docker-compose.ci.yaml
Upgrade actions/setup-node v4→v6; CI uses per-image build/push/load steps, local registry caching, driver-opts, and explicit image fields in docker-compose.ci.yaml.
Dockerfiles & frontend build context
frontend/Dockerfile, frontend/Dockerfile.prod, frontend/.dockerignore
Switch to node:22-slim; replace npm install --ignore-scripts with npm ci; include package-lock.json in build context (removed from .dockerignore).
Backend dependencies & pytest markers
backend/pyproject.toml
Dependency bumps (e.g., fastapi, pydantic-avro, blinker, email-validator, importlib-resources) and addition of an e2e pytest marker.
Frontend devDependencies
frontend/package.json
Dev dependency version upgrades (Vitest, jsdom, Svelte/Vite plugin, CodeMirror, coverage tooling).
E2E test infra / cleanup fixture
backend/tests/e2e/conftest.py
New autouse _cleanup fixture: drops non-system Beanie collections, flushes Redis, and reinitializes Beanie before each E2E test.
Test reclassification & k8s tagging
backend/tests/e2e/test_execution_routes.py, backend/tests/e2e/test_k8s_worker_create_pod.py, backend/tests/e2e/test_resource_cleaner_*.py
Replace pytest.mark.integration with pytest.mark.e2e while preserving pytest.mark.k8s; minor whitespace/logger edits.
DLQ tests: uniqueness & serialization
backend/tests/integration/dlq/test_dlq_*.py
Add uuid suffix to execution_id values and pytest.mark.xdist_group("dlq") to force serial execution and avoid cross-worker collisions.
Race-condition relaxations & assertions
backend/tests/integration/services/test_rate_limit_service.py, backend/tests/integration/services/user_settings/test_user_settings_service.py
Remove pre-reset usage-stat check; assert post-reset empty. Relax cache_size assertion to >= 0 to tolerate transient self-invalidation.
Test logger renames (logging only)
backend/tests/integration/events/test_consumer_group_monitor_real.py, backend/tests/integration/events/test_consumer_lifecycle.py, backend/tests/integration/events/test_producer_roundtrip.py, backend/tests/integration/events/test_schema_registry_roundtrip.py
Rename logger identifiers (logging-only changes).
Docs
docs/operations/cicd.md
Add (duplicated) "Build optimizations" section describing Docker layer/image caching, reusable image cache action, frontend Dockerfile guidance, and updated workflow table.

Sequence Diagram(s)

(Skipped — changes are CI/build/test orchestration and do not introduce a new multi-component runtime control flow requiring a sequence diagram.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through CI and DBdust,
Cleared Redis paths and Beanie crust,
Images cached and locks held tight,
Tests now run cleaner through the night,
A carrot toast to builds done right! 🥕

Pre-merge checks

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'dependencies update' is vague and generic, using non-descriptive language that doesn't convey the specific nature of changes. While the PR does include dependency updates, it also encompasses substantial infrastructure changes (CI/CD workflows, Docker setup, test restructuring) that are not reflected in the title. Consider a more descriptive title that captures the primary change, such as 'Refactor CI/CD with local registry and update dependencies' or 'Update dependencies and optimize E2E test infrastructure', to better reflect the scope of changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Flag Coverage Δ
backend-e2e 52.18% <ø> (ø)
backend-integration 68.78% <ø> (-0.06%) ⬇️
backend-unit 52.93% <ø> (ø)
frontend 54.86% <ø> (-1.76%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 84 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 232759f and 38595a3.

⛔ Files ignored due to path filters (2)
  • backend/uv.lock is excluded by !**/*.lock
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .github/workflows/frontend-ci.yml
  • backend/pyproject.toml
  • frontend/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: E2E Tests
  • GitHub Check: Build Backend
  • GitHub Check: Build Frontend
  • GitHub Check: E2E Tests
  • GitHub Check: Integration Tests
🔇 Additional comments (8)
frontend/package.json (3)

24-24: LGTM!

Minor version bump for @codemirror/language is appropriate.


65-65: LGTM!

Minor version bump for @testing-library/svelte is appropriate.


61-61: Confirm @sveltejs/vite-plugin-svelte v6 compatibility with rollup setup.

The package v6 includes minor API changes (api.idFilter deprecation, preprocess fixes), but the codebase does not use affected APIs and the build relies on rollup, not vite. Verify the package is actively used in the build pipeline; if unused, consider removing it as a dependency.

backend/pyproject.toml (4)

19-19: LGTM!

Minor version bump for blinker is appropriate.


33-33: Package rename looks correct.

The change from email_validator to email-validator aligns with the official PyPI package name. The minor version bump (2.2.0 → 2.3.0) should be compatible.


49-49: Package rename looks correct.

The change from importlib_resources to importlib-resources aligns with the official PyPI package name. The minor version bump (6.4.5 → 6.5.2) should be compatible.


91-91: Verify pydantic-avro 0.9.1 compatibility before merging.

The version bump from 0.7.1 to 0.9.1 (skipping 0.8.x) may introduce breaking changes in 0.x releases. Test with your Pydantic and Avro usage to ensure compatibility.

.github/workflows/frontend-ci.yml (1)

26-26: The upgrade to actions/setup-node@v6 is compatible with the current configuration. While v5 introduced automatic caching with package-manager detection and v6 restricts this to npm projects, your workflow explicitly sets cache: 'npm', which works correctly with v6. No changes required.

"@testing-library/svelte": "^5.3.1",
"@testing-library/user-event": "^14.6.1",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/coverage-v8": "^4.0.16",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

vitest version 4 breaking changes migration guide

💡 Result:

Here’s a concise migration checklist for Vitest v3 → v4 with the main breaking changes and what to update.

Key breaking changes and actions

  • Read the official migration guide first. [1]
  • Browser Mode: providers are now separate packages (e.g., @vitest/browser-playwright). Import context/utilities from vitest/browser (old @vitest/browser/* paths are deprecated). Update config browser.provider shape (object or provider factory). Remove @vitest/browser if present. [1][2]
  • Mocking changes: vi.fn().getMockName() default name changed; vi.restoreAllMocks no longer resets automocks (affects restoreMocks); vi.spyOn on a mock returns the same mock; automocked instance methods isolation changed. Review tests/snapshots that rely on mock names or restoreAllMocks. [1]
  • Coverage: V8 coverage remapping changed (new AST-based remapper) — expect coverage diffs. Review coverage expectations. [1]
  • Removed/renamed internals and env vars: VITE_NODE_DEPS_MODULE_DIRECTORIES → VITEST_MODULE_DIRECTORIES; vitest/execute entrypoint removed; __vitest_executor replaced by injected moduleRunner; vite-node is no longer a dependency. Update any usage of those internals. [1]
  • Config / server changes: deps.optimizer.web → deps.optimizer.client (or custom names). Custom environments: use viteEnvironment instead of transformMode (or omit and rely on environment name). [1]
  • Reporters: 'basic' reporter removed (equivalent config shown in docs). Update custom reporters/types import paths (reporter exports changed). [1]
  • Public API and types: some exported types and APIs changed (Snapshot API internals, resolveConfig signature, workspace/test types, reporters typings). If using internal APIs or @vitest/snapshot directly, update code per migration notes. [4]
  • Other removals: vitest/execute removed; vite-node no longer bundled. Search your codebase for vitest internal entrypoints and replace per docs. [1][4]

Where to get the details (follow these links and search your codebase)

  • Official migration guide (primary reference). [1]
  • Vitest 4 release blog & changelog for full notes. [2][5]

If you want, I can:

  • run a quick grep-compatible list of likely code changes you need (e.g., imports to replace, env vars, reporter strings) and produce precise replacement commands for your repo. Which would you prefer?

Sources
[1] Vitest Migration Guide — vitest.dev/guide/migration.
[2] Vitest 4.0 release blog — vitest.dev/blog/vitest-4.
[3] News coverage / release summary (InfoQ / Progosling) for context.


🌐 Web query:

jsdom version 27 breaking changes

💡 Result:

Key breaking / notable changes in jsdom v27 (summary):

  • Minimum Node.js requirement raised to Node.js v20+. [1]. (github.com)
  • User-agent stylesheet now comes from the HTML Standard (not Chromium) — can change getComputedStyle() results. [2]. (newreleases.io)
  • VirtualConsole API changes: "jsdomError" events documented/changed; sendTo() renamed to forwardTo(); sendTo()/forwardTo() options changed (omitJSDOMErrors → jsdomErrors); failed XHR fetches no longer emit jsdomError. [3]. (newreleases.io)
  • Dependency changes with breaking effects:
    • upgraded tough-cookie: treats http://localhost/ as a secure context → Secure cookies for such URLs. [4]. (newreleases.io)
    • other dependency upgrades (CSS/CSSOM libraries) affecting CSS parsing/CSSOM behavior. [5]. (github.com)
  • Added/changed DOM/Window behavior: new event constructors (BeforeUnloadEvent, BlobEvent, PointerEvent, PromiseRejectionEvent, TransitionEvent, DeviceMotion/Orientation events), added movementX/movementY on MouseEvent, customElements.getName(), and changes to some property types on Window (more spec-conformant). These can affect code relying on previous shapes/absence. [6]. (code.usgs.gov)
  • Other smaller behavior fixes that may affect edge cases: input pattern flag changed (uses v flag), jsdom.reconfigure({ url }) baseURI fix, CSS color/gradient/display parsing fixes, ElementInternals accessibility getters fixed. [7]. (newreleases.io)

If you want, I can: (a) produce a migration checklist for your codebase (tests to run, likely breakpoints), or (b) fetch the exact changelog entries for any of the items above.

Citations:


🏁 Script executed:

# Check if there's a vitest config file and examine the test setup
fd -e "vitest\.config\." -e "vite\.config\." frontend/

# Check package.json for test script and other test-related config
head -100 frontend/package.json | grep -A 5 '"test"'

Repository: HardMax71/Integr8sCode

Length of output: 593


🏁 Script executed:

# Check for vitest config files with correct syntax
fd -e "config" frontend/ | grep -E "(vitest|vite)"

# Check package.json for Node.js version requirements
grep -E '"engines"|"node"' frontend/package.json

# Check for .nvmrc file
cat frontend/.nvmrc 2>/dev/null || echo "No .nvmrc found"

# Search for vi.fn, vi.spyOn, vi.restoreAllMocks in test files
fd -e "test.ts" -e "test.js" -e "spec.ts" -e "spec.js" frontend/ --exec grep -l "vi\.\(fn\|spyOn\|restoreAllMocks\)" {} \;

Repository: HardMax71/Integr8sCode

Length of output: 782


🏁 Script executed:

# Search for mock usage patterns that might be affected
rg "vi\.(fn|spyOn|restoreAllMocks|getMockName)" frontend/ --type ts --type js -c

Repository: HardMax71/Integr8sCode

Length of output: 940


🏁 Script executed:

# Check if there's a vitest.config or check vite.config for vitest settings
cat frontend/vitest.config.ts 2>/dev/null || cat frontend/vite.config.ts 2>/dev/null || echo "No config found - checking more broadly"

# Search for any vitest config reference
rg "vitest" frontend/vite.config.ts frontend/vitest.config.ts 2>/dev/null || echo "Checking directory listing..."

# List config files in frontend
ls -la frontend/*.config.* 2>/dev/null || echo "No config files found with .config.*"

Repository: HardMax71/Integr8sCode

Length of output: 1557


🏁 Script executed:

# Check Node.js version requirement
grep -A 2 -B 2 '"engines"' frontend/package.json

# Check vitest.setup.ts for any breaking patterns
cat -n frontend/vitest.setup.ts

# Sample a test file to see mock usage patterns
head -50 frontend/src/stores/__tests__/auth.test.ts

# Check for getMockName, restoreAllMocks usage
rg "getMockName|restoreAllMocks" frontend/

Repository: HardMax71/Integr8sCode

Length of output: 5353


🏁 Script executed:

# Check Node.js version requirement and full context
cat frontend/package.json | grep -A 5 '"engines"' || echo "No engines field"

# Check if package.json has Node version
head -20 frontend/package.json

Repository: HardMax71/Integr8sCode

Length of output: 643


🏁 Script executed:

# Get more context on vi.restoreAllMocks usage to assess impact
rg "restoreAllMocks" frontend/ -B 3 -A 1

Repository: HardMax71/Integr8sCode

Length of output: 1766


Verify and update tests for vitest v4 and jsdom v27 breaking changes.

Multiple major version bumps introduce breaking changes that affect this codebase:

vitest v4 migration issues:

  • vi.restoreAllMocks() no longer resets automocks in v4. This pattern is used in 5 test files that need review and likely fixes:

    • src/stores/__tests__/errorStore.test.ts
    • src/lib/__tests__/auth-init.test.ts
    • src/lib/__tests__/user-settings.test.ts
    • src/components/__tests__/ProtectedRoute.test.ts
    • src/components/__tests__/NotificationCenter.test.ts

    Replace with vi.clearAllMocks() or explicitly reset automocked modules per test needs.

  • v8 coverage remapping changed from old method to AST-based in v4. Coverage reports will differ—review and update any coverage baselines.

jsdom v27 migration issues:

  • User-agent stylesheet now comes from HTML Standard (not Chromium). This may change getComputedStyle() results in component tests. Review CSS assertions in test files for unexpected failures.

Run tests after these updates to ensure all assertions pass with the new behavior.

🤖 Prompt for AI Agents
In frontend/package.json around line 67, the project upgraded vitest to v4 and
jsdom to v27 which introduce breaking changes: update tests that call
vi.restoreAllMocks() (used in src/stores/__tests__/errorStore.test.ts,
src/lib/__tests__/auth-init.test.ts, src/lib/__tests__/user-settings.test.ts,
src/components/__tests__/ProtectedRoute.test.ts,
src/components/__tests__/NotificationCenter.test.ts) to use vi.clearAllMocks()
or explicitly reset automocked modules where automock behavior is required;
review and update any coverage baselines and tooling that expect the old v8
remapping approach to accommodate v4's AST-based coverage output; and inspect
component tests with getComputedStyle()/CSS assertions for differences caused by
jsdom v27’s user-agent stylesheet, adjusting assertions or test setup
accordingly, then run the full test suite and iterate until all tests pass.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
backend/tests/integration/services/test_rate_limit_service.py (1)

44-47: Consider retaining pre-reset stats verification or documenting the rationale.

Removing the pre-reset verification improves test stability by avoiding Redis timing issues, but it also reduces test coverage. The test no longer confirms that usage stats are properly tracked before reset—only that they're empty afterward. This could mask scenarios where stats tracking is completely broken.

Consider one of these approaches:

  • Add a brief retry loop with a small timeout to check stats before reset, tolerating timing delays
  • At minimum, add a comment or commit message explaining why pre-reset verification was removed (e.g., "Pre-reset stats check removed due to Redis propagation delays causing flaky failures")

</comment_end>

backend/tests/integration/dlq/test_dlq_retry_immediate.py (1)

35-36: Good fix for parallel test execution collisions.

The unique execution_id correctly prevents flaky test failures when tests run in parallel.

Consider leveraging the helper's built-in UUID generation by omitting the execution_id parameter entirely:

🔎 Optional simplification
-    # Use unique execution_id to avoid conflicts with parallel test workers
-    ev = make_execution_requested_event(execution_id=f"exec-dlq-retry-{uuid.uuid4().hex[:8]}")
+    # Unique execution_id generated by helper to avoid conflicts with parallel test workers
+    ev = make_execution_requested_event()

The helper function already generates f"exec-{uuid.uuid4().hex[:8]}" when no execution_id is provided. The current custom prefix (exec-dlq-retry-) may be useful for debugging, but using the helper's default reduces duplication and maintenance burden.

backend/tests/integration/dlq/test_dlq_discard_policy.py (1)

32-33: Good fix for parallel test execution collisions.

The unique execution_id correctly prevents flaky test failures when tests run in parallel.

Consider leveraging the helper's built-in UUID generation by omitting the execution_id parameter entirely:

🔎 Optional simplification
-    # Use unique execution_id to avoid conflicts with parallel test workers
-    ev = make_execution_requested_event(execution_id=f"exec-dlq-discard-{uuid.uuid4().hex[:8]}")
+    # Unique execution_id generated by helper to avoid conflicts with parallel test workers
+    ev = make_execution_requested_event()

The helper function already generates f"exec-{uuid.uuid4().hex[:8]}" when no execution_id is provided. The current custom prefix (exec-dlq-discard-) may be useful for debugging, but using the helper's default reduces duplication and maintenance burden.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3a1fd06 and e299550.

📒 Files selected for processing (3)
  • backend/tests/integration/dlq/test_dlq_discard_policy.py
  • backend/tests/integration/dlq/test_dlq_retry_immediate.py
  • backend/tests/integration/services/test_rate_limit_service.py
🧰 Additional context used
🧬 Code graph analysis (1)
backend/tests/integration/dlq/test_dlq_retry_immediate.py (2)
backend/tests/unit/services/coordinator/test_queue_manager.py (1)
  • ev (11-12)
backend/tests/helpers/events.py (1)
  • make_execution_requested_event (8-50)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: E2E Tests
  • GitHub Check: Integration Tests
  • GitHub Check: E2E Tests
🔇 Additional comments (2)
backend/tests/integration/dlq/test_dlq_retry_immediate.py (1)

5-5: Import added to support unique test IDs.

The uuid import is correctly added to generate unique execution IDs for preventing test collisions.

backend/tests/integration/dlq/test_dlq_discard_policy.py (1)

5-5: Import added to support unique test IDs.

The uuid import is correctly added to generate unique execution IDs for preventing test collisions.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
backend/tests/integration/services/user_settings/test_user_settings_service.py (1)

45-46: Acknowledge the race condition fix, but consider strengthening the test assertion.

The change successfully addresses test flakiness by accounting for the async event bus invalidation. However, the assertion is now quite weak—it only verifies that cache_size exists and is non-negative, which provides minimal validation of cache behavior.

Consider these alternatives for a more robust test:

  • Check cache stats immediately after the initial get_user_settings calls (lines 21-22) before any invalidating operations
  • Add explicit synchronization with the event bus before checking stats
  • Split this into separate tests: one for cache behavior (with deterministic state) and one for update operations
Example: Check cache state at a deterministic point
     s1 = await svc.get_user_settings(user_id)
     s2 = await svc.get_user_settings(user_id)
     assert s1.user_id == s2.user_id
+    # Verify cache is populated before any invalidating operations
+    early_stats = svc.get_cache_stats()
+    assert early_stats["cache_size"] >= 1, "Cache should contain at least the user_id entry"
     await svc.invalidate_cache(user_id)
backend/tests/e2e/test_resource_cleaner_k8s.py (1)

44-55: Timing assertion may be too lenient.

The test asserts that cleanup of a non-existent pod completes in under 5 seconds (line 55), but the timeout parameter is also 5 seconds (line 50). This makes the assertion less meaningful—it essentially only catches cases where the operation times out completely.

To better verify that cleanup is "quick" for non-existent resources, consider using a more stringent threshold like 1-2 seconds.

🔎 Suggested improvement
-    assert elapsed < 5, f"Cleanup took {elapsed}s, should be quick for non-existent resources"
+    assert elapsed < 2, f"Cleanup took {elapsed}s, should be quick for non-existent resources"
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e299550 and fc4b527.

📒 Files selected for processing (17)
  • .github/workflows/backend-ci.yml
  • backend/pyproject.toml
  • backend/tests/e2e/__init__.py
  • backend/tests/e2e/conftest.py
  • backend/tests/e2e/test_execution_routes.py
  • backend/tests/e2e/test_k8s_worker_create_pod.py
  • backend/tests/e2e/test_resource_cleaner_k8s.py
  • backend/tests/e2e/test_resource_cleaner_orphan.py
  • backend/tests/integration/events/test_consumer_group_monitor_real.py
  • backend/tests/integration/events/test_consumer_lifecycle.py
  • backend/tests/integration/events/test_producer_roundtrip.py
  • backend/tests/integration/events/test_schema_registry_roundtrip.py
  • backend/tests/integration/services/idempotency/test_redis_repository.py
  • backend/tests/integration/services/notifications/test_notification_service.py
  • backend/tests/integration/services/replay/test_replay_service.py
  • backend/tests/integration/services/sse/test_partitioned_event_router.py
  • backend/tests/integration/services/user_settings/test_user_settings_service.py
✅ Files skipped from review due to trivial changes (3)
  • backend/tests/e2e/test_execution_routes.py
  • backend/tests/integration/events/test_schema_registry_roundtrip.py
  • backend/tests/integration/events/test_producer_roundtrip.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • backend/pyproject.toml
🧰 Additional context used
🧬 Code graph analysis (2)
backend/tests/e2e/conftest.py (1)
backend/tests/conftest.py (3)
  • app (130-149)
  • db (189-191)
  • redis_client (195-197)
backend/tests/e2e/test_resource_cleaner_k8s.py (1)
backend/app/services/result_processor/resource_cleaner.py (1)
  • get_resource_usage (226-286)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Trivy
  • GitHub Check: Scan Backend
  • GitHub Check: Scan Frontend
  • GitHub Check: E2E Tests
  • GitHub Check: Integration Tests
  • GitHub Check: E2E Tests
🔇 Additional comments (8)
backend/tests/integration/events/test_consumer_lifecycle.py (1)

10-10: LGTM! Logger name is more descriptive.

The logger name now aligns better with the file name and test purpose, improving clarity without any functional changes.

backend/tests/integration/events/test_consumer_group_monitor_real.py (1)

13-13: LGTM! Logger name better reflects the test nature.

The rename from "e2e" to "real" more accurately describes this as an integration test against real infrastructure, maintaining consistency with the broader logger naming updates across the PR.

backend/tests/e2e/test_k8s_worker_create_pod.py (1)

16-16: LGTM! Test reclassification is appropriate.

The marker change from integration to e2e correctly reflects that this test interacts with actual Kubernetes resources, making it an end-to-end test rather than an integration test.

backend/tests/e2e/test_resource_cleaner_orphan.py (2)

11-11: LGTM! Consistent reclassification.

The marker change aligns with the PR's goal of reclassifying Kubernetes tests as end-to-end tests.


13-13: Good improvement to logger naming.

The logger name now reflects the specific test focus (orphan resources) rather than a generic "integration" label, improving log clarity.

backend/tests/e2e/conftest.py (1)

9-30: Well-designed E2E test isolation strategy.

The autouse fixture provides clean state before each test while avoiding event loop issues by skipping post-test cleanup. The implementation correctly:

  • Drops non-system collections to avoid test interference
  • Safely uses flushdb() (each pytest-xdist worker has its own Redis DB)
  • Reinitializes Beanie to ensure document models are registered

The pre-test-only cleanup is a pragmatic solution for SSE/streaming tests that hold connections across event loop boundaries.

backend/tests/e2e/test_resource_cleaner_k8s.py (1)

10-10: LGTM! Consistent marker update.

The reclassification to e2e is appropriate for tests that interact with Kubernetes resources.

.github/workflows/backend-ci.yml (1)

192-192: Test path reorganization is correctly implemented.

The change from tests/integration/k8s to tests/e2e properly reflects the test suite reorganization. The workflow correctly sets the working directory to backend before running pytest, ensuring the tests/e2e path resolves correctly. All K8s-related tests have been successfully migrated to the e2e directory, and the old tests/integration/k8s path has been removed with no dangling references.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
backend/tests/integration/dlq/test_dlq_manager.py (1)

31-31: Inconsistent execution_id strategy across DLQ tests.

While test_dlq_retry_immediate.py was updated to use UUID-based execution IDs (line 39), this test still uses a static "exec-dlq-1". Although the xdist_group marker provides serial execution, using unique IDs offers defense-in-depth against test flakiness. Consider omitting the execution_id parameter entirely to leverage the helper's automatic UUID generation.

🔎 Proposed fix for consistency
-    ev = make_execution_requested_event(execution_id="exec-dlq-1")
+    # Let helper generate unique execution_id to avoid conflicts
+    ev = make_execution_requested_event()
🧹 Nitpick comments (1)
backend/tests/integration/dlq/test_dlq_retry_immediate.py (1)

5-5: Simplify by leveraging the helper's UUID generation.

While the UUID-based execution_id correctly prevents conflicts, the make_execution_requested_event helper already generates unique IDs when execution_id is omitted (see backend/tests/helpers/events.py lines 24-25). Consider removing the explicit execution_id parameter to reduce duplication.

🔎 Proposed simplification
-import uuid
 from datetime import datetime, timezone
-    # Use unique execution_id to avoid conflicts with parallel test workers
-    ev = make_execution_requested_event(execution_id=f"exec-dlq-retry-{uuid.uuid4().hex[:8]}")
+    # Let helper generate unique execution_id to avoid conflicts with parallel test workers
+    ev = make_execution_requested_event()

Also applies to: 38-39

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc4b527 and c2ecf80.

📒 Files selected for processing (3)
  • backend/tests/integration/dlq/test_dlq_discard_policy.py
  • backend/tests/integration/dlq/test_dlq_manager.py
  • backend/tests/integration/dlq/test_dlq_retry_immediate.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • backend/tests/integration/dlq/test_dlq_discard_policy.py
🧰 Additional context used
🧬 Code graph analysis (1)
backend/tests/integration/dlq/test_dlq_retry_immediate.py (1)
backend/tests/helpers/events.py (1)
  • make_execution_requested_event (8-50)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: E2E Tests
  • GitHub Check: Integration Tests
  • GitHub Check: E2E Tests
🔇 Additional comments (2)
backend/tests/integration/dlq/test_dlq_retry_immediate.py (1)

19-22: LGTM! Clear explanation for serial execution.

The xdist_group marker correctly prevents cross-worker interference when tests share Kafka consumer groups. The explanatory comment clearly documents the reasoning.

backend/tests/integration/dlq/test_dlq_manager.py (1)

17-20: LGTM! Consistent grouping strategy.

The xdist_group marker and explanatory comment match the approach in test_dlq_retry_immediate.py, ensuring DLQ tests run serially to prevent consumer group conflicts.

- node22 -> node22:slim
- npm install -> npm ci
- added caching via build-push-actoin
@sonarqubecloud
Copy link

@HardMax71 HardMax71 merged commit 258761b into main Dec 31, 2025
19 checks passed
@HardMax71 HardMax71 deleted the e2e_and_deps_updates branch December 31, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants