Skip to content
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

Support repairPath on most stores. #8215

Merged
merged 1 commit into from
May 19, 2023

Conversation

Ericson2314
Copy link
Member

Motivation

More progress on issue #5729

The method trivially generalizes to be store-implementation-agnostic, in fact.

However, we force it to continue to be unimplemented with RemoteStore and LegacySSHStore because the implementation we'd get via the generalization is probably not the one users expect. This keeps our hands untied to do it right going forward.

Context

For more about the tension between the scheduler logic being store-type-agnostic and remote stores doing their own scheduling, see issues #5025 and #5056.

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • documentation in the internal API docs
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

@github-actions github-actions bot added the store Issues and pull requests concerning the Nix store label Apr 13, 2023
More progress on issue NixOS#5729

The method trivially generalizes to be store-implementation-agnostic, in
fact.

However, we force it to continue to be unimplemented with `RemoteStore`
and `LegacySSHStore` because the implementation we'd get via the
generalization is probably not the one users expect. This keeps our
hands untied to do it right going forward.

For more about the tension between the scheduler logic being
store-type-agnostic and remote stores doing their own scheduling, see
issues NixOS#5025 and NixOS#5056.
@Ericson2314 Ericson2314 force-pushed the general-repair-path branch from 658a16b to a6f85e0 Compare April 14, 2023 12:29
@Ericson2314
Copy link
Member Author

Ericson2314 commented Apr 20, 2023

@roberth and I discussed this somewhat. He was concerned overriding a default method to make it fail was a bit tricky.

One alternatively is simply go ahead and implement daemon protocol and legacy ssh protocol. That at least masks the issue.

The better, but much more invasive route, is to remove all these methods from Store and instead put them in a different class; let's call it Scheduler. I don't think this should be a subclass however, because the idea is that we can schedule with any store. (build/entry-points.cc would become a struct WrapStore : Scheduler.) It is just the RPC stores that are also schedulers.

I am worried that taking on the above will make for far more work, and more controversy, so I slightly lean towards merging this (or this + new protocol stuff) now. But if I am mistaken and there is broad agreement about this Scheduler thing, that would be good to know!

@edolstra edolstra merged commit 34381d5 into NixOS:master May 19, 2023
@Ericson2314 Ericson2314 deleted the general-repair-path branch May 19, 2023 13:22
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-05-19-nix-team-meeting-minutes-56/28446/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
store Issues and pull requests concerning the Nix store
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants