Skip to content

[Backport release-21.11] discourse: 2.7.9 -> 2.8.0.beta9#149677

Merged
talyz merged 5 commits intorelease-21.11from
backport-147506-to-release-21.11
Dec 9, 2021
Merged

[Backport release-21.11] discourse: 2.7.9 -> 2.8.0.beta9#149677
talyz merged 5 commits intorelease-21.11from
backport-147506-to-release-21.11

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Dec 8, 2021

Bot-based backport to release-21.11, triggered by a label in #147506.

  • Before merging, ensure that this backport complies with the Criteria for Backporting.
    • Even as a non-commiter, if you find that it does not comply, leave a comment.

talyz added 5 commits December 8, 2021 17:19
Since building nodejs also builds v8, one way to get a static v8
library is to manually assemble it from the leftover object
files. This seems like an easier way to get an up-to-date v8 library
than trying to keep the v8 package updated.

(cherry picked from commit 679398b)
Update to the latest beta, since upstream advocates for it. See
#146308 for more info.

(cherry picked from commit e2415db)
Also, add support for updating plugins which keep gem versions in
files at the root of the repo (discourse-prometheus) and replace the
`up-plugin.sh` script with a README file pointing to the plugin
packaging documentation.

(cherry picked from commit ab042d6)
Add a DiscourseVersion class which handles Discourse's version
numbering properly when sorting - beta versions are sorted lower than
their respective release versions. It can also return both its version
number and equivalent git tag, removing the need for `rev2version` and
manually adding `v` to the front.

Using DiscourseVersion instead of LooseVersion, we can list all
current version number tags from the `discourse` repo and sort them
correctly, giving us the latest one, regardless of type; i.e. we don't
have to filter for only release versions or beta versions anymore.

This also implements the plugin pinning algorithm laid out here:
https://meta.discourse.org/t/pinning-plugin-and-theme-versions-for-older-discourse-installs/156971
to make sure we don't upgrade plugins further than what's compatible
with our currently packaged Discourse version. While it likely won't
matter much most of the time if we continue packaging the beta
versions, it could be helpful if we decide to go back to packaging
release versions or if we run into issues with future upgrades. In
that case, the plugins could still be updated safely even though we're
not on the latest version of Discourse.

(cherry picked from commit 4fb343c)
Instead of patching the path to /public in Discourse's sources, make
the nginx configuration refer to the symlink in the discourse
package which points to the real path.

When there is a mismatch between the path nginx serves and the path
Discourse thinks it serves, we can run into issues like files not
being served - at least when sendfile requests from the ruby app are
processed by nginx. The issue I ran into most recently is that backup
downloads don't work.

Since Discourse refers to the public directory relative to the Rails
root in many places, it's much easier to just sync this path to the
nginx configuration than trying to patch all occurrences in the
sources. This should hopefully mean less potential for breakage in
future Discourse releases, too.

(cherry picked from commit 125bb7d)
@github-actions github-actions bot mentioned this pull request Dec 8, 2021
13 tasks
@ofborg ofborg bot requested a review from talyz December 8, 2021 18:06
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. labels Dec 8, 2021
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Dec 9, 2021
@talyz talyz merged commit 81b4e2d into release-21.11 Dec 9, 2021
@talyz talyz deleted the backport-147506-to-release-21.11 branch December 9, 2021 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant