-
-
Notifications
You must be signed in to change notification settings - Fork 2
fix: UTC DateTime + remove dead compensation code #38
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,6 @@ | |
| * - **Configuration**: Step-specific parameters and settings | ||
| * - **Resilience**: Timeout and retry configuration for robust execution | ||
| * - **Conditional Logic**: Support for conditional step execution | ||
| * - **Compensation**: Rollback actions for error scenarios | ||
| * | ||
| * ## Usage Examples | ||
| * | ||
|
|
@@ -62,7 +61,6 @@ class Step | |
| * @param array<string, mixed> $config Step-specific configuration parameters | ||
| * @param string|null $timeout Maximum execution time (in seconds as string) | ||
| * @param int $retryAttempts Number of retry attempts on failure (0-10) | ||
| * @param string|null $compensationAction Action class for rollback scenarios | ||
| * @param array<string> $conditions Array of condition expressions for conditional execution | ||
| * @param array<string> $prerequisites Array of prerequisite step IDs that must complete first | ||
| */ | ||
|
|
@@ -72,7 +70,6 @@ public function __construct( | |
| private readonly array $config = [], | ||
| private readonly ?string $timeout = null, | ||
| private readonly int $retryAttempts = 0, | ||
| private readonly ?string $compensationAction = null, | ||
| private readonly array $conditions = [], | ||
| private readonly array $prerequisites = [] | ||
|
Comment on lines
71
to
74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This constructor change removes the Useful? React with 👍 / 👎. |
||
| ) {} | ||
|
|
@@ -127,16 +124,6 @@ public function getRetryAttempts(): int | |
| return $this->retryAttempts; | ||
| } | ||
|
|
||
| /** | ||
| * Get the compensation action class for rollback scenarios. | ||
| * | ||
| * @return string|null Compensation action class name, or null if none | ||
| */ | ||
| public function getCompensationAction(): ?string | ||
| { | ||
| return $this->compensationAction; | ||
| } | ||
|
|
||
| /** | ||
| * Get the conditional expressions for this step. | ||
| * | ||
|
|
@@ -167,16 +154,6 @@ public function hasAction(): bool | |
| return $this->actionClass !== null; | ||
| } | ||
|
|
||
| /** | ||
| * Check if this step has a compensation action for rollback. | ||
| * | ||
| * @return bool True if a compensation action is defined | ||
| */ | ||
| public function hasCompensation(): bool | ||
| { | ||
| return $this->compensationAction !== null; | ||
| } | ||
|
|
||
| /** | ||
| * Determine if this step can execute based on its conditions. | ||
| * | ||
|
|
@@ -244,7 +221,6 @@ public function toArray(): array | |
| 'config' => $this->config, | ||
| 'timeout' => $this->timeout, | ||
| 'retry_attempts' => $this->retryAttempts, | ||
| 'compensation' => $this->compensationAction, | ||
| 'conditions' => $this->conditions, | ||
| 'prerequisites' => $this->prerequisites, | ||
| ]; | ||
|
|
||
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.
logged_atis now forced to UTC, but the same log entry still includes$context->toArray()whereexecuted_atcomes fromWorkflowContext’s default process timezone and is formatted without an offset. On hosts not set to UTC, one record can contain mismatched clock bases, making event ordering and debugging unreliable. Consider deriving both fields from the same timezone-normalized source (or normalizingWorkflowContextserialization to UTC ISO-8601).Useful? React with 👍 / 👎.