Skip to content
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

ntfy-sh: add runtime secret file support #358060

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-nixf-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
echo "$errors"
else
# just print in plain text
echo "${errors/::/}"
echo "$errors" | sed 's/^:://'
echo # add one empty line
fi
failedFiles+=("$dest")
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/editorconfig-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz
- name: Checking EditorConfig
run: |
< "$HOME/changed_files" nix-shell -p editorconfig-checker --run 'xargs -r editorconfig-checker -disable-indent-size'
cat "$HOME/changed_files" | nix-shell -p editorconfig-checker --run 'xargs -r editorconfig-checker -disable-indent-size'
- if: ${{ failure() }}
run: |
echo "::error :: Hey! It looks like your changes don't follow our editorconfig settings. Read https://editorconfig.org/#download to configure your editor so you never see this error again."
7 changes: 0 additions & 7 deletions .github/workflows/lint-actions.sh

This file was deleted.

3 changes: 1 addition & 2 deletions ci/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Processing of this file is implemented in workflows/codeowners-v2.yml

# CI
/.github/workflows @NixOS/Security @Mic92 @zowoq @infinisil @azuwis
/.github/workflows @NixOS/Security @Mic92 @zowoq @infinisil
/.github/workflows/check-nix-format.yml @infinisil
/.github/workflows/nixpkgs-vet.yml @infinisil @philiptaron
/.github/workflows/codeowners-v2.yml @infinisil
Expand Down Expand Up @@ -241,7 +241,6 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt

# PostgreSQL and related stuff
/pkgs/servers/sql/postgresql @NixOS/postgres
/pkgs/development/tools/rust/cargo-pgrx @NixOS/postgres
/nixos/modules/services/databases/postgresql.md @NixOS/postgres
/nixos/modules/services/databases/postgresql.nix @NixOS/postgres
/nixos/tests/postgresql @NixOS/postgres
Expand Down
1 change: 0 additions & 1 deletion lib/systems/examples.nix
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ rec {
ucrtAarch64 = {
config = "aarch64-w64-mingw32";
libc = "ucrt";
rust.rustcTarget = "aarch64-pc-windows-gnullvm";
useLLVM = true;
};

Expand Down
7 changes: 0 additions & 7 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4578,13 +4578,6 @@
githubId = 1707779;
name = "Chris Ertel";
};
crimeminister = {
email = "[email protected]";
name = "Robert Medeiros";
github = "crimeminister";
githubId = 29072;
keys = [ { fingerprint = "E3BD A35E 590A 8D29 701A 9723 F448 7FA0 4BC6 44F2"; } ];
};
crinklywrappr = {
email = "[email protected]";
name = "Daniel Fitzpatrick";
Expand Down
2 changes: 0 additions & 2 deletions nixos/doc/manual/release-notes/rl-2411.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
- `authelia` has been upgraded to version 4.38. This version brings several features and improvements which are detailed in the [release blog post](https://www.authelia.com/blog/4.38-release-notes/).
This release also deprecates some configuration keys which are likely to be removed in version 5.0.0.

- `netbird` has been updated to 0.31.1. This adds a built-in relay server which is not yet supported by the NixOS module, as well as a metrics endpoint for both the management and signal services. The default metrics port for the `signal` service has been changed from `9090` to `9091` to prevent a port conflict with the management server. This can be changed with their respective `metricsPort` as needed. Refer to the [release notes](https://github.com/netbirdio/netbird/releases/tag/v0.31.1) and [this pull request](https://github.com/NixOS/nixpkgs/pull/354032#issuecomment-2480925927) for more information.

- `compressDrv` can compress selected files in a derivation. `compressDrvWeb` compresses files for common web server usage (`.gz` with `zopfli`, `.br` with `brotli`).

- [`hardware.display`](#opt-hardware.display.edid.enable) is a new module implementing workarounds for misbehaving monitors
Expand Down
2 changes: 0 additions & 2 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
After you run ALTER EXTENSION, you must run [this SQL script](https://github.com/timescale/timescaledb-extras/blob/master/utils/2.15.X-fix_hypertable_foreign_keys.sql). For more details, see the following pull requests [#6797](https://github.com/timescale/timescaledb/pull/6797).
PostgreSQL 13 is no longer supported in TimescaleDB v2.16.

- Support for CUDA 10 has been dropped, as announced in the 24.11 release notes.

- `kanata` was updated to v1.7.0, which introduces several breaking changes.
See the release notes of
[v1.7.0](https://github.com/jtroo/kanata/releases/tag/v1.7.0)
Expand Down
82 changes: 33 additions & 49 deletions nixos/lib/test-driver/default.nix
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
{
lib,
python3Packages,
enableOCR ? false,
qemu_pkg ? qemu_test,
coreutils,
imagemagick_light,
netpbm,
qemu_test,
socat,
ruff,
tesseract4,
vde2,
extraPythonPackages ? (_: [ ]),
nixosTests,
{ lib
, python3Packages
, enableOCR ? false
, qemu_pkg ? qemu_test
, coreutils
, imagemagick_light
, netpbm
, qemu_test
, socat
, ruff
, tesseract4
, vde2
, extraPythonPackages ? (_ : [])
, nixosTests
}:
let
fs = lib.fileset;
in
python3Packages.buildPythonApplication {
pname = "nixos-test-driver";
version = "1.1";
pyproject = true;

src = fs.toSource {
root = ./.;
fileset = fs.unions [
Expand All @@ -30,50 +27,37 @@ python3Packages.buildPythonApplication {
./extract-docstrings.py
];
};
pyproject = true;

build-system = with python3Packages; [
setuptools
];

dependencies =
with python3Packages;
[
colorama
junit-xml
ptpython
]
propagatedBuildInputs = [
coreutils
netpbm
python3Packages.colorama
python3Packages.junit-xml
python3Packages.ptpython
qemu_pkg
socat
vde2
]
++ (lib.optionals enableOCR [ imagemagick_light tesseract4 ])
++ extraPythonPackages python3Packages;

propagatedBuildInputs =
[
coreutils
netpbm
qemu_pkg
socat
vde2
]
++ lib.optionals enableOCR [
imagemagick_light
tesseract4
];
nativeBuildInputs = [
python3Packages.setuptools
];

passthru.tests = {
inherit (nixosTests.nixos-test-driver) driver-timeout;
};

doCheck = true;

nativeCheckInputs = with python3Packages; [
mypy
ruff
];

nativeCheckInputs = with python3Packages; [ mypy ruff black ];
checkPhase = ''
echo -e "\x1b[32m## run mypy\x1b[0m"
mypy test_driver extract-docstrings.py
echo -e "\x1b[32m## run ruff check\x1b[0m"
echo -e "\x1b[32m## run ruff\x1b[0m"
ruff check .
echo -e "\x1b[32m## run ruff format\x1b[0m"
ruff format --check --diff .
echo -e "\x1b[32m## run black\x1b[0m"
black --check --diff .
'';
}
6 changes: 5 additions & 1 deletion nixos/lib/test-driver/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ find = {}
test_driver = ["py.typed"]

[tool.ruff]
target-version = "py312"
line-length = 88

lint.select = ["E", "F", "I", "U", "N"]
Expand All @@ -36,6 +35,11 @@ ignore_missing_imports = true
module = "junit_xml.*"
ignore_missing_imports = true

[tool.black]
line-length = 88
target-version = ['py39']
include = '\.pyi?$'

[tool.mypy]
warn_redundant_casts = true
disallow_untyped_calls = true
Expand Down
27 changes: 13 additions & 14 deletions nixos/lib/test-driver/test_driver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import signal
import tempfile
import threading
from collections.abc import Callable, Iterator
from contextlib import AbstractContextManager, contextmanager
from contextlib import contextmanager
from pathlib import Path
from typing import Any
from typing import Any, Callable, ContextManager, Dict, Iterator, List, Optional, Union

from colorama import Fore, Style

Expand Down Expand Up @@ -45,17 +44,17 @@ class Driver:
and runs the tests"""

tests: str
vlans: list[VLan]
machines: list[Machine]
polling_conditions: list[PollingCondition]
vlans: List[VLan]
machines: List[Machine]
polling_conditions: List[PollingCondition]
global_timeout: int
race_timer: threading.Timer
logger: AbstractLogger

def __init__(
self,
start_scripts: list[str],
vlans: list[int],
start_scripts: List[str],
vlans: List[int],
tests: str,
out_dir: Path,
logger: AbstractLogger,
Expand All @@ -74,7 +73,7 @@ def __init__(
vlans = list(set(vlans))
self.vlans = [VLan(nr, tmp_dir, self.logger) for nr in vlans]

def cmd(scripts: list[str]) -> Iterator[NixStartScript]:
def cmd(scripts: List[str]) -> Iterator[NixStartScript]:
for s in scripts:
yield NixStartScript(s)

Expand Down Expand Up @@ -120,7 +119,7 @@ def subtest(self, name: str) -> Iterator[None]:
self.logger.error(f'Test "{name}" failed with error: "{e}"')
raise e

def test_symbols(self) -> dict[str, Any]:
def test_symbols(self) -> Dict[str, Any]:
@contextmanager
def subtest(name: str) -> Iterator[None]:
return self.subtest(name)
Expand Down Expand Up @@ -208,7 +207,7 @@ def create_machine(
self,
start_command: str | dict,
*,
name: str | None = None,
name: Optional[str] = None,
keep_vm_state: bool = False,
) -> Machine:
# Legacy args handling
Expand Down Expand Up @@ -274,11 +273,11 @@ def check_polling_conditions(self) -> None:

def polling_condition(
self,
fun_: Callable | None = None,
fun_: Optional[Callable] = None,
*,
seconds_interval: float = 2.0,
description: str | None = None,
) -> Callable[[Callable], AbstractContextManager] | AbstractContextManager:
description: Optional[str] = None,
) -> Union[Callable[[Callable], ContextManager], ContextManager]:
driver = self

class Poll:
Expand Down
Loading
Loading