-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
nixos/druid: init module and package #219942
Conversation
editorconfig:
nixos manual:All options need to be updated to markdown. For example, diff --git a/nixos/modules/services/cluster/druid/default.nix b/nixos/modules/services/cluster/druid/default.nix
index 62c100ad8a4..a756c6edd07 100644
--- a/nixos/modules/services/cluster/druid/default.nix
+++ b/nixos/modules/services/cluster/druid/default.nix
@@ -4,10 +4,10 @@ let
cfg = config.services.druid;
druidServiceOption = serviceName: {
- enable = mkEnableOption serviceName;
+ enable = mkEnableOption (mdDoc serviceName);
restartIfChanged = mkOption {
type = types.bool;
- description = ''
+ description = mdDoc ''
Automatically restart the service on config change.
This can be set to false to defer restarts on clusters running critical applications.
Please consider the security implications of inadvertently running an older version,
@@ -18,26 +18,26 @@ let
config = mkOption {
default = { };
type = types.attrsOf types.anything;
- description = "(key=value) Configuration to be written to runtime.properties of the druid ${serviceName}";
+ description = mdDoc "(key=value) Configuration to be written to runtime.properties of the druid ${serviceName}";
};
- jdk = mkPackageOption pkgs "JDK" {
+ jdk = mkPackageOptionMD pkgs "JDK" {
default = [ "jdk8_headless" ];
}; restricted eval:replace I have a few more suggestions, but can you push these changes to see if CI passes first? |
73dfbf5
to
7ef389e
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/3589 |
9ea5e06
to
7308bf8
Compare
7308bf8
to
4de6ff1
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.
Hey, sorry for coming back with more suggestions. This is a big PR, and I keep missing small details. Functionally the PR works fine the way it is now. All remaining suggestions are just conforming to conventions.
"druid.service" = "servicename"; | ||
}; | ||
}; | ||
jdk = mkPackageOptionMD pkgs "JDK" { |
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.
jdk = mkPackageOptionMD pkgs "JDK" { | |
jdk = mkPackageOption pkgs "JDK" { |
allowedTCPPorts = [ (attrByPath [ "druid.plaintextPort" ] 8083 cfg."${name}".config) ]; | ||
extraConfig.services.druid.historical.internalConfig."druid.segmentCache.locations" = '' | ||
[${(concatMapStringsSep "," ( | ||
x: "{\"path\":\"" + x.path + "\",\"maxSize\":" + x.maxSize + "}" |
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.
x: "{\"path\":\"" + x.path + "\",\"maxSize\":" + x.maxSize + "}" | |
x: ''{"path":"${x.path}","maxSize":"${x.maxSize}"}'' |
[optional] get rid of all the escapes
41b5cb3
to
270f37a
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.
Thanks!
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1565 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1748 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1806 |
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 for the contribution! I've not looked atthe module yet, but here's some feedback for the package itself:
270f37a
to
a716833
Compare
a716833
to
bd9a517
Compare
bd9a517
to
eac60ad
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1860 |
eac60ad
to
43fd5ad
Compare
You can ignore the "escaping with" part for now, it will be temporarily disabled Edited: now force push to generate a new error report |
Could you format the files with |
e77cdab
to
c363092
Compare
(cfg.commonTmpDirs ++ tmpDirs); | ||
}; | ||
networking.firewall.allowedTCPPorts = | ||
mkIf ((attrByPath [ "openFirewall" ] false serviceOptions)) |
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.
redundant parentheses
nixos/tests/druid/default.nix
Outdated
enable = true; | ||
package = pkgs.mariadb; | ||
initialDatabases = [{ name = "druid"; }]; | ||
initialScript = pkgs.writeText "mysql-init.sql" ('' |
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.
redundant parentheses
nixos/tests/druid/default.nix
Outdated
passthru.override = args': testsForPackage (args // args'); | ||
}; | ||
testDruidCluster = { druidPackage, hadoopPackage, ... }: | ||
pkgs.testers.nixosTest ({ |
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.
redundant parentheses
nixos/tests/druid/default.nix
Outdated
inherit coreSite; | ||
}; | ||
}; | ||
broker = { pkgs, ... }: { |
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.
definition pkgs
is not used
nixos/tests/druid/default.nix
Outdated
}; | ||
|
||
}; | ||
coordinator = { pkgs, ... }: { |
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.
definition pkgs
is not used
nixos/tests/druid/default.nix
Outdated
inherit coreSite; | ||
}; | ||
}; | ||
mm = { pkgs, ... }: { |
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.
definition pkgs
is not used
nixos/tests/druid/default.nix
Outdated
services.zookeeper.enable = true; | ||
networking.firewall.allowedTCPPorts = [ 2181 ]; | ||
}; | ||
namenode = { pkgs, ... }: { |
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.
definition pkgs
is not used
nixos/tests/druid/default.nix
Outdated
inherit coreSite; | ||
}; | ||
}; | ||
overlord = { pkgs, ... }: { |
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.
definition pkgs
is not used
nixos/tests/druid/default.nix
Outdated
</Configuration> | ||
''; | ||
log4j = pkgs.writeText "log4j2.xml" log4jConfig; | ||
name = "hadoop-hdfs"; |
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.
definition name
is not used
nixos/tests/druid/default.nix
Outdated
log4j = pkgs.writeText "log4j2.xml" log4jConfig; | ||
name = "hadoop-hdfs"; | ||
coreSite = { "fs.defaultFS" = "hdfs://namenode:8020"; }; | ||
package = pkgs.hadoop_3_2; |
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.
definition package
is not used
c363092
to
888656f
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.
✅ Looks good!
888656f
to
9943804
Compare
This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch). Result of 2 packages blacklisted:
2 packages built:
The following issues got detected with the above build packages.
nixpkgs-manual:
Package is missing maintainers. |
|
Description of changes
Druid is a high performance, real-time analytics database that delivers sub-second queries on streaming and batch data at scale and under load.
Things 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/
)