feat: updater-server in PHP + retire update-updater-server.sh (3b)#95
Merged
Conversation
…cript (3b) Completes the updater migration. The feature-file templating and the config/releases.json + config/major_versions.json edits are now typed, unit-tested PHP, and release-updater.yml calls the new command. tools/release additions: - Updater\FeatureFiles - the four feature-file variants (patch, prerelease, first_stable, first_prerelease) as pure string transforms. - Updater\Signature - 64-char wrapping + line-wise replacement. - Updater\FeatureInputs / Updater\Bump - apply a release to a checked-out updater_server (releases.json, major_versions.json, feature files). - updater:bump console command. Testing: - BumpParityTest runs Bump against the former bash harness fixtures (now under tools/release/tests/fixtures/updater) and asserts byte-for-byte identical output across all 8 scenarios - proving exact parity with the old script. config.php is excluded (generated by the updater_server Makefile). 96 tests. Cutover: - release-updater.yml: set up PHP + composer, fetch internal version and minPHP from nextcloud/server, clone updater_server, run updater:bump, regenerate config.php via make, open the PR. Same RELEASE_TOKEN, same dry-run input. - Removed update-updater-server.sh, the bash run.sh harness, and test-updater-script.yml. READMEs updated. A pre-existing quirk is preserved for parity: when the previous major has no stable release yet, the appended scenario's received version is the literal "null" (matching `jq -r` on a missing key). Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2a7cb12 to
6f18b56
Compare
A patch/first-stable run with no existing entry for the major (e.g. re-running an already-applied release) previously proceeded with empty old values, and the empty version string matched the """ doc-string delimiters, corrupting every signature block. Match the bash script and throw instead. Found via a live updater dry-run. Signed-off-by: skjnldsv <skjnldsv@protonmail.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.
Completes Step 3: the updater-server logic moves from
update-updater-server.shto typed, unit-tested PHP, andrelease-updater.ymlcalls it. The bash script + its harness are removed.What
Updater\FeatureFiles- the four feature-file variants (patch / RC-beta bump / first stable / first pre-release) as pure string transforms.Updater\Signature- 64-char base64 wrapping + line-wise replacement.Updater\FeatureInputs+Updater\Bump- apply a release to a checked-outupdater_server(releases.json,major_versions.json, feature files).updater:bumpconsole command.Parity (the key bit)
BumpParityTestruns the PHPBumpagainst the former bash harness fixtures (base + 8 scenarios, moved intotools/release/tests/fixtures/updater/) and asserts byte-for-byte identicalreleases.json,major_versions.jsonand feature files. So the port is provably equivalent to the old script across patch, RC bump, beta bump, beta->rc, first stable and first beta.config.phpis excluded (generated by the updater_serverMakefile). 96 tests total, green.Cutover
release-updater.yml: set up PHP + composer, fetch the internal version and minimum PHP fromnextcloud/server, cloneupdater_server, runupdater:bump, regenerateconfig.phpviamake, and open the PR. SameRELEASE_TOKEN, samedry_run.update-updater-server.sh, the bashrun.shharness, andtest-updater-script.yml. READMEs updated.Note
A pre-existing quirk is preserved for parity: when the previous major has no stable release yet, the appended scenario's received version is the literal
"null"(matchingjq -ron a missing key). Worth fixing separately, but kept here so the migration is a faithful 1:1.The clone /
make/ commit / PR glue in the workflow is not CI-tested here; validate with arelease-updaterdry-run before relying on it.