Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1ac9c23
fix: use 127.0.0.1 instead of localhost for temporal address
xepozz Jan 29, 2026
df00dd9
fix: upgrade symfony/process lowest version to 5.4.51
xepozz Jan 29, 2026
d4f381e
test: handle non-zero exit codes when tests succeed
xepozz Jan 29, 2026
47d5107
test: add test runner
xepozz Jan 29, 2026
414cc4f
test: windows suitable path
xepozz Jan 29, 2026
850e016
test: pass php exucutable
xepozz Jan 29, 2026
6ca7592
test: fix xml element access
xepozz Jan 29, 2026
ff10ea9
test: use PHP_BINARY for passing php executable to passthru command
xepozz Jan 29, 2026
fcdda5f
Merge branch 'refs/heads/handle-exit-codes' into err2
xepozz Jan 29, 2026
f059e4a
test: rename file, add shebang
xepozz Jan 29, 2026
83175f1
test: optimize deployment test by adding direct ip address
xepozz Jan 29, 2026
cdb9673
refactor: re-use common temporal address in tests
xepozz Jan 29, 2026
8c59ed0
ci: fix test runner
xepozz Jan 29, 2026
5313f83
refactor: decompose stop method
xepozz Jan 29, 2026
31f3a35
test: dump more info when fail
xepozz Jan 29, 2026
a6155f9
test: pass ip when starting Temporal
xepozz Jan 29, 2026
64afd30
Merge branch 'master' into err4
xepozz Jan 29, 2026
c8bc933
test: await for temporal server health check
xepozz Jan 29, 2026
3df53ba
fix: exit from code directly
xepozz Jan 29, 2026
ef8e4c9
fix: restart RoadRunner with Temporal
xepozz Jan 29, 2026
4bcbfc4
fix: adjust rr error message
xepozz Jan 29, 2026
8c54b1e
fix: dont dump memo
xepozz Jan 29, 2026
43195fe
fix: improve error logging and process serialization
xepozz Jan 29, 2026
769260f
fix: comment out unused searchAttributes
xepozz Jan 29, 2026
b3a35a1
style(php-cs-fixer): fix coding standards
Jan 29, 2026
102bee6
fix: resetting state
xepozz Jan 29, 2026
3757e93
Merge remote-tracking branch 'origin/err4' into err4
xepozz Jan 29, 2026
9321ff6
fix: set workers number
xepozz Jan 30, 2026
85f6efb
fix: rewrite worker test
xepozz Jan 30, 2026
548f809
fix: rewrite roadrunner starter
xepozz Jan 30, 2026
7df793d
feat: remove redundant getCommandLineArguments method
xepozz Jan 30, 2026
f1fd569
fix: add missing command argument
xepozz Jan 30, 2026
2696e21
fix: use our own output style
xepozz Jan 30, 2026
c2d8e22
fix: pass address to healthcheck command
xepozz Jan 30, 2026
4afef55
style(php-cs-fixer): fix coding standards
Jan 30, 2026
81b6e15
fix: trigger ci
xepozz Jan 30, 2026
d0c71b1
fix: disable xdebug
xepozz Jan 30, 2026
a3fe266
fix: remove checks
xepozz Jan 30, 2026
b85e5b9
Merge branch 'master' into err2
xepozz Feb 5, 2026
aa07d2a
Merge branch 'master' into err2
xepozz Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/run-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ jobs:

- name: Run tests
run: ${{ inputs.test-command }}
env:
XDEBUG_MODE: off

- name: Check for failures
if: steps.validate.outcome == 'failure'
Expand Down
25 changes: 25 additions & 0 deletions src/Workflow/WorkflowExecutionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,29 @@ public function __construct(
*/
public readonly string $firstRunId,
) {}

public function __debugInfo(): array
{
return [
'execution' => $this->execution,
'type' => $this->type,
'startTime' => $this->startTime,
'closeTime' => $this->closeTime,
'status' => $this->status,
'historyLength' => $this->historyLength,
'parentNamespaceId' => $this->parentNamespaceId,
'parentExecution' => $this->parentExecution,
'executionTime' => $this->executionTime,
// 'memo' => $this->memo,
// 'searchAttributes' => $this->searchAttributes,
'autoResetPoints' => $this->autoResetPoints,
'taskQueue' => $this->taskQueue,
'stateTransitionCount' => $this->stateTransitionCount,
'historySizeBytes' => $this->historySizeBytes,
'mostRecentWorkerVersionStamp' => $this->mostRecentWorkerVersionStamp,
'executionDuration' => $this->executionDuration,
'rootExecution' => $this->rootExecution,
'firstRunId' => $this->firstRunId,
];
}
}
4 changes: 2 additions & 2 deletions testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ workflow has a timer, the server doesn't wait for it and continues immediately.
this behaviour you can use `TestService` class:

```php
$testService = TestService::create('localhost:7233');
$testService = TestService::create('127.0.0.1:7233');
$testService->lockTimeSkipping();

// ...
Expand Down Expand Up @@ -217,7 +217,7 @@ final class SimpleWorkflowTestCase extends TestCase

protected function setUp(): void
{
$this->workflowClient = new WorkflowClient(ServiceClient::create('localhost:7233'));
$this->workflowClient = new WorkflowClient(ServiceClient::create('127.0.0.1:7233'));
$this->activityMocks = new ActivityMocker();

parent::setUp();
Expand Down
76 changes: 37 additions & 39 deletions testing/src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ final class Command
/** @var non-empty-string|null Temporal Namespace */
public ?string $namespace = null;

/** @var non-empty-string|null Temporal Address */
public ?string $address = null;
/**
* @var non-empty-string Temporal Address
*/
public string $address;

/** @var non-empty-string|null */
public ?string $tlsKey = null;
Expand All @@ -20,12 +22,17 @@ final class Command

private array $xdebug;

public function __construct(
string $address,
) {
$this->address = $address;
}

public static function fromEnv(): self
{
$self = new self();
$self = new self(\getenv('TEMPORAL_ADDRESS') ?: '127.0.0.1:7233');

$self->namespace = \getenv('TEMPORAL_NAMESPACE') ?: 'default';
$self->address = \getenv('TEMPORAL_ADDRESS') ?: 'localhost:7233';
$self->xdebug = [
'xdebug.mode' => \ini_get('xdebug.mode'),
'xdebug.start_with_request' => \ini_get('xdebug.start_with_request'),
Expand All @@ -42,46 +49,37 @@ public static function fromEnv(): self
*/
public static function fromCommandLine(array $argv): self
{
$self = new self();

\array_shift($argv); // remove the script name (worker.php or runner.php)
foreach ($argv as $chunk) {
if (\str_starts_with($chunk, 'namespace=')) {
$self->namespace = \substr($chunk, 10);
continue;
}

if (\str_starts_with($chunk, 'address=')) {
$self->address = \substr($chunk, 8);
continue;
}

if (\str_starts_with($chunk, 'tls.cert=')) {
$self->tlsCert = \substr($chunk, 9);
continue;
}

if (\str_starts_with($chunk, 'tls.key=')) {
$self->tlsKey = \substr($chunk, 8);
continue;
$address = '';
$namespace = '';
$tlsCert = '';
$tlsKey = '';

// remove the script name (worker.php or runner.php)
$chunks = \array_slice($argv, 1);
foreach ($chunks as $chunk) {
switch (true) {
case \str_starts_with($chunk, 'namespace='):
$namespace = \substr($chunk, 10);
break;
case \str_starts_with($chunk, 'address='):
$address = \substr($chunk, 8);
break;
case \str_starts_with($chunk, 'tls.cert='):
$tlsCert = \substr($chunk, 9);
break;
case \str_starts_with($chunk, 'tls.key='):
$tlsKey = \substr($chunk, 8);
break;
}
}

return $self;
}
$self = new self($address);

/**
* @return list<non-empty-string> CLI arguments that can be parsed by `fromCommandLine`
*/
public function getCommandLineArguments(): array
{
$result = [];
$this->namespace === null or $result[] = "namespace=$this->namespace";
$this->address === null or $result[] = "address=$this->address";
$this->tlsCert === null or $result[] = "tls.cert=$this->tlsCert";
$this->tlsKey === null or $result[] = "tls.key=$this->tlsKey";
$self->namespace = $namespace;
$self->tlsCert = $tlsCert;
$self->tlsKey = $tlsKey;

return $result;
return $self;
}

public function getPhpBinaryArguments(): array
Expand Down
Loading
Loading