DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

IUpgradeable and installer process ordering

 3 Replies
 0 Subscribed to this topic
 26 Subscribed to this forum
Sort:
Author
Messages
Advanced Member
Posts: 233
Advanced Member
4 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
4 Engaged Reader
Engaged Reader
You are an engaged reader!

Seeing forum messages recently about installer and module install order reminded me that I wanted to post a topic and see if anyone has any insight or suggestions. In packaging for the Forums module, I've become intimately familiar with the DNN installer code since we've had some install challenges to maintain backward compatibilty and upgradeability from older versions. Here goes...

IMO there is a flaw in the installer. 

If you are updating from an older version (say 7.0.11 to 8.0.1), you need to go from:
7.0.11 -> 7.0.12
7.0.12 -> 8.0.0
8.0.0 -> 8.0.1

If I change a SQL schema in 8.0.1, it will already have taken effect when the 7.0.12 and 8.0.0 IUpgradeable is invoked.

Unfortunately, the module installer does all of the sql first, then all of the IUpgradeables.

So it does:
07.00.12.SqlDataProvider
08.00.00.SqlDataProvider
08.00.01.SqlDataProvider

THEN it does IUpgradeable 
07.00.12 IUpgradeable
08.00.00 IUpgradeable
08.00.01 IUpgradeable

WHAT I think it SHOULD DO:
07.00.12.SqlDataProvider
07.00.12 IUpgradeable
08.00.00.SqlDataProvider
08.00.00 IUpgradeable
08.00.01.SqlDataProvider
08.00.01 IUpgradeable
 

Veteran Member
Posts: 349
Veteran Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
It would be cool but it would bring another issue. IUpgradeable can only run after a site restart. It is scheduled to run after next start. Aaand it needs to run after DI is initialized. That would mean many restarts for a single module that has many versions. And for DNN itself, it would be a massive number of restarts.
Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!
Posted By Daniel Valadas on 6/28/2024 4:01 PM
It would be cool but it would bring another issue. IUpgradeable can only run after a site restart. It is scheduled to run after next start. Aaand it needs to run after DI is initialized. That would mean many restarts for a single module that has many versions. And for DNN itself, it would be a massive number of restarts.

At first, I was thinking, "Dang, that's a great point, John... Nice find!"

But, this makes sense as to why it works the way it does.  

 

Advanced Member
Posts: 233
Advanced Member
4 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
4 Engaged Reader
Engaged Reader
You are an engaged reader!
Ok thanks Daniel!

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved