Repository navigation
Conversation
… to the roles it drives ops/ansible/roles/postgres-encoding-migrate/tests/run-test.sh migrates a founder, a joiner and a physical standby on one Docker host, with a real pg_basebackup rebuild of the standby, and no workflow ran it. The new workflow runs it on a GitHub-hosted runner, which may become root as the standby rebuild needs, against the postgres-spock fleet pin the test reads. It runs on a pull request or a push to main that changes the migration role or playbook, postgres-streaming-replication, spock-mesh-peering, spock-mesh-wire.yml or the workflow itself. Actions are pinned by commit, permissions are contents: read, and the run's logs are kept on failure. Signed-off-by: dlf-dds <dene.farrell.gov@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ops/ansible/roles/postgres-encoding-migrate/tests/run-test.shis the functional test of the SQL_ASCII to UTF8 migration. On one Docker host, it builds a founder and a joiner wired with the realspock-mesh-peeringrole, a stopped peer, and a physical standby of the founder. It then migrates, resumes, re-runs, rolls back and migrates again with a repair, andpostgres-streaming-replicationrebuilds the standby withpg_basebackup. No workflow ran it. Only the parse-onlytests/syntax-check.shran in CI, throughansible-syntax-check.yml.New workflow
.github/workflows/postgres-encoding-migrate.yml. It has one job onubuntu-24.04, with a 45-minute timeout. It sets up Python 3.12, installsansible-core==2.20.3andrequests, and installs the same collection ranges asansible-syntax-check.yml. Then it runsrun-test.shwithWORKunder the runner's temp directory.Why a hosted runner. The standby host runs with
become, because the streaming role wipes and chowns the standby volume's directory on the Docker host. A hosted runner may do that.The image is the
postgres-spockfleet pin fromops/pins/fleet-pins.yaml, which the test reads by itself. The run covers the image a goatnet deploys. The pinned digest can be pulled without credentials.Triggers. The workflow runs on a
pull_request, or apushtomain, that changes any of these:ops/ansible/roles/postgres-encoding-migrate/**, which includes the test;ops/ansible/roles/postgres-streaming-replication/**;ops/ansible/roles/spock-mesh-peering/**, the role the migration's re-wire includes;ops/ansible/postgres-encoding-migrate.yml;ops/ansible/spock-mesh-wire.yml, which the fixture uses;It can also be started by
workflow_dispatch.Discipline. Actions are pinned by commit sha, as in the other workflows. Permissions are
contents: read. The workflow has a concurrency group that never cancels a run onmain. On failure, the run's*.logfiles are uploaded for 7 days.Role README. It names the workflow beside
run-test.sh.Block-shaped
Non-block change: N/A.
Test plan
This pull request changes the workflow file and the role's README. The workflow runs on this pull request, and that run is the test.
Locally, each with its own exit code:
ops/ci/check-workflow-discipline.py: exit 0. With--self-test: exit 0.ops/ci/check-ci-scripts-wired.py: exit 0. With--self-test: exit 0.ops/ci/check-test-coverage-wired.py: exit 0. With--self-test: exit 0.actionlint1.7.7 with shellcheck on the new workflow: exit 0.yamllint -c .yamllint.ymlon the new workflow: exit 0.yamllint -d relaxed, asci.ymlruns it: exit 0, with three line-length warnings.check-no-identity-spillage.sh,check-no-agent-references.shon the changed files,check-doc-links.py: exit 0 each.Not run:
run-test.shitself. It becomes root for the standby, so it runs only on the CI runner. Its first run is this pull request's.Cross-repo coordination
Documentation
ops/ansible/roles/postgres-encoding-migrate/README.mdnames the workflow that runsrun-test.sh.Checklist
Security-sensitive?
Notes for reviewers
ubuntu-24.04, which is today'subuntu-latest. A named version matches every other workflow here and keeps a runner image change from arriving unannounced.ops/ansible/requirements.ymlwhole. Its AWS collections are unused by these roles. The only collection module the roles call iscommunity.docker.docker_container_exec.