From 14a8f3df056dd1580135003a72599558bfc5c8f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 04:19:06 +0000 Subject: [PATCH 1/2] ci(deps): bump actions/upload-artifact from 4 to 7 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release-binaries.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7644b3f..7b24aec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,7 +144,7 @@ jobs: - name: Upload stack logs artifact if: failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: docker-stack-logs-functional path: artifacts/ @@ -203,7 +203,7 @@ jobs: - name: Upload Oracle logs artifact if: failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: docker-stack-logs-oracle path: artifacts/ diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 3984e37..5b57d4e 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -95,7 +95,7 @@ jobs: run: python installer/build.py --archive - name: Upload build artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: db2sql-${{ matrix.label }} path: ${{ matrix.archive-glob }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 935b216..a3f36d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,7 +100,7 @@ jobs: - name: Upload Python distributions if: steps.release.outputs.released == 'true' && inputs.dry-run == false - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: python-dist path: dist/* From 990bb6883d419de7941fdd8f29aeab07944d0619 Mon Sep 17 00:00:00 2001 From: Jacques Raphanel Date: Wed, 19 Aug 2026 05:34:23 +0000 Subject: [PATCH 2/2] fix: oracle test failure in ci --- .docker/docker-compose.yml | 4 +++- .docker/oracle/init/01-schema.sql | 14 ++++++++++---- .github/workflows/ci.yml | 22 ++++++++++++++++++++-- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 2ca1c99..8fdd730 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -90,7 +90,9 @@ services: profiles: ["oracle"] image: gvenzl/oracle-free:23-slim environment: - ORACLE_PASSWORD: ${ORACLE_PASSWORD:-oraclepw} + # SYS password. Not ORACLE_PASSWORD on the host side: the tests use that + # name for the APP_USER password they connect with. + ORACLE_PASSWORD: ${ORACLE_SYS_PASSWORD:-oraclepw} APP_USER: ${ORACLE_APP_USER:-apptest} APP_USER_PASSWORD: ${ORACLE_APP_PASSWORD:-apptestpw} ports: diff --git a/.docker/oracle/init/01-schema.sql b/.docker/oracle/init/01-schema.sql index 3bc1846..9c444e4 100644 --- a/.docker/oracle/init/01-schema.sql +++ b/.docker/oracle/init/01-schema.sql @@ -1,15 +1,21 @@ -- Functional-test fixture for Oracle (gvenzl/oracle-free). --- Executed inside the FREEPDB1 pluggable database as the APP_USER. -- Covers every Oracle source type referenced by -- db2sql/infrastructure/emit/postgres/emitter.py:DEFAULT_TYPE_MAP, plus an -- IDENTITY column (12c+), a foreign key and a non-unique index. -- -- Notes: --- * The script targets the per-PDB connection set up by gvenzl/oracle-free, --- so the current user is APP_USER (APPTEST). Tables are created in that --- schema; the reader filters on owner = 'APPTEST'. +-- * gvenzl runs *.sql init files with `sqlplus / as sysdba`, so we start out +-- as SYS in the CDB root. Hence the two ALTER SESSION below: without them +-- the tables end up in SYS and APPTEST stays empty. +-- * PDB and schema names are hardcoded — keep them in sync with +-- ORACLE_APP_USER in .docker/docker-compose.yml. -- * LONG can only be used once per table, so it lives in its own table. +WHENEVER SQLERROR EXIT SQL.ERROR; + +ALTER SESSION SET CONTAINER = FREEPDB1; +ALTER SESSION SET CURRENT_SCHEMA = APPTEST; + ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'; ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS.FF'; ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM'; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b24aec..c3868f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,10 +170,13 @@ jobs: ORACLE_HOST: localhost ORACLE_PORT: "1521" ORACLE_SERVICE: FREEPDB1 - ORACLE_PASSWORD: oraclepw + # Read by docker compose to bootstrap the container + ORACLE_SYS_PASSWORD: oraclepw ORACLE_APP_USER: apptest ORACLE_APP_PASSWORD: apptestpw + # Read by the pytest fixtures — they connect as the app user, not SYS ORACLE_USER: apptest + ORACLE_PASSWORD: apptestpw steps: - uses: actions/checkout@v4 @@ -189,7 +192,22 @@ jobs: run: pip install -e ".[all]" pytest - name: Start Oracle container and wait until healthy - run: docker compose -f .docker/docker-compose.yml --profile oracle up -d --wait + run: docker compose -f .docker/docker-compose.yml --profile oracle up -d --wait oracle + + # The container is healthy even when the init SQL failed, and the tests + # then fail on a missing schema. Cheaper to catch it here. + - name: Verify Oracle fixture schema + run: | + docker compose -f .docker/docker-compose.yml --profile oracle exec -T oracle \ + sqlplus -s -L "${ORACLE_USER}/${ORACLE_PASSWORD}@//localhost:1521/${ORACLE_SERVICE}" <<'SQL' | tee fixture-check.txt + set heading off pagesize 0 feedback off + SELECT 'FIXTURE_TABLES=' || COUNT(*) FROM user_tables; + exit; + SQL + grep -qE 'FIXTURE_TABLES=[1-9]' fixture-check.txt || { + echo "::error::Oracle init script did not create the ${ORACLE_USER} fixture — see the container logs"; + exit 1; + } - name: Run Oracle functional tests run: pytest -m oracle tests/functional -v