Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 1 addition & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ jobs:
fail-fast: false
matrix:
php: ['8.3', '8.4']
services:
redis:
image: redis:7-alpine
ports: ['6379:6379']
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 10
env:
MAGENTO_ROOT: ${{ github.workspace }}/../fastboot-ci-magento
COMPOSER_NO_INTERACTION: '1'
Expand All @@ -63,29 +54,14 @@ jobs:
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: ${{ matrix.php }}
extensions: bcmath, curl, dom, ftp, gd, intl, mbstring, pdo_mysql, redis, soap, sodium, xsl, zip
extensions: bcmath, curl, dom, ftp, gd, intl, mbstring, pdo_mysql, soap, sodium, xsl, zip
ini-values: memory_limit=1G
coverage: none
tools: composer:v2
- name: Prepare public-source Magento fixture
run: python3 dev/ci/prepare.py --root "$MAGENTO_ROOT"
- name: Unit regressions
run: php "$MAGENTO_ROOT/vendor/bin/phpunit" --no-configuration --bootstrap dev/tests/bootstrap.php --log-junit .ci/unit.xml src
- name: Schema publication, TTL and failure invariants
run: |
php dev/tests/schema-l1/tests.php
php dev/tests/schema-l1/edge-cases.php
python3 dev/tests/schema-l1/concurrency.py
python3 dev/tests/schema-l1/redis-failure.py
- name: Repeat schema and unit regressions without ext-redis
run: |
python3 dev/tests/without-redis.py -- sh -ec '
php "$MAGENTO_ROOT/vendor/bin/phpunit" --no-configuration --bootstrap dev/tests/bootstrap.php src
php dev/tests/schema-l1/tests.php
php dev/tests/schema-l1/edge-cases.php
python3 dev/tests/schema-l1/concurrency.py
python3 dev/tests/schema-l1/redis-failure.py
'
- name: Compile fresh Magento DI metadata
working-directory: ${{ env.MAGENTO_ROOT }}
run: php bin/magento setup:di:compile
Expand All @@ -95,7 +71,6 @@ jobs:
python3 dev/release/build.py --version 0.0.0-rc0 --output .ci/rebuild
cmp .ci/artifacts/*.zip .ci/rebuild/*.zip
python3 dev/release/install-smoke.py --archive .ci/artifacts/graphcommerce-magento-fast-boot-0.0.0-rc0.zip --magento-root "$MAGENTO_ROOT" --output .ci/install
python3 dev/tests/without-redis.py -- python3 dev/release/install-smoke.py --archive .ci/artifacts/graphcommerce-magento-fast-boot-0.0.0-rc0.zip --magento-root "$MAGENTO_ROOT" --output .ci/install-no-redis
- name: Collect fixture logs
if: always()
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- The stitched GraphQL schema is a local PHP array under the version token of the other local caches, on by default with the `schema_array` switch. It needs no configuration and works on every Magento cache backend. The separate Redis transport, its `fastboot.schema_l1` settings and the `colinmollenhour/credis` requirement are removed; a `fastboot.schema_l1` block in `env.php` is not read.
- A new website, group or store is in the scopes the same request reads right after it: the scopes and website-stores entries carry the config cache tag, so the store manager's reinit drops them. Before, creating a website from the CLI failed Inventory's sales channel validation ("The website with code … does not exist").
- The configuration values a request read are answered from a request memo on the second read, under the `config_memo` switch: no scope resolution and no type lookup per read.

Expand Down
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

The combined Composer package contains FastBootCache, FastBoot, FastBootGraphQl and FastBootPreload. Keep implementation in these modules; prototypes are not runtime dependencies.

- Optimize ordinary PHP-FPM. Each mechanism has an independently configurable `fastboot` switch. Schema L1 uses the installation identity and Magento's static-content deployment version; do not add a separate release setting. Never weaken request-specific GraphQL security checks or bypass Magento's processor/plugin chain to cache validation.
- Local PHP files contain scalars and arrays only. Redis/shared Magento caches remain authoritative. Preserve proven backend TTLs; unknown expiry must not be promoted. Schema metadata uses atomic Redis generation fences and strict validation by default; generic files snapshot the shared version once per request.
- Files are immutable, content-addressed, private and admission-bounded. Mutable indexes carry expiry. Do not preload runtime data files. A failed local write is a cache miss; a strict schema Redis failure is an error, not permission to serve stale data.
- Optimize ordinary PHP-FPM. Each mechanism has an independently configurable `fastboot` switch. Local caches use Magento's static-content deployment version as the build identity; do not add a separate release setting. Never weaken request-specific GraphQL security checks or bypass Magento's processor/plugin chain to cache validation.
- Local PHP files contain scalars and arrays only. Magento's shared caches remain authoritative, and FastBoot reaches them only through Magento's cache API: no connection or keys of its own. Preserve proven backend TTLs; unknown expiry must not be promoted. Every local cache, the GraphQL schema included, lives under the version token in Magento's cache; a request snapshots the version once.
- Files are immutable, content-addressed, private and admission-bounded. Mutable indexes carry expiry. Do not preload runtime data files. A failed local write is a cache miss; a cache failure while reading the version token is an error, not permission to serve stale files.
- Changed PHP/DI/config artifacts need a new Magento static-content deployment version and an FPM restart. Clean config/compiled_config before DI compilation. The preparation command must rebuild area differences after compilation, including when operating repeatedly in a development workspace.
- Keep unit and portable Redis tests under `dev/tests` and module `Test/Unit` directories. Validate combined real Magento responses, configuration saves, cache invalidation and memory as well as individual shortcuts. Compare timings relatively on the same host; PHP allocated memory and shared OPcache memory are separate measurements.
- Keep unit tests under module `Test/Unit` directories and test tooling under `dev/tests`. Validate combined real Magento responses, configuration saves, cache invalidation and memory as well as individual shortcuts. Compare timings relatively on the same host; PHP allocated memory and shared OPcache memory are separate measurements.
- `dev/release/build.py` builds the reproducible Composer artifact; `install-smoke.py` validates archive hashes and installation against an existing dependency tree. Neither publishes anything. Keep installation and operation in the root/module READMEs. Keep implementation/design notes, switches, tests and measurements under dev.

- Never attach cache interception to broad bootstrap decorators such as TagScope: the compiled plugin-list cache needs those decorators before interceptors can be resolved. Bind only the supported application cache types.
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Median PHP execution time on a deployed AMD EPYC server, with 600 measured reque

- Magento 2.4.8 or compatible Mage-OS APIs.
- PHP 8.2–8.5, subject to the installed Magento version.
- A writable Redis primary for schema L1.
- Private, node-local cache storage.

Release candidate.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"magento/module-catalog-graph-ql": "^100.4.8",
"magento/module-tax": "^100.4.8",
"magento/module-customer": "^103.0.8",
"webonyx/graphql-php": "^15.0",
"colinmollenhour/credis": "^1.17"
"webonyx/graphql-php": "^15.0"
},
"replace": {
"graphcommerce/module-fast-boot-cache": "self.version",
Expand Down
Loading