+
Skip to content

Conversation

abudevich
Copy link
Contributor

@abudevich abudevich commented Sep 30, 2025

Summary by CodeRabbit

  • New Features

    • Added batch execution timeout configuration at both global and per-batch levels (default 10 hours), overridable by batch settings.
    • Applied run timeout in execution to respect the configured batch timeout, with sensible defaults when unspecified.
  • Documentation

    • Updated test configuration docs to describe new batch-level and global execution timeout properties and their override behavior.
    • Clarified that per-story timeouts remain unchanged.
    • Added a note that profiles load sequentially, similar to suites.

@abudevich abudevich requested a review from a team as a code owner September 30, 2025 10:46
Copy link

coderabbitai bot commented Sep 30, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds a batch-level execution timeout configuration, wires its defaulting and injection into BatchStorage, exposes it via BatchConfiguration, and applies it to embedder controls as run timeout. Documentation updated to describe new properties and profile-loading note. Spring wiring extended to pass the new timeout to BatchStorage.

Changes

Cohort / File(s) Summary of Changes
Documentation updates
docs/modules/configuration/pages/tests-configuration.adoc
Documents new batch-level execution timeout properties: batch.execution-timeout and batch-<batch-number>.execution-timeout (default PT10H); clarifies override semantics; minor note about profile load sequence.
Batch timeout plumbing
vividus-engine/src/main/java/org/vividus/batch/BatchConfiguration.java, vividus-engine/src/main/java/org/vividus/batch/BatchStorage.java, vividus-engine/src/main/resources/org/vividus/engine/spring.xml
BatchConfiguration: adds Duration executionTimeout with getter/setter. BatchStorage: adds default batch timeout field, updates constructor to accept it, applies defaulting during configuration creation. Spring: adds batch.execution-timeout constructor-arg (Duration) to batchStorage bean.
Embedder control application
vividus-engine/src/main/java/org/vividus/BatchedEmbedder.java
Sets embedder run timeout from batchConfiguration.getExecutionTimeout().toSeconds() alongside existing story timeout.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Spring as Spring Context
  participant Storage as BatchStorage
  participant Config as BatchConfiguration
  participant Runner as BatchedEmbedder
  participant Embedder as EmbedderControls

  User->>Spring: Start
  Spring->>Storage: Construct with defaults<br/>(story timeout, batch execution timeout)
  User->>Storage: Request batch config(s)
  Storage->>Config: Create/augment BatchConfiguration<br/>set executionTimeout (default if missing)
  Storage-->>User: BatchConfiguration(s)

  User->>Runner: Execute batch with Config
  Runner->>Embedder: setRunTimeout(Config.executionTimeout.toSeconds)
  Runner->>Embedder: setStoryTimeouts(Config.storyExecutionTimeout.toSeconds)
  Runner->>Embedder: run stories
  Embedder-->>Runner: Completion/timeout
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I twitch my whiskers at ticking clocks,
A batch now knows when timebox knocks.
From springy wires to storage burrow,
The timeout’s set—no guess, no furrow.
Embedder runs, then hops back home—
Ten hours max, then off I roam. 🐇⏳

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "[engine] Add batch timeout property" succinctly and accurately summarizes the primary change of introducing a batch-level execution timeout configuration in the engine, matching the core additions to configuration, code, and documentation.

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.

@abudevich abudevich marked this pull request as draft September 30, 2025 10:47
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: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ef4b6fd and 55f5a3b.

📒 Files selected for processing (5)
  • docs/modules/configuration/pages/tests-configuration.adoc (2 hunks)
  • vividus-engine/src/main/java/org/vividus/BatchedEmbedder.java (1 hunks)
  • vividus-engine/src/main/java/org/vividus/batch/BatchConfiguration.java (3 hunks)
  • vividus-engine/src/main/java/org/vividus/batch/BatchStorage.java (4 hunks)
  • vividus-engine/src/main/resources/org/vividus/engine/spring.xml (1 hunks)
⏰ 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: build (windows-latest)
  • GitHub Check: build (macos-latest)
  • GitHub Check: system-kafka-tests
🔇 Additional comments (10)
vividus-engine/src/main/resources/org/vividus/engine/spring.xml (1)

17-17: LGTM! Constructor argument order aligns with BatchStorage.

The new constructor argument for batch execution timeout is correctly positioned and typed. The default value pattern #{null} is consistent with the existing story timeout configuration.

vividus-engine/src/main/java/org/vividus/batch/BatchConfiguration.java (2)

36-36: LGTM!

The new executionTimeout field follows the existing pattern for duration-based configuration properties.


126-134: LGTM!

The getter and setter methods follow standard JavaBean conventions and are consistent with other timeout properties in the class.

vividus-engine/src/main/java/org/vividus/batch/BatchStorage.java (6)

41-41: LGTM!

The default batch timeout constant of 10 hours is reasonable and matches the documented default value in the configuration documentation.


45-45: LGTM!

The new field follows the existing pattern for default timeout configuration.


49-52: LGTM! Constructor signature extended correctly.

The new defaultBatchExecutionTimeout parameter is properly positioned and maintains consistency with the existing timeout parameter handling.


69-70: LGTM!

The initialization pattern with Optional.ofNullable and fallback to DEFAULT_BATCH_TIMEOUT ensures the field is never null and is consistent with the story timeout initialization.


90-93: LGTM!

The null check and default assignment ensure all batch configurations have an execution timeout set, following the same pattern as story timeout handling.


123-123: LGTM!

Setting the execution timeout for dynamically created configurations ensures consistency across all batch configurations, whether loaded from properties or created on-the-fly.

vividus-engine/src/main/java/org/vividus/BatchedEmbedder.java (1)

167-167: No null-safety issues detected. batchConfiguration.getExecutionTimeout() is default-initialized in BatchStorage (lines 90–93), so it cannot be null. LGTM.

@abudevich abudevich force-pushed the batch-timeout-property branch from 55f5a3b to 3b094b0 Compare September 30, 2025 11:02
@abudevich abudevich force-pushed the batch-timeout-property branch from 3b094b0 to 64e8598 Compare October 7, 2025 10:33
@abudevich abudevich force-pushed the batch-timeout-property branch from 64e8598 to 3261931 Compare October 9, 2025 08:16
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.

1 participant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载