-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
plausible: 1.3.0 -> 1.4.0 #143345
plausible: 1.3.0 -> 1.4.0 #143345
Conversation
I've made 2 changes to the module.
|
a2ab77d
to
d1b9e65
Compare
One other question I had was regarding the dependency on epmd. |
Does yarn2nix work without changes to |
@yu-re-ka yarn2nix says |
We can change fetchYarnDeps to ignore file: packages as well if that helps |
You"re right actually that would be the best solution. |
I added it to #143406, which touches the same logic as well |
Testing this, it's still problematic with the loadcredentials part. I'm marking this as draft until I resolve it. |
d7049b0
to
0a67272
Compare
hmmm, everything is working, however the admin user password seems to be different from the one supplied. |
7d130d9
to
b604f72
Compare
@Ma27 this is ready for review. I was going insane, I just had a newline in my password file. Well live and learn. |
I think I have found a nice way to provide users with a way to connect to a running plausible node to do some debugging, however, I'll try that in a subsequent PR (will test the change to fetchYarnDeps as well if you are open to it.) |
}; | ||
}; | ||
} | ||
(mkIf cfg.database.postgres.setup { | ||
# `plausible' requires the `citext'-extension. | ||
plausible-postgres = { | ||
after = [ "postgresql.service" ]; | ||
bindsTo = [ "postgresql.service" ]; | ||
requiredBy = [ "plausible.service" ]; |
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.
Hmm, whyis this not needed anymore?
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.
My bad for not detailing a bit more.
bindsTo is just a strong form of requires, where if the required dependency stops, then the dependency stops as well. It doesn't really make sense for a setup script that just runs for several seconds (IMO). Open to discussion of course.
requiredBy, is usually never used in the configuration settings directly and is just the symetric of required.
https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Mapping%20of%20unit%20properties%20to%20their%20inverses
(from the Note section).
Perhaps I read that in the wrong way. Open for discussions as well.
./ecto_sql-fix.patch | ||
./plausible-Bump-clickhouse_ecto-dependency-to-be-compatible-with-ecto-3.6.patch | ||
]; | ||
sha256 = "sha256-ZQfrTxsLzCWFf3vabOk0vyHWZLw69GJovm3vR+7UbMY="; | ||
}; |
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.
Does this still work fine with the update script?
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.
Just updated the script to make sure it works with the new version.
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.
The test doesn't evaluate anymore. First of all, you have to use runCommand
rather than runCommandNoCC
(fixed in a yarn2nix
on nixpkgs master IIRC) and when you do this, it still fails like this:
error: undefined variable 'plausibleConsole'
at /home/ma27/Projects/nixpkgs/nixos/modules/services/web-apps/plausible.nix:166:36:
165|
166| environment.systemPackages = [ plausibleConsole ];
| ^
167|
(use '--show-trace' to show detailed location information)
4374cce
to
a59c4fe
Compare
plausible: service fixes, remove console attempt plausible: fix yarn.nix call
a59c4fe
to
cd9fa67
Compare
plausible: fix yarn.nix call
71faa50
to
7857183
Compare
@Ma27 My bad about missing those. I've committed fixes. |
Can we put the package update into a seperate PR, so I can review and merge them independently of the ongoing discussions regarding module changes? |
I would like to, but there are some updates needed to the module as well to make the new version work. Some environment variable names that changed. I realise though that this PR was a bit large, and should have been broken down a little more before hand. |
I'll tell you what, if your PR is ready before this is approved, then just merge it, I'll do the rebase afterwards, no worries. |
It's on my todo list to review & merge this week. If that's good enough for @yu-re-ka, then we can leave it as-is :) |
I see, then it has to be one big PR, which is also fine.
Definitely good enough :) |
✅ Package builds, test passes on x86_64-linux |
@happysalada Related question: #130297 (comment) |
So just to comment further. When you update from the old version to the new one, you will need to kill one epmd process that goes zombie. However on subsequent restarts, there will be no problem. |
@happysalada That doesn't quite answer it -- I'll ask in the linked thread. |
This broke secret handling for Plausible and it seems this was never tested/debugged properly…
|
Motivation for this change
upstream update.
I have one question. I was thinking of using the recently made
fetchYarnDeps
to not need the giant yarn.nix file. This would require a manual change to the upstream package.json. Basically package.json has two dependencies using the version formatfile:path
, and those wouldn't work with fetchYarnDeps. At the moment the upstream package.json version for those 2 files needs to be amended anyways (to change the path). I am considering just fixing the version (which can be found in the mix.lock file). The drawback is that this is a manual change that would be hard to automate. The benefit is that it enables the use of fetchYarnDeps. Happy to have feedback on this.@yu-re-ka btw tried using fetchYarnDeps with an empty hash, and it returned an error. It would be cool if like other fetchers, if you supply an empty hash, it assumes the
lib.fakeSha256
.This PR only updates the package, there are also changes to the modules that I am currently testing.
(detail, but I opened a PR upstream to add the version to the package.json to not have problem with yarn plausible/analytics#1416).
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)