Skip to content

chore(magento): integration base for #754, not for main - #1002

Draft
gplanchat wants to merge 73 commits into
mainfrom
feat/magento-sql-integration
Draft

gplanchat wants to merge 73 commits into
mainfrom
feat/magento-sql-integration

Conversation

@gplanchat

Copy link
Copy Markdown
Owner

Throwaway integration base for #754. Do not merge into main: every change in it is already in one of the PRs below, and the merge commits only combine them.

Refs #740, #754.

What it contains

Plain merge commits, in dependency order, of the heads of the open draft PRs at the time of the merge:

PR Head Ticket
#948 353a002 #735 resource/durable connection
#958 265e8a0 #746 schema and durable:setup
#956 75a0292 #946 WorkflowMetadataStore::insertIfAbsent
#960 9f4437a #732 GET_LOCK resume lock
#962 d7bdf27 #747 conformance harness
#963 1d1dfac #753 attempt claim
#964 c3ba710 #733 run projection
#966 6ce3c0e #731 table queue
#967 78b5fec #750 metadata store
#968 0c9c932 #751 parent link store
#969 7067d14 #748 event store
#988 501444e #749 pass fence
#989 87f541f #752 run catalogue

Conflicts

Only phpstan.neon and psalm.xml, from #964 and #966: each PR adds its own fixture directory to the excludePaths / ignoreFiles list on the same line. Resolved by keeping both lines. No other file conflicted; the Fixture/bootstrap.php files of #960, #964 and #966 live in three different directories and do not collide.

State of the gates on this head

  • composer cs:check: 0 of 1039 files to fix.
  • composer test: OK, 3516 tests, 189 skipped (no Temporal server, no MySQL DSN for the root suites).
  • composer phpstan, composer psalm, composer phpstan-magento: pass.
  • Magento harness (php ../vendor/bin/phpunit -c phpunit.xml.dist, MySQL 8.0): OK, 75 tests, 432 assertions.
  • composer psalm-magento: 1 error, in feat(magento): a table queue on the adapter, lease, available_at, SKIP LOCKED (#731) #966 alone: TableQueue.php:64, InvalidOperand on $delaySeconds * 1_000_000 (int times float under strict operands). Not caused by the combination.

An atomic insert-if-absent on the port: DBAL (primary key arbiter),
Illuminate (insertOrIgnore), in-memory and the projecting decorator,
with two conformance cases.
…sent (#946)

A pass that read the next run as missing no longer resets it with save()
when another pass wrote it and the run completed in between. The three
insert-only dispatchers use the same atomic call instead of get() then save().
…ble:setup (#746)

Declares the six Durable tables (events, heads, metadata, parent links, runs, queue) with Ddl\Table
on the resource/durable connection. durable:setup creates a missing table, adds a missing column,
and refuses to run inside a transaction. A store that finds a table missing throws naming the table
and durable:setup. No locks table: #732 is measuring the resume lock.
…pter (#733)

Red until MagentoWorkflowRunProjection exists.
Ddl\Table has no precision for DATETIME, so setup() widens each time column with MODIFY COLUMN when
information_schema reports less than 3. The widening keeps the rows and also upgrades a journal
created at whole seconds. A lease of a few seconds needs the milliseconds.
The conformance subclass expects fenced passes, and a test races two
processes claiming one execution: only the newest claim may append.
claimPass() upserts the execution's heads row in one transaction;
appendFenced() reads the epoch under LOCK IN SHARE MODE and inserts in
the same transaction, throwing SupersededPassException once a newer claim
exists. Same single-transaction rule as append().

This branch has not been deployed

No deployments
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