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

Expose a bunch of things in the Legacy SSH Store for Hydra #10748

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented May 20, 2024

Motivation

This allows Hydra to directly use LegacySSHStore, moving towards getting it using the store abstraction.

Context

This is used in NixOS/hydra#1444, which cannot be merged until this is merged. (And even then, only to the nix-next branch until there is a Nix release containing this.) See the green status on it and glorious net shorter diff for evidence of this PR's utility.

Depends on #10749

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added the store Issues and pull requests concerning the Nix store label May 20, 2024
@Ericson2314 Ericson2314 force-pushed the legacy-ssh-extensions-for-hydra branch 3 times, most recently from 59883f3 to 1faed84 Compare May 20, 2024 21:45
Copy link

dpulls bot commented May 20, 2024

🎉 All dependencies have been resolved !

@Ericson2314 Ericson2314 changed the base branch from master to nix-init-command May 20, 2024 22:13
@Ericson2314 Ericson2314 changed the base branch from nix-init-command to master May 20, 2024 22:13
@Ericson2314 Ericson2314 force-pushed the legacy-ssh-extensions-for-hydra branch 2 times, most recently from eb9e46a to e13f97b Compare May 23, 2024 15:32
@Ericson2314 Ericson2314 force-pushed the legacy-ssh-extensions-for-hydra branch 2 times, most recently from a419248 to 123a813 Compare February 14, 2025 02:12
Ericson2314 added a commit to NixOS/hydra that referenced this pull request Feb 14, 2025
Not until NixOS/nix#10748 lands

Flake lock file updates:

• Updated input 'nix':
    'github:NixOS/nix/970942f45836172fda410a638853382952189eb9?narHash=sha256-jGFuyYKJjJZsBRoi7ZcaVKt1OYxusz/ld1HA7VD2w/0%3D' (2025-02-12)
  → 'github:NixOS/nix/123a8131685861e1959737617d8edaecac14833c?narHash=sha256-nEeRWZKpCvzDCeYH1xWYKkvqtSWOd%2BZtzwrrPy5%2BSvI%3D' (2025-02-14)
• Updated input 'nix-eval-jobs':
    'github:Ericson2314/nix-eval-jobs/5e27c2724a4b07862e7ff1a198aa2ed68dea3e2c?narHash=sha256-7xgSdKnQW11eWd59MnpUNS%2BgwgtOJH2ShzLwByev3rg%3D' (2025-02-14)
  → 'github:Ericson2314/nix-eval-jobs/de345eb4518d952c2d86261b270f2c31edecd3de?narHash=sha256-dNMJY6%2BG3PwE8lIAhwetPJdA2DxCEKRXPY/EtHmdDh4%3D' (2025-02-14)
Ericson2314 added a commit to NixOS/hydra that referenced this pull request Feb 14, 2025
In NixOS/nix#10748 it is extended with
everything we need.
@Ericson2314 Ericson2314 marked this pull request as ready for review February 14, 2025 03:04
Ericson2314 added a commit to NixOS/hydra that referenced this pull request Feb 14, 2025
Not until NixOS/nix#10748 lands

Flake lock file updates:

• Updated input 'nix':
    'github:NixOS/nix/970942f45836172fda410a638853382952189eb9?narHash=sha256-jGFuyYKJjJZsBRoi7ZcaVKt1OYxusz/ld1HA7VD2w/0%3D' (2025-02-12)
  → 'github:NixOS/nix/123a8131685861e1959737617d8edaecac14833c?narHash=sha256-nEeRWZKpCvzDCeYH1xWYKkvqtSWOd%2BZtzwrrPy5%2BSvI%3D' (2025-02-14)
• Updated input 'nix-eval-jobs':
    'github:Ericson2314/nix-eval-jobs/5e27c2724a4b07862e7ff1a198aa2ed68dea3e2c?narHash=sha256-7xgSdKnQW11eWd59MnpUNS%2BgwgtOJH2ShzLwByev3rg%3D' (2025-02-14)
  → 'github:Ericson2314/nix-eval-jobs/de345eb4518d952c2d86261b270f2c31edecd3de?narHash=sha256-dNMJY6%2BG3PwE8lIAhwetPJdA2DxCEKRXPY/EtHmdDh4%3D' (2025-02-14)
Ericson2314 added a commit to NixOS/hydra that referenced this pull request Feb 14, 2025
In NixOS/nix#10748 it is extended with
everything we need.
@rickynils
Copy link
Member

@Ericson2314 Why could we not make the jump to ssh-ng directly? Since we need to coordinate the Nix and Hydra changes anyway?

@Ericson2314
Copy link
Member Author

@rickynils We could, but I like taking smaller steps so there is a chance to bisect if shit hits the fan :).

