-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Initialize Hound package / module #19498
Conversation
@grahamc, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @joachifm and @offlinehacker to be potential reviewers. |
@@ -276,6 +276,7 @@ | |||
telegraf = 256; | |||
gitlab-runner = 257; | |||
postgrey = 258; | |||
hound = 259; |
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.
What sort of data does hound
generate? Is it not sufficient to ensure eventually consistent ownership via preStart
or similar mechanisms?
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.
I'm really not sold on using preStart's to chmod a bunch of data. One of my hound installs has 700GB of owned data. I definitely don't want to be running chmod during a restart.
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.
sounds reasonable.
|
||
goDeps = ./deps.nix; | ||
|
||
# TODO: add metadata https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes |
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.
obsolete.
User = cfg.user; | ||
Group = cfg.group; | ||
WorkingDirectory = cfg.home; | ||
ExecStartPre = "${pkgs.git}/bin/git config --global --add http.sslCAinfo /etc/ssl/certs/ca-certificates.crt"; |
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.
this adds a new line per start.
I would prefer the following instead:
ExecStartPre = "${pkgs.git}/bin/git config --global --replace-all http.sslCAinfo /etc/ssl/certs/ca-certificates.crt";
}; | ||
|
||
systemd.services.hound = { | ||
description = "Hound Code Search from Etsy"; |
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.
I think Hound Code Search
is enough. On startup it will then show:
Started Hound Code Search.
''; | ||
}; | ||
|
||
extraGroups = mkOption { |
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.
what is the use case for this option?
Last but not least the test should be also added to diff --git a/nixos/release.nix b/nixos/release.nix
index 10c624a..fbd3efd 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -245,6 +245,7 @@ in rec {
tests.gnome3-gdm = callTest tests/gnome3-gdm.nix {};
tests.grsecurity = callTest tests/grsecurity.nix {};
tests.hibernate = callTest tests/hibernate.nix {};
+ tests.hound = callTest tests/hound.nix {};
tests.i3wm = callTest tests/i3wm.nix {};
tests.installer = callSubTests tests/installer.nix {};
tests.influxdb = callTest tests/influxdb.nix {}; |
@Mic92 I addressed the feedback, other than adding it to the release. I don't really want it to block the tested job. Will this? |
@grahamc well, otherwise this tests is never evaluated by hydra. What do you mean by block? |
Fixed. :) Thanks for the review! |
This breaks
even for configurations that don't have Hound enabled. |
D'oh, thank you for the heads up. Curious that it errors there, but didn't error in my local usage. Preparing a fix. |
Fixed up. Sorry about that. Is this a new check not in 16.09? I've used this module in 16.09. |
|
@bjornfor guh, sorry. 😳 I fixed hound in 104d696 and in testing found another PR broke it as well, which I fixed in 33ac1e1 (/cc @Profpatsch, @Mic92 to learn what I just learned, too :) ) is this the best way to find these sorts of errors in the future? This seems like a really good test to have in Travis-CI -- which shouldn't be so hard to run as to fail regularly. |
I'm surprised travis doesn't run that check. I have put that command in a script, for my own use. It catches a lot of those eval issues:
|
Motivation for this change
https://search.nix.gsc.io is powered by Hound, and I figured it couldn't hurt to upstream the code for it.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)