[TASK] DPL-204: runTests.sh and workflow follow-ups - #71
Merged
Conversation
The four workflow steps named "Functional MySQL 8.0 mysqli" and "Functional MySQL 8.0 pdo_mysql" passed "-d mariadb", so they ran the same database as the two MariaDB steps directly above them and only duplicated their coverage under a MySQL name. No workflow invoked "-d mysql" at all, leaving MySQL untested on every core version. They run "-d mysql" now. No version is pinned here: "handleDbmsOptions" already defaults "-i" to 8.0 for MySQL, which is what the step names promise, and the explicit pin follows in its own change. The harness needs nothing else - the "mysql" branch, the "mysql-func" container and "IMAGE_MYSQL" have always been there and were simply never reached from CI. The readiness budget covers the slower startup: "waitFor" allows 60 seconds since the docker adoption, and mysql:8.0 needs 12-13 seconds under docker to initialise a fresh data directory. The MariaDB steps are left alone. They claim 10.5 while passing no "-i" and therefore run the 10.4 default, which is a separate label defect and not part of this change. "testcore12.yml" is untouched: on this branch it is a dispatch-only stub that runs no tests.
"${USERSET}" passes "--user ${HOST_UID}" without a group, so a docker
container runs as "uid=${HOST_UID} gid=0(root)". A "--tmpfs" is created
"root:root" and inherits the mode of its host mountpoint, which is 0755
at a CI umask of 0022 - group 0 gets "r-x" only, and the functional
sqlite suite fails with "unable to open database file".
The docker adoption worked around this by mounting the sqlite tmpfs
"mode=1777". That is correct and umask independent, but it treats the
one mount rather than the missing group.
The mount options move into "TMPFS_MOUNT_OPTIONS", assigned next to the
container parameters they belong to, so the two container binaries can
state what they actually need: docker adds "uid" and "gid" and keeps
"mode=1777", rootless podman maps the container root to the host user
and needs neither, keeping "mode=1777" for the rootful case.
"${USERSET}" is deliberately left alone. It is evaluated for both
container binaries, and appending a group there would change which host
group rootless podman maps the container to, which is a different
question from who owns a tmpfs.
The comment moves along with the options and now names the umask that
makes this visible: at the 0002 of a typical workstation the mountpoint
comes up 0775 and the defect cannot be reproduced at all.
Two variables were referenced or built but never took effect, and both
misled anyone reading the script.
"CI_PARAMS" is expanded into the podman container parameters and into
the mock server container - four sites, and the mock server one is
unconditional, so it also applies under docker - but was never
assigned. It is not a leftover though: the harnesses this one is
modelled on assign it as "CI_PARAMS="${CI_PARAMS:-}"" and treat it as
an escape hatch a caller can export to inject additional container
flags. Only that assignment was missing here, so it is added rather
than the references removed.
"DOCUMENTATION_COMMON_PARAMS" was assigned for both container binaries
and then never used: "renderDocumentation" ran with
"CONTAINER_COMMON_PARAMS" instead and therefore also received
"--network", "--add-host" and a "-w ${ROOT_DIR}" which the later
"-w /project" overrode again. It renders documentation, it does not
talk to a database container, so it now uses the parameters built for
it. The bind mount that the run line repeated is part of them and is
dropped from the line.
No behaviour the suite depends on changes: the container still runs
"--rm", still mounts the project at "/project", still works from there
and, under docker, still runs as the host user. That matters here
because "publish.yml" and "documentation.yml" both render the
documentation.
No functional workflow step passed "-i", so every one of them ran the harness default. Where a step is named "Functional MariaDB 10.5" the job actually started "mariadb:10.4", and the four MySQL steps only became truthful with the previous change - they still relied on the default rather than saying what they run. The eight steps that name a version now pass it: "-i 10.5" for MariaDB and "-i 8.0" for MySQL. Both values are inside what this branch's "handleDbmsOptions" accepts (MariaDB 10.4 to 11.1, MySQL 8.0 to 8.4), so nothing has to be approximated, and the label is now what the container image is built from. The remaining two are left as they are. "Functional PostgresSQL 10" already matches the postgres default, and "-i" is rejected together with "-d sqlite", so "Functional SQLite" cannot carry one. Branch "1" carries the same labels but its whole "testsuite" job is commented out, so there is nothing live to fix there. It is left untouched rather than uncommented.
Documentation renderingYou can find files attached to the below linked Workflow Run URL (Logs). Please note that files only stay for around 5 days!
|
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.
Follow-up work left over from the CI docker adoption (WVP-106), combined
with the database label fix, for branch
main. Everything here ispre-existing — none of it was caused by that adoption.
Addresses DPL-204 (T1, T3, T4) and DPL-214 (all 8 label edits).
The companion pull request for branch
1carries the two tasks thatapply there.
Commits
[TASK] DPL-204: Run MySQL functional jobs on MySQLFunctional MySQL 8.0 …switched from-d mariadbto-d mysql[TASK] DPL-204: Own the sqlite tmpfs from the hostHOST_GID,TMPFS_MOUNT_OPTIONSper container binary, used on the sqlite--tmpfs[TASK] DPL-204: Revive two unused harness variablesCI_PARAMSassigned;renderDocumentationnow usesDOCUMENTATION_COMMON_PARAMS[TASK] DPL-214: Pin the database versions in CI-ion the 8 steps whose label names a versionWhich tasks applied
testcore13.ymland 2 intestcore14.yml. No workflow invoked-d mysqlat all, so MySQL was never exercised. Themysqlarm ofthe harness, the
mysql-funccontainer andIMAGE_MYSQLwere alreadypresent and simply never reached, so no harness change was needed. The
waitForcap is still 60, as T1 requires before making these real.-itinrenderDocumentation: does not apply, asthe issue already states. The only
-iton this branch is thelegitimate
CONTAINER_INTERACTIVE="-it --init", which is emptied whenCI=true. Left alone.--userwithout a gid: applied.${USERSET}is deliberatelyuntouched; the mount options moved into
TMPFS_MOUNT_OPTIONSinstead,where docker adds
uid/gidand podman does not need them. Theexisting
mode=1777is kept in both, as the issue requires.CI_PARAMSwasreferenced but never assigned,
DOCUMENTATION_COMMON_PARAMSwas builtbut never read.
Label changes (DPL-214)
8 steps, 4 per workflow file,
testcore13.ymlandtestcore14.yml:Functional MariaDB 10.5 mysqli-d mariadb→ ran 10.4-d mariadb -i 10.5Functional MariaDB 10.5 pdo_mysql-d mariadb→ ran 10.4-d mariadb -i 10.5Functional MySQL 8.0 mysqli-d mariadb→ ran MariaDB 10.4-d mysql -i 8.0Functional MySQL 8.0 pdo_mysql-d mariadb→ ran MariaDB 10.4-d mysql -i 8.0Both values are inside what this branch's
handleDbmsOptionsaccepts(MariaDB
10.4–11.1, MySQL8.0–8.4), so nothing was approximated.Not changed:
Functional PostgresSQL 10already matches the postgresdefault of 10, and
Functional SQLitecannot carry an-i— theharness rejects
-itogether with-d sqlite.testcore12.ymlis untouched: onmainit is a dispatch-only stub witha single
dummyjob that runs no tests.Corrections to the issue text
Functional MariaDB 10.5 …steps also run something other than theirname (10.4) — they are covered by DPL-214, not by T1.
CI_PARAMSis referenced in the podman branch. It isreferenced at 4 sites, and the mock-server run line is
unconditional, so the missing assignment also affected the docker path.
DOCUMENTATION_COMMON_PARAMSis accurate onthis branch:
renderDocumentationreally did useCONTAINER_COMMON_PARAMSand pick up--network,--add-hostand a-w ${ROOT_DIR}that the later-w /projectoverrode. (It is notaccurate on branch
1, which inlined${CONTAINER_INTERACTIVE}— seethe companion pull request.)
Verification
Static plus CI. The functional suites were not run locally — this is one
of 24 branches in the sweep, and each pull request's own CI exercises
them.
Structural comparison of every workflow, parsing both sides and
comparing everything except the
runstrings: all 5 files identical instructure; exactly 8
runstrings changed, all of them the steps listedabove. Step counts per file unchanged (
testcore121/1,testcore1321/21,
testcore1420/20),-b dockeroccurrences unchanged.Substantive property checks, deliberately not grepping for strings that
also occur in the inserted comments:
grep -E '^\s*TMPFS_MOUNT_OPTIONS="'→ the two expected assignments…functional-sqlite-dbs/:${TMPFS_MOUNT_OPTIONS}, noliteral option list left on that line
grep -E '^CI_PARAMS="'→ 1,grep -E '^HOST_GID='→ 1renderDocumentationrun line uses${DOCUMENTATION_COMMON_PARAMS}-itogether with-d sqliterunTests.sh(thewaitForcap of 60 and itscleanUp; exit 1abort) byte-identical toorigin/mainAcceptance
1companion
Build/Scripts/runTests.shand.github/workflows/*reordered
[TAG] <ISSUE>: Subject≤ 52 characters, bodieswrapped at 72
-b dockerflags, the WVP-106 workflowheader comment, the
waitForcap of 60 and its abort,CONTAINER_INTERACTIVE="-it --init", and the sqlitemode=1777