Skip to content

fix(smoke): execute mirror SQL and propagate SQL errors - #6

Open
Hanabi9248 wants to merge 3 commits into
IvorySQL:mainfrom
Hanabi9248:codex/smoke-stop-on-sql-error
Open

Hanabi9248 wants to merge 3 commits into
IvorySQL:mainfrom
Hanabi9248:codex/smoke-stop-on-sql-error

Conversation

@Hanabi9248

@Hanabi9248 Hanabi9248 commented Oct 26, 2026 •

Copy link
Copy Markdown

The Docker smoke paths can report success without validating the mirror SQL. The standalone helper feeds a here-document to psql without stopping on SQL errors. The GitHub Actions E2E step additionally omits docker exec -i, so the SQL input is not attached to the container process.

  • Enable ON_ERROR_STOP=1 for both stdin psql calls, so SQL errors produce a nonzero exit status.
  • Keep stdin attached with -i in the workflow's E2E call. The preceding psql -c calls and existing SQL statements are unchanged.
  • Add tests/scripts/test_docker_smoke_workflow.py, which runs each complete selected YAML run block with explicit Docker/psql command boundaries. It checks all five forwarded SQL statements, SQL-error and Docker-error statuses, and both preceding -c controls.

The Docker exec reference documents stdin attachment, and the psql reference documents noninteractive error handling.

Validation: standalone full-helper regression: baseline 1 failure/3 passing controls, candidate 4 passing cases. New workflow full-run-block regression: baseline 2 failures/3 passing controls, candidate all 5 cases pass. These are separate suites; the accepted standalone helper suite was not rerun for the workflow increment. Public workflow checks can be run with BASH_EXECUTABLE=/path/to/bash python3 tests/scripts/test_docker_smoke_workflow.py -v.

Both suites use real Bash (and real stdin capture), with explicit external-command fixtures modeling the documented Docker/psql boundaries. No Docker daemon, real psql/SQL parser, mirror queries, Rust/pgrx build, Linux integration or full GitHub Actions run was executed locally. All existing file modes are retained, including executable mode 100755 for the standalone helper. Native checks ran serially with CPU1/aggregate 768 MiB/16 processes/private TMP/BLAS1. The workflow still queries the mirror count without asserting an expected count; this change does not claim to validate every E2E property.

Prepared with AI assistance; production changes, public regression and validation boundaries reviewed.

Signed-off-by: Hanabi <317387557+Hanabi9248@users.noreply.github.com>
Signed-off-by: Hanabi <317387557+Hanabi9248@users.noreply.github.com>
Signed-off-by: Hanabi <317387557+Hanabi9248@users.noreply.github.com>
@Hanabi9248 Hanabi9248 changed the title fix(scripts): stop the mirror smoke test on SQL errors fix(smoke): execute mirror SQL and propagate SQL errors Oct 26, 2026
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