Skip to content

Commit 067cc53

Browse files
authored
Static factory mapper (#2341)
* fix: split postgresql fetch into fetch and fetchSingle - fixed TypeMapper phpstan templates * fix: regenerated dsl definitions * refactor: simplify composer action * fix: yaml syntax in gha job-tests.yml * fix: codecov config * chore: debug slow tests * fix: replaced fragile test based on process fork with mock * fix: use node 22 to spawn wrangler on ci/cd * refactor: replace openstack with minio
1 parent af9cdd1 commit 067cc53

52 files changed

Lines changed: 525 additions & 697 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codecov.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
codecov:
22
notify:
3-
after_n_builds: 5
3+
after_n_builds: 3
44

55
comment:
66
layout: "condensed_header, diff, components"
7-
after_n_builds: 5
8-
9-
flag_management:
10-
default_rules:
11-
carryforward: true
7+
after_n_builds: 3
128

139
component_management:
1410
individual_components:
@@ -76,6 +72,10 @@ component_management:
7672
name: bridge-monolog-http
7773
paths:
7874
- src/bridge/monolog/http/**
75+
- component_id: bridge-monolog-telemetry
76+
name: bridge-monolog-telemetry
77+
paths:
78+
- src/bridge/monolog/telemetry/**
7979
- component_id: bridge-openapi-specification
8080
name: bridge-openapi-specification
8181
paths:

.github/workflows/job-arrow-extension.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
run: composer install --no-interaction --no-progress
9292

9393
- name: Run Parquet Integration Tests with Arrow
94-
run: composer test:lib:parquet
94+
run: composer test -- --testsuite=lib-parquet-integration
9595

9696
- name: Upload to Codecov
9797
if: ${{ !cancelled() && matrix.php == '8.3' && matrix.os == 'ubuntu-latest' }}

.github/workflows/job-extension-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ jobs:
3838
cache-key-suffix: "-extensions"
3939

4040
- name: "Test Brotli"
41-
run: "composer test:lib:parquet -- --group brotli-extension"
41+
run: "composer test -- --group brotli-extension"
4242

4343
- name: "Test LZ4"
44-
run: "composer test:lib:parquet -- --group lz4-extension"
44+
run: "composer test -- --group lz4-extension"
4545

4646
- name: "Test ZSTD"
47-
run: "composer test:lib:parquet -- --group zstd-extension"
47+
run: "composer test -- --group zstd-extension"
4848

4949
- name: "Test Snappy"
50-
run: "composer test:lib:parquet -- --group snappy-extension"
50+
run: "composer test -- --group snappy-extension"
5151

5252
- name: Upload to Codecov
5353
if: ${{ !cancelled() && matrix.php-version == '8.3' }}

.github/workflows/job-tests.yml

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@ jobs:
4040
--health-retries 10
4141
ports:
4242
- 9200:9200
43-
localstack:
44-
image: localstack/localstack:latest
45-
env:
46-
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
47-
SERVICES: s3
48-
AWS_ACCESS_KEY_ID: test
49-
AWS_SECRET_ACCESS_KEY: test
50-
ports:
51-
- 4566:4566
52-
- 4571:4571
5343
strategy:
5444
fail-fast: false
5545
matrix:
@@ -81,6 +71,18 @@ jobs:
8171
sleep 2
8272
done
8373
74+
- name: "Start MinIO and create bucket"
75+
run: |
76+
docker run -d --name minio -p 9000:9000 \
77+
-e MINIO_ROOT_USER=minioadmin \
78+
-e MINIO_ROOT_PASSWORD=minioadmin \
79+
quay.io/minio/minio:latest server /data
80+
timeout 30 sh -c 'until curl -fs http://localhost:9000/minio/health/live > /dev/null; do sleep 1; done'
81+
docker run --rm --network=host --entrypoint sh quay.io/minio/mc:latest -c "
82+
mc alias set local http://localhost:9000 minioadmin minioadmin &&
83+
mc mb local/flowphpbucket01 --ignore-existing
84+
"
85+
8486
- name: "Setup PHP Environment"
8587
uses: "./.github/actions/setup-php-env"
8688
with:
@@ -116,43 +118,25 @@ jobs:
116118
env:
117119
AZURITE_ACCOUNTS: flowphpaccount01:flowphpkey01
118120

119-
- name: "Test - Libraries"
120-
run: "composer test:libraries"
121-
env:
122-
FLOW_PARQUET_TESTS_DEBUG: "0"
123-
PGSQL_DATABASE_URL: pgsql://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?serverVersion=11&charset=utf8
124-
MYSQL_DATABASE_URL: mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/mysql
125-
126-
- name: "Test - ETL Core"
127-
run: "composer test:core"
128-
129-
- name: "Test - CLI"
130-
run: "composer test:cli"
131-
env:
132-
PGSQL_DATABASE_URL: pgsql://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?serverVersion=11&charset=utf8
133-
134-
- name: "Test - Adapters"
135-
run: "composer test:adapters"
121+
- name: "Test"
122+
timeout-minutes: 10
123+
run: "composer test -- --coverage-clover=./var/phpunit/coverage/clover/coverage.xml --log-junit ./var/phpunit/logs/junit.xml"
136124
env:
137125
PGSQL_DATABASE_URL: pgsql://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?serverVersion=11&charset=utf8
138126
MYSQL_DATABASE_URL: mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/mysql
139127
SQLITE_DATABASE_URL: "sqlite:///:memory:"
140-
141-
- name: "Test - Bridges"
142-
run: "composer test:bridges"
143-
env:
144-
PGSQL_DATABASE_URL: pgsql://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?serverVersion=11&charset=utf8
145128
AZURITE_HOST: "localhost"
146129
AZURITE_BLOB_PORT: "10000"
147130
AZURITE_ACCOUNT_NAME: "flowphpaccount01"
148131
AZURITE_ACCOUNT_KEY: "flowphpkey01"
149-
S3_ENDPOINT: "http://localhost:${{ job.services.localstack.ports[4566] }}"
132+
S3_ENDPOINT: "http://localhost:9000"
150133
S3_REGION: "us-east-1"
151-
S3_ACCESS_KEY_ID: "test"
152-
S3_SECRET_ACCESS_KEY: "test"
134+
S3_ACCESS_KEY_ID: "minioadmin"
135+
S3_SECRET_ACCESS_KEY: "minioadmin"
153136
OTEL_RECEIVER_HTTP_ENDPOINT: "http://localhost:4318"
154137
OTEL_RECEIVER_GRPC_ENDPOINT: "localhost:4317"
155138
OTEL_COLLECTOR_METRICS_ENDPOINT: "http://localhost:8888/metrics"
139+
FLOW_PARQUET_TESTS_DEBUG: "0"
156140

157141
- name: Upload to Codecov
158142
uses: ./.github/actions/codecov-report

.github/workflows/job-windows-tests.yml

Lines changed: 0 additions & 103 deletions
This file was deleted.

.github/workflows/test-suite.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,5 @@ jobs:
5050
uses: ./.github/workflows/job-arrow-extension.yml
5151
secrets: inherit
5252

53-
windows-tests:
54-
uses: ./.github/workflows/job-windows-tests.yml
55-
5653
mutation-tests:
5754
uses: ./.github/workflows/job-mutation-tests.yml

.github/workflows/test-website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: "Setup Node.js"
4848
uses: "actions/setup-node@v4"
4949
with:
50-
node-version: "20"
50+
node-version: "22"
5151

5252
- name: "Create Wrangler dev.vars"
5353
run: |

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
'Flow/ETL/Tests/Unit/Exception',
3939
'extension/arrow-ext/ext',
4040
'extension/pg-query-ext/ext',
41+
'var',
4142
])
4243
->notPath('bridge/symfony/postgresql-messenger/polyfill.php');
4344

compose.yml.dist

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,31 @@ services:
5959
- "6379:6379"
6060
networks:
6161
- flow-php
62-
localstack:
63-
image: localstack/localstack:latest
64-
container_name: flow-php-localstack
62+
minio:
63+
image: minio/minio:latest
64+
container_name: flow-php-minio
65+
command: server /data --console-address ":9001"
6566
ports:
66-
- "4566:4566"
67+
- "9000:9000"
68+
- "9001:9001"
6769
environment:
68-
- SERVICES=s3
69-
- DEBUG=1
70-
- DATA_DIR=/var/localstack/data
70+
- MINIO_ROOT_USER=minioadmin
71+
- MINIO_ROOT_PASSWORD=minioadmin
7172
volumes:
72-
- "./var/localstack:/var/localstack"
73+
- "./var/minio:/data"
74+
networks:
75+
- flow-php
76+
minio-init:
77+
image: minio/mc
78+
container_name: flow-php-minio-init
79+
depends_on:
80+
- minio
81+
entrypoint: >
82+
/bin/sh -c "
83+
until mc alias set flow http://minio:9000 minioadmin minioadmin; do sleep 1; done;
84+
mc mb flow/flowphpbucket01 --ignore-existing;
85+
exit 0;
86+
"
7387
networks:
7488
- flow-php
7589
aspire:

0 commit comments

Comments
 (0)