fix(acceptance): run occ upgrade after enabling the app under test#74
Merged
Conversation
The acceptance harness installs ownCloud from the daily-master-qa build,
which already registers a version of the app under test in the database.
The "Setup app" step then copies the checked-out (potentially newer) app
over it and enables it, but never runs an upgrade.
When the checked-out info.xml version is higher than the registered one,
ownCloud flags the instance as needsDbUpgrade and answers every request
with HTTP 503 "Service unavailable". Every @BeforeScenario hook then
fails (e.g. "expected HTTP status 200 but got 503") and all scenarios are
skipped, failing the job. This surfaced in firstrunwizard CI right after
its info.xml was bumped 1.3.0 -> 1.4.0 while the QA build still shipped
1.3.0.
Add an explicit "occ upgrade --no-app-disable" step after all apps are
enabled, for both the primary and federated instances. Exit code 3
("already up to date") is treated as success so instances that need no
upgrade are unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.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.
Problem
Acceptance jobs (e.g.
owncloud/firstrunwizard) started failing with every@BeforeScenariohook reporting:All scenarios are then skipped ("7 scenarios (7 skipped)") and the job fails
with exit code 2 — even though the suite reports "There were no unexpected
failures".
Root cause
status.phpreports"needsDbUpgrade":true. When ownCloud needs a DB upgradeit answers every request with HTTP 503 until
occ upgraderuns.The harness installs core from the
daily-master-qabuild, which alreadyregisters a version of the app under test in the database. The Setup app
step then copies the checked-out app over it and runs
occ a:e, but neverupgrades. When the checked-out
info.xmlversion is higher than theregistered one, the instance flags
needsDbUpgradeand serves 503 everywhere.This was triggered in
firstrunwizardimmediately after itsinfo.xmlwasbumped
1.3.0 → 1.4.0while the QA build still shipped1.3.0. Confirmed bycomparing the last green run (
info.xml1.3.0,needsDbUpgrade:false) againstthe failing run (
info.xml1.4.0,needsDbUpgrade:true) on the same infra~1h apart.
Fix
Add an explicit
occ upgrade --no-app-disablestep after all apps are enabled,for both the primary and federated instances. Exit code
3(ERROR_UP_TO_DATE— "already up to date") is treated as success via
|| [ $? -eq 3 ], soinstances that need no upgrade are unaffected (important since the step runs
under
bash -e).Verification
yaml.safe_load.federated-rootis always emitted as a step output (empty when federation isoff), so the
if [ -n "${FEDERATED_ROOT}" ]guard skips the federatedupgrade cleanly for single-server jobs.
🤖 Generated with Claude Code