gchristensen changed the topic of #nixos-borg to: https://www.patreon.com/ofborg https://monitoring.nix.ci/dashboard/db/ofborg?refresh=10s&orgId=1&from=now-1h&to=now "I get to skip reviewing the PHP code and just wait until it is rewritten in something sane, like POSIX shell. || https://logs.nix.samueldr.com/nixos-borg
orivej has joined #nixos-borg
<Mic92> I think we could need a cross-compiling tag. It is still an expert area within our reviewer group so not everyone can review those patches.
<{^_^}> [ofborg] @Mic92 opened pull request #274 → README.md: switch to workaround for running tests → https://git.io/fpRa3
<LnL> we don't have one?
<Mic92> I have never seen one, could be added based on string matching.
<gchristensen> how should a cross-relevant tag be added?
<Mic92> Would be matching on `cross` to fuzzy? Otherwise maybe something like: cross[ -]compil(ing|ation)
<Mic92> cross[ -]compil(e|ing|ation)
<Mic92> Maybe not so important right now. One could just use: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+sort%3Aupdated-desc+cross+is%3Aopen
<LnL> gchristensen: did you deploy or did I miss a case for the tests?
<LnL> that workaround shouldn't be necessary anymore
<gchristensen> ah I never did
<gchristensen> LnL: want to do that?
<LnL> I also can if you prefer
<gchristensen> sure, go ahead
<LnL> is the agent running?
<gchristensen> should be...
<gchristensen> I'll get it going.
<Mic92> The advantage of nixosTests though is that it runs also on aarch64
<gchristensen> the test command should too, no?
<Mic92> Might be, but it is not in the README
<Mic92> "Note: this will only run on x86_64-linux machines."
<Mic92> One weired thing about nixosTests is that it tries to rebuild the kernel everytime
<Mic92> Otherwise I would use it nix-review
<gchristensen> ah that oehhuuoo
<gchristensen> oops.
<gchristensen> I accidentally deployed my mediaserver's config to my router's device with force-reboot
<gchristensen> ok LnL should be going now
<Mic92> ^ this could go as a meme.
<gchristensen> which part? :)
<Mic92> I deployed X accidentally on Y.
<gchristensen> :D
<gchristensen> luckily it didn't boot at all since the FS's don't match
<Mic92> Now imagine we would have nixpart in place.
<gchristensen> yes, I think nixpart is a catastrophe waiting to happen
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nixos-borg
<gchristensen> I want to get Checks in to ofborg, but first I really need to ditch how I did the JWT auth and break it out in to a different API client, I think
<gchristensen> but I don't wanna :)
flokli has quit [Ping timeout: 252 seconds]
flokli has joined #nixos-borg
<MichaelRaskin> Why ofborg check passes --arg nixpkgs ./. to release.nix ?
<MichaelRaskin> The default value seems to have a different shape
<MichaelRaskin> gchristensen: what am I misunderstanding?
<gchristensen> hmmm good question
<gchristensen> I can reason it from the other side:
<MichaelRaskin> Oh I see
<MichaelRaskin> It was for enabling restricted mode
<gchristensen> > let x = { outPath = "./foo"; }; in "${x}"
<{^_^}> "./foo"
<MichaelRaskin> But it passed an argument of a wrong shape
<gchristensen> let's do a revert
<{^_^}> [ofborg] @grahamc pushed to revert-189-nixpkgs-restricted-mode « Revert " eval-checker: use explicit 'nixpkgs' argument for release.nix expressions" »: https://git.io/fpRx1
<{^_^}> [ofborg] @grahamc opened pull request #275 → Revert " eval-checker: use explicit 'nixpkgs' argument for release.nix expressions" → https://git.io/fpRxM
<MichaelRaskin> I think I know how to fix
<gchristensen> if you'd like, that would work for me!
<MichaelRaskin> --arg nixpkgs '{outPath=./.;revCount=999999;shortRev="ofBorg";}'
<MichaelRaskin> Instead of plain --arg nixpkgs ./.
<gchristensen> preferably ofborg instead of ofBorg in case of case weirdness
<gchristensen> can you send a patch?
<MichaelRaskin> Re-revert both commits and do a fix?
<gchristensen> I haven't pushed my revert to master
<gchristensen> s/master/released/
<MichaelRaskin> So just make a PR against released?
<gchristensen> yeah
<MichaelRaskin> The fun part is that this merge supersedes oxij's reasonable fix for a related problem.
<MichaelRaskin> Just a few days later
<gchristensen> oh?
<MichaelRaskin> Maybe not exactly, maybe it will end up to be complementary: https://github.com/NixOS/nixpkgs/pull/50774
<{^_^}> #50774 (by oxij, 3 days ago, merged): pkgs/test/nixos-functions: use dummy versioning
<gchristensen> ah
<MichaelRaskin> May I do the exact thing we tell people never to do?
<gchristensen> oh?
<MichaelRaskin> PR from released branch of my fork.
<gchristensen> I don't understand
<MichaelRaskin> People like to make (their first) Nixpkgs PRs from the master branch of the fork, then push there some more, then find out GitHub allows even force-pushes to PRs
<MichaelRaskin> So we ask to PR from feature branches
<gchristensen> ah hehe
<{^_^}> [ofborg] @7c6f434c opened pull request #276 → massrebuilder.rs: correct the shape of nixpkgs argument to release.nix → https://git.io/fpRp0
<gchristensen> MichaelRaskin: mind making them "ofborg" instead of "ofBorg"? in case there is some weird case-thing
<MichaelRaskin> oops
<MichaelRaskin> Fixed
<MichaelRaskin> Let me see if the tests problem is related…
<MichaelRaskin> (But the change in question should stand on its own — not sure how to test it cheaply)
orivej has quit [Ping timeout: 252 seconds]
<MichaelRaskin> Trying to run cargo test… it takes time to download all the dependencies
<MichaelRaskin> Hm. I think cargo test succeeds even without fixing things…
<gchristensen> hrm
<gchristensen> :)
<MichaelRaskin> I might be doing something wrong, but cargo test says
<MichaelRaskin> test nix::tests::instantiation_nixpkgs_restricted_mode ... ok
<gchristensen> hrm :/
<gchristensen> oh
<gchristensen> because the test doesn't care about the attrset, it just tostrings it
<gchristensen> which is fine
<MichaelRaskin> It tests a different simpler thing, indeed
<gchristensen> ok
<gchristensen> well
<gchristensen> let's get this out there
<{^_^}> [ofborg] @grahamc merged pull request #276 → massrebuilder.rs: correct the shape of nixpkgs argument to release.nix → https://git.io/fpRp0
<{^_^}> [ofborg] @grahamc pushed 2 commits to released: https://git.io/fpRhZ
<MichaelRaskin> Tell me when it is time to re-trigger eval
<gchristensen> will-do, thank you a lot
<MichaelRaskin> How I found this problem: I was chatting in a PR where I came just because I reacted to infinisil's call «do we have someone confident with bash to review that script?», and the eval check suddenly failed for mysterious reasons…
<gchristensen> todo: check that all the checks pass when PRing to ofborg
<MichaelRaskin> You mean that PR-version applied to Nixpkgs master doesn't create new check failures?
<gchristensen> yeah
<MichaelRaskin> Would be nice indeed
<gchristensen> I love nix-based deployments.
<gchristensen> doing the release.
<{^_^}> [ofborg] @grahamc closed pull request #275 → Revert " eval-checker: use explicit 'nixpkgs' argument for release.nix expressions" → https://git.io/fpRxM
<gchristensen> deployed
<MichaelRaskin> Thank you, waiting for eval
<gchristensen> MichaelRaskin: try it on just one PR to see how it goes?
<MichaelRaskin> That's exactly what I am have initiated before writing «waiting for eval»
<gchristensen> cool
<gchristensen> fingers crossed
<MichaelRaskin> The conversation in that PR is also funny. «I have a suspicion that the eval failure of ofborg is not caused by the code in the current PR.» — «I was going to ask your advice on running that down» (in that order)
<gchristensen> heh :/
<gchristensen> feels bad
<MichaelRaskin> Oh well, mistakes happen
<gchristensen> thank you :)
<MichaelRaskin> How long was that wrong version _deployed_, after all.
<MichaelRaskin> Hm, the test failure is older than that change, right?
<gchristensen> it was deployed about 5hrs ago
<MichaelRaskin> Much easier and faster to fix than the recent GitHub glitch!
<MichaelRaskin> (I mean the big one, not some small glitches today)
<gchristensen> hah
<gchristensen> what was the github glitch? oh boy
<MichaelRaskin> Well, eventual consistency sometimes behaves like eventual market efficiency
<gchristensen> oh, lol
<MichaelRaskin> Distributed database can take more time to reach consistency than you need to leave solvency, that kind of thing
<MichaelRaskin> Yay! checks passed
orivej has joined #nixos-borg
<gchristensen> yay!
<gchristensen> thank you for the report & patch :)
<MichaelRaskin> So
<MichaelRaskin> What is the plan about NixOS tests?
<gchristensen> well they should work now, no?
<MichaelRaskin> via ofBorg too?
<gchristensen> via @grahamcofborg test foo" yeah
<MichaelRaskin> I didn't touch anything related to them
<MichaelRaskin> I only touched eval, not build/test
<gchristensen> yeah, the patch LnL added was supposed to fix test
<LnL> uh oh
<MichaelRaskin> build.rs doesn't look like it is the case
<gchristensen> :/
<LnL> wait, how can that work on hydra
<gchristensen> the whole reimport thing seems weird to me to start with
<gchristensen> LnL: hydra passes in an attrset
<LnL> really? I thought it was just fetchGit
<gchristensen> fetchGit returns an attrset too :)
<gchristensen> nix-repl> builtins.fetchGit { url = "https://github.com/nixos/ofborg.git"; }
<gchristensen> fetching Git repository 'https://github.com/nixos/ofborg.git'warning: no common commits
<gchristensen> { outPath = "/nix/store/p5bpk81gcaz159lsv4iz3k18ms3i9wlh-source"; rev = "6e94d23ae0e48a73dbd4a2ee3017c0766ee8bde0"; revCount = 754; shortRev = "6e94d23"; }
<LnL> I knew that, but thought that was the only case
<gchristensen> oh
<gchristensen> hydra actually passes more than fetchGit
orivej has quit [Ping timeout: 252 seconds]
<LnL> well that assumption makes it pretty awkward with restricted mode :/
<gchristensen> what do you mean?
<gchristensen> I sort of think cleanSource just shouldn't be used
<LnL> it's for the tarball IIRC
<gchristensen> yeah, but the reason we need to pass in a nixpkgs argument is because, apparently, cleanSource ./.. is illegal in nixpkgs during restricted eval
<gchristensen> or no?
<gchristensen> no
<gchristensen> I don't know
<gchristensen> that isn't it
<LnL> import (cleanSource ./..) is disallowed, the rest is fine
<LnL> same with fetchGit
<gchristensen> I'm a bit annoyed by the change in nixos tests -- feeling weird about the bridges crossing from pkgs in to nixos
<gchristensen> (some with the pkgs.nixos function)
<gchristensen> feels like we're several of these are cropping up but maybe without enough planning / consideration
<gchristensen> I hope the RFC process improves, in order to more reasonably ask these changes go through RFC
<LnL> so for nixos tests that happens because the module system imports it
<flokli> gchristensen: eval is fixed, but nixos tests still seem to be broken: https://github.com/NixOS/nixpkgs/pull/50962#issuecomment-441307122
<MichaelRaskin> Not surprising
<gchristensen> :(
<LnL> I'm really confused, filterSource is used everywhere already so how come it even works now?
<MichaelRaskin> Maybe cleanSource/filterSource would work, but the path itself needs to be passed via --arg
<gchristensen> righc.t
<LnL> the path that fails is definitely filtered
<LnL> ok this is a bit of a mess, but nothing in the nixpkgs/nixos release.nix expressions imports those since that's bad
<gchristensen> so ofborg should pass a nixpkgs arg but not add it to the NIX_PATH?
<LnL> I wish hydra evaluation wasn't different in weird subtile ways
<gchristensen> last I heard, eelco would like to change hydra to evaluate with --pure
<LnL> pure implies restricted-mode right?
<gchristensen> yeah, but tighter
<LnL> if that was deployed the nixos jobsets on hydra would be broken
<gchristensen> yeah :)
<gchristensen> but maybe something we could move ofborg to
<gchristensen> making ofborg catch eval issues in nixos more deeply would be good, like explicitly evaluating all the tests on every PR
<gchristensen> (I'm a bit surprised that a PR which changed how all the tests were run, didn't actually test to see if the tests did run the existing way)
<LnL> yeah, that would avoid introducing a change like that with subtile but important changes
<LnL> the release expressions are very complicated
<gchristensen> very complicated
<gchristensen> is the problem at hand simply that builders need to pass --arg nixpkgs {...} when building?
<LnL> not if it's only used for metadata
<MichaelRaskin> I think import needs that --arg
<gchristensen> nix-build with --pure-eval is hilariously strict
<LnL> yeah, half of the builtins are gone :)
<gchristensen> ooohh! I can build my system with --pure-eval!
<gchristensen> https://github.com/NixOS/nixpkgs/commit/e2b5d5311ba59b6ae4619f6e5d5905e52d74df40 this seems to be the only nixpkgs change required
<globin> gchristensen: what did you call to check that?
<gchristensen> globin: https://github.com/grahamc/nixos-config/blob/pure-eval/build.sh this command in this branch