-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
discourse: 2.7.9 -> 2.8.0.beta9 #147506
discourse: 2.7.9 -> 2.8.0.beta9 #147506
Conversation
2c9da33
to
66725bf
Compare
1144fcf
to
2ec92f7
Compare
2ec92f7
to
7e08543
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good, as far as I can assess. I don't know much about the v8 changes.
I've upgraded a few of my deployments with it without trouble. Tested the following plugins work: LDAP, data-explorer, solved, checklist, calendar.
7e08543
to
d344e6c
Compare
@@ -0,0 +1 @@ | |||
0.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not very obvious why we need this file. Could it be also generated on the fly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's imported from the plugin's repo by the update.py
script and read by the Gemfile
.
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.
d344e6c
to
ea46821
Compare
Update to the latest beta, since upstream advocates for it. See NixOS#146308 for more info.
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.
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.
ea46821
to
4fb343c
Compare
I've updated to It also now implements Discourse's plugin pinning algorithm to make sure we only update plugins to versions which are compatible with our packaged version of Discourse. While this 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. |
Cool, @talyz. I deployed your latest thing to my deployments and it seems to be working fine. |
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.
I've added a fix for the I recently noticed that backup downloads don't work and it turned out that the root cause was the same issue (a mismatch between how nginx and Discourse refer to the same path in sendfile requests). There may be more places we haven't encountered yet, and even more could crop up in the future, so I've fixed the issue by updating the nginx configuration instead. |
@talyz that change looks good to me |
I'll merge this on Wednesday (2021-12-08) unless anyone objects. It would be nice to get some more eyes on the v8 change, but it shouldn't affect nodejs (unless it fails the build), since it doesn't touch any of the default outputs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Code changes look good to me, upgraded my test system from 2.7.9. Tested basic posting functionality, backups and the following plugins: discourse-assign, discourse-canned-replies, discourse-docs, discourse-spoiler-alert, discourse-voting.
Successfully created backport PR #149677 for |
Motivation for this change
libv8
output tonodejs
as an alternative tov8
, which is a lot of work to updatediscourse-prometheus
up-plugins.sh
with aREADME
pointing to the plugin packaging docsupdate.py
scriptupdate.py
scriptThings done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes