Make the upgrade from 1.4.0 safe and test every upgrade in CI closes #31 #655

Merged
simon merged 16 commits from issue/mitgliederverwaltung-31 into main 2026-11-10 13:44:22 +01:00
Owner

closes #31

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

Upgrade to 1.5.0: instances on 1.4.0 upgrade without crash loops, lock-outs or lost settings, and every test run migrates a real 1.4.0 database with its edge cases.

What has been changed?

  • Start and save with values older releases left in the settings row
  • Never lock everyone out while OIDC-only is on but single sign-on is incomplete
  • Send the password reset mail through the SMTP server from the settings page
  • Take ASSOCIATION_NAME only when the club is set up, keep names changed in the settings
  • Do not re-run the bootstrap seeds on an installation that already has users
  • Inline the SSO identity backfill so the migrations do not depend on application code
  • Compare the provider address only when the web server starts
  • Warn in the start log about integrations the environment configures only in part
  • Migrate a database of the last release, with its edge cases, on every test run
  • Keep menus and tooltips working in browsers without popovers or anchor positioning
  • Ask for a backup and the release's breaking changes before every upgrade
  • Keep starting when the first provider address cannot be stored
  • List the breaking changes from 1.4.0 and the upgrade fixes under Unreleased

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed
  • Documentation is added were needed

Accessibility

  • New elements are properly defined with html-tags
  • Colour contrast follows WCAG criteria
  • Aria labels are added when needed
  • Everything is accessible by keyboard
  • Tab-Order is comprehensible
  • All interactive elements have a visible focus

Testing

  • Tests for new code are written
  • All tests pass
  • axe-core dev tools show no critical or major issues

Additional Notes

  • The "Breaking Change" box stays unticked: this branch adds no breaking change of its own. It lists the breaking changes main already has since 1.4.0 under Breaking changes in the CHANGELOG, for the 1.5.0 release notes.
  • Larger commits:
    • "Migrate a database of the last release…" adds test/fixtures/upgrade/1.4.0.sql, a dump of the real 1.4.0 image plus zoo.sql, about 2,100 lines. The fixture is renewed per release with ci/upgrade-fixture.sh.
    • "Keep menus and tooltips working…" vendors @oddbird/popover-polyfill 0.7.3 (BSD-3-Clause) in assets/vendor/. It is bundled always and applies itself only in browsers without popovers.
    • "Inline the SSO identity backfill…" removes the OidcIdentityBackfill module: the migration carries its own SQL. CODE_GUIDELINES now says migrations do not call application code.
    • "Take ASSOCIATION_NAME only when…" touches 19 files: it removes the start-up sync of the variable, and the club name field on the settings page is editable again while the variable is set. The rest is docs and tests.
  • Behavior changes a reviewer might not expect:
    • The start-up seeds no longer run on an installation that has users (FORCE_SEEDS=true still forces them).
    • ASSOCIATION_NAME acts only at first set-up.
    • "Only OIDC sign-in" has no effect while single sign-on is incomplete.
    • The OIDC provider address is compared only when the web server starts, not in bin/mv eval.
  • New migration 20261110000000_drop_stale_settings_values cleans values older releases left in the settings row (pure SQL). Its down migration does nothing.
  • The upgrade test runs in ci-dev (about 3 s) in its own database <test db>_upgrade.
  • Rehearsed with the real 1.4.0 image, edge-case data and a real SSO user: on this branch, on main and on main + #561, in Chromium and Firefox, including the way back to 1.4.0. The read-only pre-upgrade check ran on all 15 coop-cloud instances and found nothing that breaks on the upgrade.
closes #31 ## Description of the implemented changes The changes were: - [x] Bugfixing - [x] New Feature - [ ] Breaking Change - [x] Refactoring Upgrade to 1.5.0: instances on 1.4.0 upgrade without crash loops, lock-outs or lost settings, and every test run migrates a real 1.4.0 database with its edge cases. ## What has been changed? - Start and save with values older releases left in the settings row - Never lock everyone out while OIDC-only is on but single sign-on is incomplete - Send the password reset mail through the SMTP server from the settings page - Take ASSOCIATION_NAME only when the club is set up, keep names changed in the settings - Do not re-run the bootstrap seeds on an installation that already has users - Inline the SSO identity backfill so the migrations do not depend on application code - Compare the provider address only when the web server starts - Warn in the start log about integrations the environment configures only in part - Migrate a database of the last release, with its edge cases, on every test run - Keep menus and tooltips working in browsers without popovers or anchor positioning - Ask for a backup and the release's breaking changes before every upgrade - Keep starting when the first provider address cannot be stored - List the breaking changes from 1.4.0 and the upgrade fixes under Unreleased ## Definition of Done ### Code Quality - [ ] No new technical depths - [x] Linting passed - [x] Documentation is added were needed ### Accessibility - [ ] New elements are properly defined with html-tags - [ ] Colour contrast follows WCAG criteria - [ ] Aria labels are added when needed - [ ] Everything is accessible by keyboard - [ ] Tab-Order is comprehensible - [ ] All interactive elements have a visible focus ### Testing - [x] Tests for new code are written - [x] All tests pass - [ ] axe-core dev tools show no critical or major issues ## Additional Notes - The "Breaking Change" box stays unticked: this branch adds no breaking change of its own. It lists the breaking changes main already has since 1.4.0 under **Breaking changes** in the CHANGELOG, for the 1.5.0 release notes. - Larger commits: - "Migrate a database of the last release…" adds `test/fixtures/upgrade/1.4.0.sql`, a dump of the real 1.4.0 image plus `zoo.sql`, about 2,100 lines. The fixture is renewed per release with `ci/upgrade-fixture.sh`. - "Keep menus and tooltips working…" vendors `@oddbird/popover-polyfill` 0.7.3 (BSD-3-Clause) in `assets/vendor/`. It is bundled always and applies itself only in browsers without popovers. - "Inline the SSO identity backfill…" removes the `OidcIdentityBackfill` module: the migration carries its own SQL. CODE_GUIDELINES now says migrations do not call application code. - "Take ASSOCIATION_NAME only when…" touches 19 files: it removes the start-up sync of the variable, and the club name field on the settings page is editable again while the variable is set. The rest is docs and tests. - Behavior changes a reviewer might not expect: - The start-up seeds no longer run on an installation that has users (`FORCE_SEEDS=true` still forces them). - `ASSOCIATION_NAME` acts only at first set-up. - "Only OIDC sign-in" has no effect while single sign-on is incomplete. - The OIDC provider address is compared only when the web server starts, not in `bin/mv eval`. - New migration `20261110000000_drop_stale_settings_values` cleans values older releases left in the settings row (pure SQL). Its down migration does nothing. - The upgrade test runs in `ci-dev` (about 3 s) in its own database `<test db>_upgrade`. - Rehearsed with the real 1.4.0 image, edge-case data and a real SSO user: on this branch, on main and on main + #561, in Chromium and Firefox, including the way back to 1.4.0. The read-only pre-upgrade check ran on all 15 coop-cloud instances and found nothing that breaks on the upgrade.
Merge remote-tracking branch 'origin/main' into issue/mitgliederverwaltung-31
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
d3152aef6d
# Conflicts:
#	CHANGELOG.md
test(repo): keep the SSO migration tests from flooding the log with out-of-order and redefinition warnings
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/promote/production Build is passing
418c3b53ee
simon merged commit a2bb548b55 into main 2026-11-10 13:44:22 +01:00
Sign in to join this conversation.
No description provided.