Skip to content

Improve installer form initialization and preview navigation - #182

Merged
snoopdave merged 2 commits into
masterfrom
fix/rc1-installer-preview
Sep 7, 2026
Merged

Improve installer form initialization and preview navigation#182
snoopdave merged 2 commits into
masterfrom
fix/rc1-installer-preview

Conversation

@snoopdave

Copy link
Copy Markdown
Contributor

Addresses the installer and entry-preview findings from Greg’s 6.1.6 RC1 testing.

UI form initialization establishes a session before generating the form salt. Entry previews use a context-relative URL, preserving the editor’s origin. Version-only database upgrades report completion explicitly, and the installer supplies page titles and exception names directly to its templates.

Validation: JDK 11 mvn -pl app verify passed (301 tests, zero failures/errors, one existing disabled test). Isolated Tomcat 9.0.64/PostgreSQL checks passed for fresh-session installation at the root context and a version-610 upgrade under /roller, including bootstrap and version-616 verification. Preview tests cover HTTP/HTTPS, non-default ports, and both context layouts. Live HTTPS/reverse-proxy preview confirmation on Greg’s deployment remains useful.

@snoopdave
snoopdave marked this pull request as ready for review September 7, 2026 18:48
@snoopdave snoopdave added the 6.1.6 label Sep 7, 2026

@snoopdave snoopdave left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR-Review: 1 inline comment posted.

DatabaseInstallerUpgradeTest pinned the expected database version to
the current release constant ("616"), so the test would fail on the
next version bump even though the behavior it checks is unchanged.
The test now derives its expectation from the same source the
installer uses -- the ro.version property in roller-version.properties,
parsed with the same DatabaseInstaller.parseVersionString -- so the
widening of that pure helper to package-private static is the only
production change. JDK 11 app verify: 301 tests, 0 failures, 1
skipped, unchanged.
@snoopdave
snoopdave merged commit 69fcaf7 into master Sep 7, 2026
7 checks passed
Comment on lines 229 to +262
@@ -254,6 +256,10 @@ public void upgradeDatabase(boolean runScripts) throws StartupException {
// make sure the database version is the exact version
// we are upgrading too.
updateDatabaseVersion(con, myVersion);
if (!schemaChangesRequired) {
successMessage("No table changes were required.");
}
successMessage("Database version updated to " + myVersion + ".");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably ok for now but this is also a bit brittle.

I think this pattern would be more future proof.

    boolean upgraded = false;

    if(dbversion < xx) {
        upgradeTo...()
        dbversion = yy;
        upgraded = true;
    }
    (...)

   if (!upgraded) { extraMessage(); }

But this can be tweaked for the next release.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gh didn't select the full span, the brittle part is L229 boolean schemaChangesRequired = dbversion < 610;.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — adopted your flag pattern in #184: a schemaUpgraded flag set inside each upgrade block, so the "no table changes" message no longer depends on the hardcoded 610. It's behavior-preserving (at that point dbversion < 610 is true exactly when a block runs), and I added a test for the schema-change path. Folding it into 6.1.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants