Commit Graph

813 Commits

Author SHA1 Message Date
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ß
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
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
Ivor Wanders
16bb3aad9a Add a link to the raw log. 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
Dionysis Grigoropoulos
c8549d138d fix: Update Nix download url 2025-09-07 22:48:40 -04:00
Pierre Bourdon
17f9920cf9 jobset-eval: fix actions not showing up sometimes for new jobs
New jobs have their "new" status take precedence over them being
"failed" or "queued", which means actions that can act on "failed" or
"queued" jobs weren't shown to the user when they could only act on
"new" jobs.

(cherry picked from commit 9a4a5dd624)
2025-05-14 20:29:25 -04:00
Martin Weinelt
47158cf360 web: increase colspan for machine row in machine status 2025-05-14 20:29:25 -04:00
Maximilian Bosch
c7972c3687 Fix displaying eval errors in jobset eval view
Quickfix for something that annoyed me once too often.

Specifically, I'm talking about `/eval/1#tabs-errors`.

To not fetch long errors on each request, this is only done on-demand.
I.e., when the tab is opened, an iframe is requested with the errors.
This iframe uses a template for both the jobset view and the jobset-eval
view. It is differentiated by checking if `jobset` or `eval` is defined.

However, the jobset-eval view also has a `jobset` variable in its stash
which means that in both cases the `if` path was used. Since
`jobset.fetcherrormsg` isn't defined in the eval case though, you always
got an empty error.

The band-aid fix is relatively simple: swap if and else: the `eval`
variable is not defined in the stash of the jobset view, so now this is
a useful condition to decide which view we're in.

(cherry picked from commit 70c3d75f73)
2025-05-14 20:29:25 -04:00
Pierre Bourdon
65618fd590 web: replace 'errormsg' with 'errormsg IS NULL' in most cases
This is implement in an extremely hacky way due to poor DBIx feature
support. Ideally, what we'd need is a way to tell DBIx to ignore the
errormsg column unless explicitly requested, and to automatically add a
computed 'errormsg IS NULL' column in others. Since it does not support
that, this commit instead hacks some support via method overrides while
taking care to not break anything obvious.
2025-04-09 11:31:47 -04:00
Pierre Bourdon
08bf31b71a queue-runner: limit parallelism of CPU intensive operations
My current theory is that running more parallel xz than available CPU
cores is reducing our overall throughput by requiring more scheduling
overhead and more cache thrashing.
2025-04-09 11:31:47 -04:00
Pierre Bourdon
641056bd0e web: Skip System on /machines
It is redundant
2025-04-09 11:31:47 -04:00
ajs124
17094c8371 lazy-load evaluation errors
Closes #1362
2025-04-09 11:31:47 -04:00
Maximilian Bosch
d5fb163618 Only show stepname if it doesn't equal the name of the drv
When building e.g. nixpkgs, the "Running builds" view will mostly look
like this

    hello.x86_64-linux (Build of hello-X.Y)
    exa.x86_64-linux (Build of exa-X.Y)
    ...

This doesn't provide any useful information. Showing the step name only
makes sense if it's not a child of the job's derivation. With this
patch, that information will only be shown if the drv name (i.e. w/o
`/nix/store/` prefix, .drv ext & hash) is not equal to the drv name of
the job itself (build.nixname).
2025-04-09 11:31:47 -04:00
Maximilian Bosch
baec2bbb4c Running builds view: show build step names
When using Hydra to build machine configurations, you'll often see
"nixosConfigurations.foo" five times, i.e. for each build step being
run. This isn't very helpful I think because in such a case, a single
build step can also be compiling the Linux kernel.

