Commit Graph

4419 Commits

Author SHA1 Message Date
Janne Heß
4125de8208 templates: Make whitespace in [% %] consistent 2025-09-07 22:48:40 -04:00
Janne Heß
06c6bd1b7b templates: Use HTML.attributes for all links 2025-09-07 22:48:40 -04:00
Janne Heß
bb78a58ea2 build: Properly escape all input values 2025-09-07 22:48:40 -04:00
Janne Heß
0764b1f48c product-list: Escape untrusted values 2025-09-07 22:48:40 -04:00
Janne Heß
5014274c99 hydra-queue-runner: Validate metric type 2025-09-07 22:48:40 -04:00
Janne Heß
8f3fdc14d8 hydra-queue-runner: Validate hydra-metrics unit 2025-09-07 22:48:40 -04:00
Janne Heß
74d923441e hydra-queue-runner: Validate metric name in hydra-metrics 2025-09-07 22:48:40 -04:00
Janne Heß
9396846892 hydra-queue-runner: Validate release name 2025-09-07 22:48:40 -04:00
Janne Heß
252801cea8 hydra-queue-runner: Verify product names in hydra-build-products 2025-09-07 22:48:40 -04:00
Janne Heß
21a75982aa hydra-queue-runner: Fix potential UB
Removing two characters from a string when it starts with " can lead to
a substring call with -1
2025-09-07 22:48:40 -04:00
Janne Heß
3eeba86a87 hydra-queue-runner: Fix crash when < > are in hydra-build-products
This prevents a forever-hanging build (don't know why) when < or > are
in the path of hydra-build-products. This is not to prevent any XSS (see
next commits), just to prevent the DOS (if you can even call it that).
2025-09-07 22:48:40 -04:00
Jörg Thalheim
b295744323 package.nix: fix PATH for devshell
We don't install scripts to build so this must point to src
2025-09-07 22:48:40 -04:00
Jörg Thalheim
ed939f44f4 ci: also build on aarch64-linux 2025-09-07 22:48:40 -04:00
Jörg Thalheim
a44d946e09 cache build with the magic nix cache 2025-09-07 22:48:40 -04:00
Jörg Thalheim
64e05c24e2 queue-runner: Add missing signal.h include for SIGINT and kill() 2025-09-07 22:48:40 -04:00
Jörg Thalheim
5187992c94 Migrate from deprecated notification_receiver to connection::listen()
libpqxx 7.10.1 deprecates the notification_receiver class.
2025-09-07 22:48:40 -04:00
Jörg Thalheim
aee4e406e9 Fix libpqxx 7.10.1 API compatibility
- Replace deprecated exec_params/exec_params0 calls with exec()
- Wrap all parameterized queries with pqxx::params{}
- Add .no_rows()/.one_row() to exec calls that don't return results
2025-09-07 22:48:40 -04:00
Jörg Thalheim
44b007c167 hydra-eval-jobs: unset NIX_PATH 2025-09-07 22:48:40 -04:00
Jörg Thalheim
b0ccc5aa49 docs/hacking: document how to run single tests 2025-09-07 22:48:40 -04:00
Janne Heß
6ea6d8fc70 machine-status: Fixup double localhost during development 2025-09-07 22:48:40 -04:00
Janne Heß
bfd2a4c4f9 machine-status: Make new runner status prettier
- Remove bottom margin
- Properly format memory in human format
- Calculate free memory
- Format the load with 2 digits after comma
- Lpad pressure percentages
- Use a macro to render pressure
- Score -> Scheduling Score
- More spacing in the load
- Add IRQ pressure
2025-09-07 22:48:40 -04:00
Janne Heß
ea2024a9bc machine-status: Render new queue runner details 2025-09-07 22:48:40 -04:00
Janne Heß
81d278fe5b Remove useless previous eval message
This message serves no purpose and looks like something went wrong.
There is nothing wrong, there is just no previous evaluation.
2025-09-07 22:48:40 -04:00
Janne Heß
5bb8da7280 Fix the evaluator not finding hydra-eval-jobset 2025-09-07 22:48:40 -04:00
Janne Heß
15e742c8c2 Fixup static libraries in development server 2025-09-07 22:48:40 -04:00
Janne Heß
f9d7629f95 Fix meson and ninja commands and link bootstrap 2025-09-07 22:48:40 -04:00
Janne Heß
6eeb08fc0a Add nix-direnv 2025-09-07 22:48:40 -04:00
Janne Heß
c396bc958f Document how to connect to postgres 2025-09-07 22:48:40 -04:00
Andreas Rammhold
60876ef897 Add Queue Runner Status to the topbar
I've been searching for this waaay too often in the past and I simply do not see a reason not to include it in the topbar by default.
2025-09-07 22:48:40 -04:00
Janne Heß
83db317594 Fix PATH for the foreman scripts 2025-09-07 22:48:40 -04:00
Janne Heß
dc6fd37e02 Show queue runner v2 status
This is guarded behind a setting and will overwrite everything that was
learned from the machines file. Also drops `sshKeys` since that wasn't
used anyway.
2025-09-07 22:48:40 -04:00
Ivor Wanders
16bb3aad9a Add a link to the raw log. 2025-09-07 22:48:40 -04:00
Sandro
710092c556 module: sync with nixpkgs 2025-09-07 22:48:40 -04:00
Janne Heß
fdcb6b4a1b Fix local store detection and related issues
- Add localStore into the stash because it's used in templates
- Hide the Channels button for non-local stores because the link 404s
  anyway
- Fix a style issue when having popovers in dark mode
2025-09-07 22:48:40 -04:00
Martin Weinelt
329816aec4 Replace nettools with hostname-debian
As far as I understand we include nettools for its hostname executable
used by the Sys-Hostname-Long perl package. But if we just need that then
the hostname-debian package provides a simpler and better maintained
version.
2025-09-07 22:48:40 -04:00
Dionysis Grigoropoulos
c8549d138d fix: Update Nix download url 2025-09-07 22:48:40 -04:00
Mic92
794150319c flake.lock: Update 2025-09-07 22:48:40 -04:00
Jörg Thalheim
9dcb046bf5 add update-flakes action 2025-09-07 22:48:40 -04:00
Jörg Thalheim
154886d134 test: bump used nix version 2025-09-07 22:48:40 -04:00
Julien Marquet
c15b1601c6 docs: refine instructions for proxy setting 2025-09-07 22:48:40 -04:00
Thomas Nixon
ae8c1554cb doc/manual: correct nginx reverse proxy example
- hydra does not remove the base URI from the request before processing
  it, so this must be done in the reverse proxy. in nginx this is done
  by giving proxy_pass a URI rather than a protocol/host/port; see:

  https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass

- proxy_redirect is not correct/required: hydra uses proxy headers to
  correctly form redirects in most cases, and where it doesn't it
  produces local redirects which aren't matched by this directive anyway
2025-06-01 01:37:20 -04:00
John Ericson
de10c0e0fb Fix build with Nix 2.29 2025-06-01 01:37:20 -04:00
John Ericson
e6df0c141c flake.lock: Update Nix and nix-eval-jobs to 2.29
Flake lock file updates:

• Updated input 'nix':
    'github:NixOS/nix/70921714cb3b5e6041b7413459541838651079f3?narHash=sha256-ZbB3IH9OlJvo14GlQZbYHzJojf/HCDT38GzYTod8DaU%3D' (2025-04-23)
  → 'github:NixOS/nix/d761dad79c79af17aa476a29749bd9d69747548f?narHash=sha256-rCpANMHFIlafta6J/G0ILRd%2BWNSnzv/lzi40Y8f1AR8%3D' (2025-05-25)
• Updated input 'nix-eval-jobs':
    'github:nix-community/nix-eval-jobs/1260c6599d22dfd8c25fea6893c3d031996b20e1?narHash=sha256-n220U5pjzCtTtOJtbga4Xr/PyllowKw9anSevgCqJEw%3D' (2025-04-11)
  → 'github:nix-community/nix-eval-jobs/d9262e535e35454daebcebd434bdb9c1486bb998?narHash=sha256-AJ22q6yWc1hPkqssXMxQqD6QUeJ6hbx52xWHhKsmuP0%3D' (2025-05-25)
2025-06-01 01:37:20 -04:00
John Ericson
78f57b82f7 flake.lock: Update Nixpkgs to 25.05
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/eea3403f7ca9f9942098f4f2756adab4ec924b2b?narHash=sha256-JT1wMjLIypWJA0N2V27WpUw8feDmTok4Dwkb0oYXDS4%3D' (2025-04-23)
  → 'github:NixOS/nixpkgs/db1aed32009f408e4048c1dd0beaf714dd34ed93?narHash=sha256-8A7HjmnvCpDjmETrZY1QwzKunR63LiP7lHu1eA5q6JI%3D' (2025-05-24)
2025-06-01 01:37:20 -04:00
Martin Weinelt
2b0729da7a Migrate from "gc-" prefixed nix options
These have been deprecated, e.g. gc-keep-outputs is now just
keep-outputs.
2025-06-01 01:37:20 -04:00
Sandro
84ce142a9d Add missing slash
error: access to absolute path '/nix/store/sai35xfsrba2a2vasmzxakmn54wdfa13-sourcepackaging' is forbidden in pure evaluation mode (use '--impure' to override)
2025-05-14 20:29:25 -04:00
Pierre Bourdon
0dd4c0cc8e queue runner: attempt at slightly smarter scheduling criteria
Instead of just going for "whatever is the oldest build we know of",
use the following first:

- Is the step more constrained? If so, schedule it first to avoid
  filling up "more desirable" build slots with less constrained builds.

- Does the step have more dependents? If so, schedule it first to try
  and maximize open parallelism and breadth of scheduling options.

(cherry picked from commit b8d03adaf4)
2025-05-14 20:29:25 -04:00
Jörg Thalheim
21f793e21b hydra: expose nix-cli package
This makes it easier in other packages to get the nix version used to
build Hydra.
2025-05-14 20:29:25 -04:00
John Ericson
1001b67704 Use Nix without the flake
This is what we do for `nix-eval-jobs` already. It allows for more
fine-grained control over dependencies.
2025-05-14 20:29:25 -04:00
Martin Weinelt
d5d4d19a4c flake.lock: Update
Flake lock file updates:

• Updated input 'nix':
    'github:NixOS/nix/a4962f73b5fc874d4b16baef47921daf349addfc' (2025-04-07)
  → 'github:NixOS/nix/70921714cb3b5e6041b7413459541838651079f3' (2025-04-23)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/db8f4fe18ce772a9c8f3adf321416981c8fe9371' (2025-04-07)
  → 'github:NixOS/nixpkgs/eea3403f7ca9f9942098f4f2756adab4ec924b2b' (2025-04-23)
2025-05-14 20:29:25 -04:00