Revert "feat: add buildbot-profiler"

This reverts commit 0ffae5766b because
it's unpackageable.
This commit is contained in:
raito 2024-10-27 22:26:23 +01:00
parent 1ec8e33c3f
commit 79137b14f3
3 changed files with 2 additions and 48 deletions

View file

@ -954,7 +954,6 @@ class GerritNixConfigurator(ConfiguratorBase):
binary_cache_config: dict[str, str] | None = None,
auth_method: AuthBase | None = None,
manhole: Any = None,
enable_profiler: bool = False,
) -> None:
super().__init__()
self.manhole = manhole
@ -978,7 +977,6 @@ class GerritNixConfigurator(ConfiguratorBase):
self.url = url
self.prometheus_config = prometheus_config
self.enable_profiler = enable_profiler
if binary_cache_config is not None:
self.binary_cache_config = S3BinaryCacheConfig(**binary_cache_config)
@ -1083,9 +1081,6 @@ class GerritNixConfigurator(ConfiguratorBase):
config_dict["www"].setdefault("plugins", {})
if self.enable_profiler:
config_dict["www"]["plugins"]["profiler"] = True
if "authz" not in config_dict["www"]:
config_dict["www"]["authz"] = util.Authz(
allowRules=[

View file

@ -140,8 +140,6 @@ in
};
};
profiler.enable = lib.mkEnableOption " the profiling of the buildbot instance";
gerrit = {
domain = lib.mkOption {
type = lib.types.str;
@ -272,8 +270,7 @@ in
read_secret_file('buildbot-oauth2-secret'),
autologin=True
),
manhole=${debuggingManhole},
enable_profiler=${builtins.toJSON cfg.profiler.enable}
manhole=${debuggingManhole}
)
''
];
@ -291,9 +288,7 @@ in
(ps.toPythonModule pkgs.buildbot-worker)
pkgs.buildbot-plugins.www
(pkgs.python3.pkgs.callPackage ../default.nix { })
]
++ lib.optional cfg.prometheus.enable (pkgs.python3.pkgs.callPackage ./prometheus-plugin.nix { })
++ lib.optional cfg.profiler.enable (pkgs.python3.pkgs.callPackage ./profiler-plugin.nix { })
] ++ lib.optional cfg.prometheus.enable (pkgs.python3.pkgs.callPackage ./prometheus-plugin.nix { })
);
};

View file

@ -1,36 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
wheel,
}:
buildPythonPackage rec {
pname = "buildbot-profiler";
version = "1.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "tardyp";
repo = "buildbot_profiler";
rev = "v${version}";
hash = "sha256-r56Cze0v3gKWKJwRy0BUYz5z8d0g3jerCIu3KreNxUc=";
};
build-system = [
setuptools
wheel
];
pythonImportsCheck = [
"buildbot_profiler"
];
meta = {
description = "";
homepage = "https://github.com/tardyp/buildbot_profiler";
license = lib.licenses.unfree; # FIXME: nix-init did not find a license
maintainers = with lib.maintainers; [ raitobezarius ];
};
}