!RROtHmAaQIkiJzJZZE:nixos.org

NixOS Infrastructure

387 Members
Next Infra call: 2024-07-11, 18:00 CEST (UTC+2) | Infra operational issues backlog: https://github.com/orgs/NixOS/projects/52 | See #infra-alerts:nixos.org for real time alerts from Prometheus.120 Servers

Load older messages


SenderMessageTime
19 Nov 2025
@vcunat:matrix.orgVladimír ČunátOh wait.16:29:08
@vcunat:matrix.orgVladimír ČunátWrong command at first, but correct statement, I think.16:31:53
@vcunat:matrix.orgVladimír Čunát
grep -F download-by-type/file/squashfs-image /var/log/nginx/access.log | grep -F distrobuilder | grep -F /build/

This command shows empty. Without the last grep I see them. i.e. distrobuild agents only look at the /job/nixos/... URLs and not the followup /build/... URLs.

16:33:11
@adam:robins.wtfadamcstephens👍 thanks16:34:02
@adam:robins.wtfadamcstephensIt's anubis16:54:26
@adam:robins.wtfadamcstephenswhich also explains why it's not following redirects. it gets the anubis page returned and doesn't even know about them16:55:39
@adam:robins.wtfadamcstephens
<p>This website is running Anubis version <code>v1.23.1</code>.</p>
16:57:43
@vcunat:matrix.orgVladimír ČunátOK, so you need an exception to bypass Anubis for this use case.17:06:33
@vcunat:matrix.orgVladimír Čunát adamcstephens: can you retry now? 17:10:24
@vcunat:matrix.orgVladimír Čunát(just trying a quick prototype)17:10:43
@adam:robins.wtfadamcstephensstill got the anubis page17:11:14
@vcunat:matrix.orgVladimír ČunátI suppose someone more capable than me in this would have a look 😅17:17:20
@adam:robins.wtfadamcstephens

In theory a bot policy as below should work, but it isn't scoped at all if that is desired. I don't see managed policies already in nixos/infra though, and not sure how the defaults are handled by adding one...

- name: distrobuilder
  user_agent_regex: distrobuilder
  action: ALLOW
17:21:57
@vcunat:matrix.orgVladimír ČunátI thought we have these here https://github.com/NixOS/infra/blob/main/build/hydra-proxy.nix#L9617:23:15
@vcunat:matrix.orgVladimír ČunátBut maybe I'm wrong.17:23:24
@vcunat:matrix.orgVladimír Čunáti.e. the approach is to allow some URLs, not some agents.17:24:06
@adam:robins.wtfadamcstephensahh17:24:59
@hexa:lossy.networkhexaI assume an anubis update was backported and that caused this change in behavior17:31:19
@adam:robins.wtfadamcstephens that rule should handle the intermediate and final redirects, but not the initial request /job/nixos/trunk-combined/nixos.incusContainerImage.x86_64-linux/latest/download-by-type/file/squashfs-image 17:31:27
@adam:robins.wtfadamcstephensyeah, i kinda guessed it was an anubis update given the infra git history17:31:43
@adam:robins.wtfadamcstephens how about /job/[^/]+/[^/]+/[^/]+/latest/download-by-type/[^/]+ ? 17:39:47
@adam:robins.wtfadamcstephensmaybe a bit more explicit than the others, so could drop the last match17:42:04
@vcunat:matrix.orgVladimír Čunát

🤷 deployed

      locations."~ ^/job/[^/]+/[^/]+/[^/]+/latest/download-by-type/[^/]+" = {
        proxyPass = "http://hydra-server";
      };

(temporarily)

17:42:55
@adam:robins.wtfadamcstephenshmm, still no luck17:44:24
@adam:robins.wtfadamcstephensstrangely it works for curl with a distrobuilder user-agent, but not with the go program itself. 17:48:50
@adam:robins.wtfadamcstephensI'm assuming that's anubis trusting curl, but detecting the go application and blocking it17:50:48
@adam:robins.wtfadamcstephensnot sure why that regex isn't matching though. :/17:58:33
@vcunat:matrix.orgVladimír Čunát 🤔 appended another /[^/]+ to cover the whole URL, I think. But I don't know. 18:05:54
@adam:robins.wtfadamcstephens i think the ~ is a partial match. but i'm also pretty rusty with nginx rules 18:10:55
@adam:robins.wtfadamcstephensstill fails18:11:16

Show newer messages


Back to Room ListRoom Version: 6