Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,9 @@ public DatabaseUpgradeChecker() {
_upgradeMap.put(CloudStackVersion.parse("4.9.3.0"),
new DbUpgrade[] {new Upgrade4930to41000(), new Upgrade41000to41100(), new Upgrade41100to41110()});

_upgradeMap.put(CloudStackVersion.parse("4.9.3.1"),
new DbUpgrade[] {new Upgrade4930to41000(), new Upgrade41000to41100(), new Upgrade41100to41110()});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @rafaelweingartner, Thanks for adding this upgrade path. Here we are considering from 4930 to 41000 instead of 4931 to 41000. Can we write a test for this path in DatabaseUpgradeCheckerTest.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you mean creating an empty upgrade class Upgrade4931to41000?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, plus a schema file if there is any schema change. And adding a unit test in the DatabaseUpgradeCheckerTest.

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.

This is fine, the security release the 4th dot number (a.b.c.x, the x) is considered to NOT usually have any db path/upgrade change, which is why we introduced it in the past. The change is acceptable, not requiring tests if manually @rafaelweingartner or someone else can confirm the change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It might not be needed, but it would surely help reading the code and understanding upgrade path easier, specially when we move forward with #2584 , then we wouldn't see duplicate (and redundant) upgrade path. I would suggest to rename java and sql 4930to49100 files to 4930to4931 and create new/empty 4931to49100.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@DaanHoogland YES! Good catch!

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.

Changes are fine and acceptable as it is.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rhtyd why confused emoji though?

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.

For the purpose of the fix and following the 4.11/legacy db-upgrade model, the changes seem alright to me.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fair enough 👍


_upgradeMap.put(CloudStackVersion.parse("4.10.0.0"),
new DbUpgrade[] {new Upgrade41000to41100(), new Upgrade41100to41110()});

Expand Down