Logging upgrades as a Staff Action

Would it be possible to update the staff action logs so that they indicate when (and by what Admin) an upgrade (either to discourse or a plugin) is made through /admin/upgrade? I noticed when updating that there is no indication of this anywhere.

11 Likes

Apologies for reviving this topic but after a recent upgrade broke something in my installation, it would be great if upgrading was logged as a Staff Action. It’s a pretty important action and it’s really helpful to have a clear record of exactly when it happened.

6 Likes

That is a good idea, is that possible @techapj? If it is hard it can be deferred to a later release.

6 Likes

Just like with changes to site settings, it would be nice if the log entry regarding the upgrade showed what version (commit) you were on before, and what version (commit) you upgraded to.

I guess for upgrades done through the UI this is relatively straightforward. Not sure how logging would work for those upgrades when the docker_manager has to be updated and the upgrade is done as a git pull; ./launcher rebuild app through SSH?

4 Likes

This is now done via:

https://github.com/discourse/docker_manager/commit/59ed646815141264f1c212e301c7d30446087e60

Example:

10 Likes

I see, this definitely helps all self-hosters (unless they use rebuild), but we need a solution that covers our own hosting here as well.

The actual solution here is rather complicated and would have to happen after seeds I think.

2 Likes

Eh, I don’t see an urgent need for this on our hosting personally.

Agree, not urgent at all.

But the current fix does not cover rebuild which is a problem.

We can defer on this for the time being cause we have a log of when the migrations ran in the database that covers a fair bit anyway.

3 Likes

With all due respect @sam that is a different feature request, for hosters, this is about logging staff initiated upgrades… I am not sure such a request should even be tracked on meta, unless we are in the business of supporting Discourse hosting services? Anyway make a new topic for that if needed.