Skip to content

Add a nextcloud.admin.upgrade role to the collection - #452

Open
fzadikian wants to merge 21 commits into
nextcloud:mainfrom
cielito:upgrade-role-upstream
Open

fzadikian wants to merge 21 commits into
nextcloud:mainfrom
cielito:upgrade-role-upstream

Conversation

@fzadikian

@fzadikian fzadikian commented Feb 27, 2026

Copy link
Copy Markdown

Good evening. For the last month, I've been working on an upgrade role to use on some of the Nextcloud instances at the university I work at. Although it might not suit all use-cases (see caveats in readme file), it seems useful enough to propose upstream.

I can't promise to add more features in the short-term (though I can make amendments in order to hopefully merge), but I hope someone gets inspired and builds on top of this.

All pre-commit tests specified in CONTRIBUTING.md passed. The role has been tested from Nextcloud 20 to 32, including automatic PHP and PostgreSQL upgrades. Our internal PR (with full commit history) is here.

Any comments/suggestions are greatly appreciated (especially regarding pre/post upgrade tasks and default variables, which may be biased in favor of our own instances). Thank you!

@fzadikian
fzadikian force-pushed the upgrade-role-upstream branch 2 times, most recently from b3f9a7d to 1e84ec1 Compare February 27, 2026 20:43
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
@fzadikian
fzadikian force-pushed the upgrade-role-upstream branch from 1e84ec1 to 68348cd Compare February 27, 2026 21:38
@codecov

codecov Bot commented Mar 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@aalaesar aalaesar self-assigned this Mar 10, 2026
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
@fzadikian
fzadikian force-pushed the upgrade-role-upstream branch from 385222c to ecbf1b7 Compare March 26, 2026 19:10
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
@fzadikian
fzadikian force-pushed the upgrade-role-upstream branch from a1974e1 to 621855f Compare April 6, 2026 18:26
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
fzadikian added 9 commits May 6, 2026 19:47
…version check based on target (not current) PHP version

Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
@fzadikian
fzadikian force-pushed the upgrade-role-upstream branch from a7993ed to 6b0699c Compare July 9, 2026 18:50
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
@aalaesar

Copy link
Copy Markdown
Member

Hello there @fzadikian
First thank you very much for your contribution and maintaining the Request without feed back from me.

I'm sorry taking so long to come back to you. I find your role well written, and autonomous. great Job !

My issue is more about how my perspective have changed over the decade: it doesn't match anymore with the "one role do it all" I used 10 years ago.

This made me hold my review several times already but i think it's not fair you.
To go forward, I propose to validate the role as it is now.
Then I would propose later a re-work of both install and upgrade roles to modernize the collection's structure. with a better modular code structure that will enable less maintenance for future nextcloud upgrades & installations.

Regards.

Aal

@fzadikian

fzadikian commented Jul 27, 2026

Copy link
Copy Markdown
Author

Hello @aalaesar,

Great! I agree with your proposal. One detail is that, as you can see, the role needs to be updated for each version (although users can set the path manually as well). Are you willing to do that on main, or how should we do it?

One way to minimize change would be to add the maintenance:repair --include-expensive post-upgrade task to all future versions, instead of re-adding it for each major Nextcloud version. What do you think?

@aalaesar

aalaesar commented Jul 27, 2026

Copy link
Copy Markdown
Member

Great! I agree with your proposal.

Nice 👍

One detail is that, as you can see, the role needs to be updated for each version (although users can set the path manually as well). Are you willing to do that on main, or how should we do it?

I can't promise anything. I'm working on this project on my free time (which has became rare over the years)
For future maintenance feel free to submit any update you want.
The best would be that the collection releases are not constrained by nextcloud's release schedules.

One way to minimize change would be to add the maintenance:repair --include-expensive post-upgrade task to all future versions, instead of re-adding it for each major Nextcloud version. What do you think?

I'm not sure. I didn't found much doc about what it does. this may depend on external application installed etc. This can be discussed in a new discussion.

@fzadikian

fzadikian commented Jul 27, 2026

Copy link
Copy Markdown
Author

@aalaesar Alright, if you agree we can keep it this way and eventually further improve it in a separate discussion. Regarding tests, I can see some from install_nextcloud have failed. Should I write tests for the upgrade role?

Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
…version checks

Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
@fzadikian
fzadikian force-pushed the upgrade-role-upstream branch from 6c44219 to dc3492d Compare September 16, 2026 20:12
…de step messages

Signed-off-by: Francisco Zadikian <fzadikian@cci.edu.uy>
@fzadikian
fzadikian force-pushed the upgrade-role-upstream branch from dc3492d to c1537b3 Compare September 16, 2026 20:33
@fzadikian

fzadikian commented Sep 17, 2026

Copy link
Copy Markdown
Author

Hello! Yesterday I refactored the role to work with Nextcloud's major version, instead of the full version. This way, now there is no need to update the default variables for each patch release. The version checks and xml parsing were also improved. I ended up adding the maintenance:repair --include-expensive task to every step, since I was adding it to each new version regardless. I've tested the current code on stage and will use it to update an instance we've got on production soon. What would be the next steps to get this role merged to main? Thank you!

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