This change also fetches the `drvpath` and `type` from the `buildsteps`
relation. We're already joining it, so this doesn't make much difference
(confirmed via query logging that this doesn't cause extra SQL queries).

Unfortunately build steps don't have a human readable name, so I'm
deriving it from the drvpath by stripping away the hash (assuming that
it'll never contain a `-` and that `/nix/store/` is used as prefix). I
decided against using the Nix bindings for that to avoid too much
overhead due to store operations for each build step.
2025-04-09 11:31:47 -04:00
Maximilian Bosch
b55bd25581 Make "timed out" and "log limit exceeded" builds aborted
In 73694087a0 I gave builds that failed
because of a timeout or exceeded log limit a stop sign and I stand by
that reasoning: with that it's possible to distinguish between actual
build failures and rather transient things such as timeouts.

Back then I considered it a feature that these are shown in a different
tab, but I don't think that's a good idea anymore. When using a jobset to
e.g. track the regressions from a mass rebuild (like a compiler or gcc
update), "Newly failed builds" should exclusively display regressions (and
flaky builds of course, not much I can do about that).

Also, when a bunch of builds fail in such a jobset because of e.g. a
broken connection to a builder that results in a timeout, I want to be
able to restart them all w/o rebuilding actual regressions.

To make it clear that we not only have "Aborted" builds in the tab, I
renamed the label to "Aborted / Timed out".
2025-04-09 11:31:47 -04:00
Pierre Bourdon
1ca17faed4 web: include current step status on /machines 2025-04-09 11:31:47 -04:00
Josef Kemetmüller
590e8d8511 Fix rendering of metrics with special characters
My main motivation here is to get metrics with brackets to work in order
to support "pytest" test names:

- test_foo.py::test_bar[1]
- test_foo.py::test_bar[2]

I couldn't find an "HTML escape"-style function that would generate
valid html `id` attribute names from random strings, so I went with a
hash digest instead.
2025-04-09 11:31:47 -04:00
John Ericson
85383b9522 Render the nix-eval-jobs version too 2025-02-07 16:55:28 -05:00
Janne Heß
3b16941b14 Merge pull request #1424 from AsterisMono/fix-darwin-tmp-path
reproduce.tt: Use realpath for tmpDir to fix macOS compatibility
2024-11-26 08:53:13 +01:00
Chatnoir Miki
6456c1d7d6 reproduce.tt: Use realpath for tmpDir to fix macOS compatibility 2024-11-25 11:41:47 +08:00
Pierre Bourdon
182a48c9fb autotools -> meson
Original commit message:

> There are some known regressions regarding local testing setups - since
> everything was kinda half written with the expectation that build dir =
> source dir (which should not be true anymore). But everything builds and
> the test suite runs fine, after several hours spent debugging random
> crashes in libpqxx with MALLOC_PERTURB_...

I have not experienced regressions with local testing.

(cherry picked from commit 4b886d9c45cd2d7fe9b0a8dbc05c7318d46f615d)
2024-11-24 15:58:26 -05:00
Martin Weinelt
f730433789 Create eval-jobset role and guard /api/push route 2024-08-27 19:49:05 +02:00
Janne Heß
916531dc9c api: Require POST for /api/push 2024-08-27 17:52:13 +02:00
Niklas Hambüchen
bc19e7cd65 renderInputDiff: Increase git hash length 8 -> 12
See investigation on lengths required to be conflict-free in practice:

https://github.com/NixOS/hydra/pull/1258#issuecomment-1321891677
2024-07-20 23:45:12 +02:00
Maximilian Bosch
669617ab54 Use submit event in login form
It's a pet peeve from me when logging into my personal Hydra that I
always have to press the button rather than hitting Return after entering
my password.

Reason for that is that the form doesn't have a "submit" button, so far
it was always listened to the "click" event. Submit does that and you
can hit Return alternatively.
2024-03-07 18:49:52 +01:00
Pierre Bourdon
6df06b089e web: disable Sign in with Google popup 2024-01-25 09:27:46 +01:00
Janne Heß
c1a5ff3959 Merge pull request #1258 from nh2/patch-1
`renderInputDiff`: Increase git hash length 6 -> 8
2023-09-09 17:17:43 +02:00
Rob Vermaas
f88bef15ed Use new Google for Web signin, the old way will be deprecated Mar 31st 2023 2023-03-14 09:04:12 +01:00
Niklas Hambüchen
d1d171ee90 renderInputDiff: Increase git hash length 6 -> 8
Nixpkgs has so many commits that length 6 is often ambiguous,
making the use of the shown values with git difficult.
2022-11-02 17:30:32 +01:00
Janne Heß
312cb42275 Merge pull request #1234 from helsinki-systems/feat/squiggly-line
Add a squiggly line to the Hydra link on hover
2022-10-21 22:57:20 +02:00
Janne Heß
9addaeb17f Add a squiggly line to the Hydra link on hover
The effect is the same as the one on links in mail bodys on
https://lists.apache.org/
2022-08-17 11:44:19 +02:00
K900
2b8a8fdd9c Make the tree a little less dense 2022-08-12 09:46:32 +03:00
K900
93bbd6925b Also restore the "expand all" and "collapse all" buttons 2022-08-12 09:46:17 +03:00
K900
74caaa696e Run the JS code to make build trees collapsible at the right time 2022-08-11 13:30:19 +03:00
Janne Heß
e2756042b8 Merge pull request #965 from helsinki-systems/css_more_content
Fit more content on screen
2022-07-13 23:47:04 +02:00
Graham Christensen
5c90edd19f Merge pull request #1103 from DeterminateSystems/runcommand/dynamic
Dynamic RunCommand
2022-04-19 10:09:47 -04:00
ajs124
1c84676527 Fit more content on screen 2022-02-13 18:33:37 +01:00
Janne Heß
6d146deaf0 build-graphs: Fix readability in dark mode 2022-02-13 14:00:17 +01:00
Graham Christensen
27ddde1e9e dynamic runcommand: print a notice on the build page if it is disabled 2022-02-11 15:04:54 -05:00
Cole Helbling
d680c209fe edit-project.tt: disable when disabled by server
Also add a tooltip describing why it's disabled, to make it easier to
chase down.
2022-02-11 14:35:52 -05:00
Cole Helbling
6053e5fd4b edit-jobset.tt: disable when disabled by project and server
Also add a tooltip describing why it's disabled, to make it easier to
chase down.
2022-02-11 14:35:52 -05:00
Cole Helbling
dfd3a67424 project.tt: more info on why Dynamic RunCommand is disabled 2022-02-11 14:35:52 -05:00
Cole Helbling
3f4f183792 jobset.tt: more info on why Dynamic RunCommand is disabled 2022-02-11 14:35:52 -05:00
Graham Christensen
8a96f07f58 Project: enable enabling dynamic runcommand per project 2022-02-01 10:58:54 -05:00
Graham Christensen
726ea80e99 HTTP/Jobset: support setting / reading enable_dynamic_run_command 2022-02-01 10:58:54 -05:00
Cole Helbling
34e4c119f4 build.tt: don't duplicate RunCommandLog buttons 2022-01-31 11:40:16 -08:00