-
-
Notifications
You must be signed in to change notification settings - Fork 92
[engine] Add batch timeout property #6162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[engine] Add batch timeout property #6162
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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. Comment |
There was a problem hiding this 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
📒 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 toDEFAULT_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.
55f5a3b
to
3b094b0
Compare
3b094b0
to
64e8598
Compare
64e8598
to
3261931
Compare
Summary by CodeRabbit
New Features
Documentation