samueldr changed the topic of #nixos-infra to: NixOS infrastructure | logs: https://logs.nix.samueldr.com/nixos-infra/
<tilpner> garbas: I don't anymore, but I wrote a module to mirror NixOS channels, which relies on store-paths.xz. I sent that module to monokrome after they expressed an interest in doing the same, and we noticed it no loner works because store-paths.xz no longer exists
<ikwildrpepper> tilpner: is the mirror code somewhere public?
<tilpner> No, but it's really simple
<garbas> tilpner: would a solution be that you first get a redirect url from https://nixos.org/channels/nixos-unstable and then attach store-patch.xz?
<garbas> tilpner: to really redirect properly we could use some aws lamda function to properly redirect
<gchristensen> oof
<garbas> arhg... just woke up and i don't have the ability to form sentances
<garbas> tilpner: also you probably want to use https://channels.nixos.org directly without going via nixos.org
<garbas> i guess we would have to do something like described here https://aws.amazon.com/blogs/networking-and-content-delivery/leveraging-external-data-in-lambdaedge/
<gchristensen> I would very much like to avoid using lambda
<garbas> me too, but i don't see the eaier solution then this
<gchristensen> how about "not doing it"
<gchristensen> is it possible to not do it?
<garbas> it is a bit weird that we only redirect some parts of the url but not others. i think this is where confusion is.
<garbas> we can leave it as it is and just explain how things work
<garbas> and how to work around them
<garbas> s/them/limitations/
<gchristensen> or solve the problem differently, like opening an issue with netlify, or maybe something other than netlify
<garbas> this is not a netlify issue.
<gchristensen> ah
<garbas> it is about nix-channels s3 bucket
<garbas> netlify redirects correctly nixos.org/channels/:splat to channels.nixos.org/:splat
<garbas> but aws s3 does not support this kind of redirects. you can only create objects in s3 cache to redirect
<garbas> we used s3 bucket (for channels.nixos.org) out of convinience since channel script already knew how to handle s3 buckets
<garbas> gchristensen: out of curiosity, why are you against aws lamda@edge?
<gchristensen> it adds so much complication, and moves us to spooky action at a distance. everything about how the bucket and the cache works is so clear and easy to follow, and this takes it a step beyond I think
<gchristensen> and s3-likes no longer become viable alternatives
<samueldr> what's the issue with that redirection? can't we redirect it like we do other elements of the bucket?
<tilpner> garbas: That's a workaround, and yes, it might work
<tilpner> garbas: I'm just reporting breakage of a URL that worked before, assuming it would need fixing
<tilpner> garbas: How does https://channels.nixos.org/nixos-19.09 work? It redirects to releases.n.o, but applying the same rewrite to the full URL doesn't work?
<tilpner> (I'll note again that this is a module I no longer use, I'm not looking to fix it)
<garbas> i knew writing this down will be useful :P
<tilpner> (L334 is more appropriate, non-NixOS channels have store paths too)
<garbas> i know that, but should we then just redirect whole thing rather?
<tilpner> Can we?
<tilpner> If that was an option all along, why is the script creating individual redirections?
<garbas> using lambda@edge we can. or maybe we need to switch away from s3 bucket for this usecase
<tilpner> Oh, no
<tilpner> Another band-aid^Wredirection seems like a much cheaper fix
<garbas> sure, but i thought to mention it that this will come back to hunt us at one point
<gchristensen> it will?
<garbas> if we create new artifact for a release. we need to remember to also create a fix in channel script
<samueldr> I don't think it will haunt us later, we should be precise and list every redirection, rather than rely on automagic redirection
<tilpner> It might, but if the answer is "let's redo channel serving" I'll drop the issue
<samueldr> what we should do is review that script so it's automatic that an artifact has a redirection
<gchristensen> good idea samueldr
<garbas> +1
<samueldr> I was tempted to rewrite it last time I worked on it, but I don't know how well-appreciated it would be to go from Perl to Ruby
<gchristensen> probably not greatly appreciated :P
<samueldr> (and bash isn't really an option to keep us sane)
<tilpner> I'll send the +1/-0 PR, feel free to close for any reason
<garbas> tilpner: tnx!
<tilpner> nixos-channel-scripts#36
<tilpner> ._. Don't we have a bot?
<gchristensen> oh heh I can get {^_^} in here :)