-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Chore] Make it possible to override input instead of updating #30
base: master
Are you sure you want to change the base?
Conversation
Problem: We'd like to have an ability to massively apply flake inputs overrides in our repos in order to test some updates before merging potentially breaking changes. Solution: Make it possible to specify an attrset of input name and override url in the list of inputs to update. For each such entry in the inputs list, 'flake.lock' update will be done using '--override-input' instead of '--update-input'. Config usage example for the overriding: ``` ... "inputs": [ { "input": "nixpkgs", "override_url": "github:nixos/nixpkgs" } ], "repos": [ { "owner": "serokell", "repo": "update-daemon", "settings": {}, "type": "github" } ], ... ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely get the overall idea, but I'm very fuzzy on the details of how this would work, mostly because I don't know how/where update-daemon is actually run. Is the intention to basically change the config before doing an update proper and seeing how that pans out in auto-update PRs? Is there a qualitative difference from actually doing the update in the first place and seeing how things shake out (aside from which repo the commits switching out versions end up in)?
Yes, more-or-less, but my idea was to create separate PRs for this, e.g. see https://github.com/serokell/aquarius-infra/pull/169
Just to attempt to catch issues from the "upstream" (e.g. sometimes |
Currently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so I've looked over the related slack thread, and I think I have a better grasp of the intent. As an "advance warning system" this makes sense. So correct me if I'm wrong, you're essentially planning to do something like nix flake lock --override-input nixpkgs github:NixOS/nixpkgs
every so often in a branch separate from the automatic-update one? In that case, I would suggest manually running it isn't really justified, you could just as well run it automatically. Anyway, IIUC, the changes in this here PR are fit for this purpose (although some additional setup is required on the infra side, but nothing too bad), so I'll approve this.
That being said, do you suppose adding --refresh
to the arguments while at it would make sense? I'm a little fuzzy on when exactly nix decides flake repos need redownloading, so maybe it's superfluous if you'll be running it rarely enough. OTOH, it shouldn't really hurt anything either, and could be helpful if you re-trigger manually within a short timespan.
Problem: We'd like to have an ability to massively apply flake inputs overrides in our repos in order to test some updates before merging potentially breaking changes.
Solution: Make it possible to specify an attrset of input name and override url in the list of inputs to update. For each such entry in the inputs list, 'flake.lock' update will be done using '--override-input' instead of '--update-input'.
Config usage example for the overriding:
Related YT issue: https://issues.serokell.io/issue/OPS-1478