In this case, switching over to using this makes exactly one algorithmic change, which is that the Hydra coordinator <-> Nix worker communication is no longer guaranteed to take place over a single ssh session, the pool mechanism could disconnect and reconnect.

@Ericson2314 Ericson2314 added the backport 2.26-maintenance Automatically creates a PR against the branch label Feb 14, 2025
@Ericson2314
Copy link
Member Author

Also, I am somewhat paranoid because of all the discrepancies between the protocols as documented in https://discourse.nixos.org/t/developing-a-system-that-replaces-nix-remote-build/22388 .

@Ericson2314
Copy link
Member Author

I added the backport label because I would like to try this out on Hydra before 2.27 --- It is a non-breaking extension to the C++ API, and makes no behavior change on the Nix side (whatever Hydra behavior change this enables, but not requires is separate), and thus IMO meets criteria to be safe to backport.

@Ericson2314 Ericson2314 force-pushed the legacy-ssh-extensions-for-hydra branch from 123a813 to 7f04879 Compare February 14, 2025 19:25
@rickynils
Copy link
Member

@Ericson2314

We could, but I like taking smaller steps so there is a chance to bisect if shit hits the fan :).

This a perfectly valid reason to do it the way you have suggested.

Also, I am somewhat paranoid because of all the discrepancies between the protocols as documented in https://discourse.nixos.org/t/developing-a-system-that-replaces-nix-remote-build/22388

I'm not sure there are many real discrepancies, actually. The thing that is mentioned in the thread is the build settings propagation, and while that is technically correct, the settings that are propagated in the legacy protocol are so very few and arbitrary anyway. A better approach in that case would be to implement proper configuration for ssh-ng and just ditch legacy.

@Ericson2314 Ericson2314 force-pushed the legacy-ssh-extensions-for-hydra branch from 7f04879 to 5eade48 Compare February 14, 2025 22:30
Ericson2314 added a commit to NixOS/hydra that referenced this pull request Feb 14, 2025
Not until NixOS/nix#10748 lands

Flake lock file updates:

• Updated input 'nix':
    'github:NixOS/nix/970942f45836172fda410a638853382952189eb9?narHash=sha256-jGFuyYKJjJZsBRoi7ZcaVKt1OYxusz/ld1HA7VD2w/0%3D' (2025-02-12)
  → 'github:NixOS/nix/5eade4825221d3284fc6555cb20de2c7aa171d72?narHash=sha256-n5kdS1C24tlJxDV6Wm1iBlyvGk%2Bp0gMXRcWVCAipYLs%3D' (2025-02-14)

• Updated input 'nix-eval-jobs':
    'github:Ericson2314/nix-eval-jobs/5e27c2724a4b07862e7ff1a198aa2ed68dea3e2c?narHash=sha256-7xgSdKnQW11eWd59MnpUNS%2BgwgtOJH2ShzLwByev3rg%3D' (2025-02-14)
  → 'github:Ericson2314/nix-eval-jobs/de345eb4518d952c2d86261b270f2c31edecd3de?narHash=sha256-dNMJY6%2BG3PwE8lIAhwetPJdA2DxCEKRXPY/EtHmdDh4%3D' (2025-02-14)
Ericson2314 added a commit to NixOS/hydra that referenced this pull request Feb 14, 2025
In NixOS/nix#10748 it is extended with
everything we need.
* Hands over the connection temporarily as source to the given
* function. The function must not consume beyond the NAR; it can
* not just blindly try to always read more bytes until it is
* cut-off.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* cut-off.
* cut off.

@Ericson2314 Ericson2314 merged commit 8b91127 into master Feb 16, 2025
21 checks passed
@Ericson2314 Ericson2314 deleted the legacy-ssh-extensions-for-hydra branch February 16, 2025 22:37
Ericson2314 added a commit that referenced this pull request Feb 16, 2025
…0748

Expose a bunch of things in the Legacy SSH Store for Hydra (backport #10748)
Ericson2314 added a commit to NixOS/hydra that referenced this pull request Feb 17, 2025
In NixOS/nix#10748 it is extended with
everything we need.
Ericson2314 added a commit that referenced this pull request Feb 17, 2025
This is not as comprehensive as #10748, but I am also interested in
figuring out whether all those additions are in fact necessary.

This is bare minimum needed for
NixOS/hydra#1445, which has notable gaps but
nevertheless reimplements enough with `ssh-ng://` to past all tests.

I would like to merge this change as definitely necessary, and unclear
whether sufficient. Then I would iterate on the corresponding Hydra PR
until it seems potentially correct, seeing what, if any, further Nix API
changes are necessary.
Ericson2314 added a commit to NixOS/hydra that referenced this pull request Feb 18, 2025
In NixOS/nix#10748 it is extended with
everything we need.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.26-maintenance Automatically creates a PR against the branch 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