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

Allow testing ssh:// and ssh-ng:// across versions too #5602

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Nov 19, 2021

We want to make sure both protocols don't break. Also recall ssh-ng:// will be slightly different than unix:// because the former transfers files over the protocol too.

I am not sure what the status of adding new configuration env vars is. I hope if NIX_DAEMON_SOCKET path was OK, these too are too, but if not I suppose we could try to sneak and shove some ?remote-command=... into the tests.

depends on #5598

The dependency is mainly to avoid merge conflicts.

@Ericson2314 Ericson2314 force-pushed the test-ssh-across-versions branch 2 times, most recently from 5d11d69 to 53ebc3d Compare November 19, 2021 02:24
@dpulls
Copy link

dpulls bot commented Nov 19, 2021

🎉 All dependencies have been resolved !

const Setting<Path> remoteProgram{(StoreConfig*) this, "nix-store", "remote-program", "path to the nix-store executable on the remote system"};
const Setting<Path> remoteProgram{
(StoreConfig*) this,
getEnv("NIX_LEGACY_SSH_REMOTE_PROGRAM").value_or("nix-store"),
Copy link
Member

Choose a reason for hiding this comment

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

There is a bit of a convention to prefix these variable with _NIX_TEST_. Alternatively, we can avoid the environment variable by appending ?remote-program=... to the store URL.

Copy link
Member Author

@Ericson2314 Ericson2314 Nov 20, 2021

Choose a reason for hiding this comment

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

I switched it to _NIX_TEST_ instead. As to ?remote-program=... I can pursue if you want, but do note we have some fancy ssh urls e.g. doing iterative ssh with ?remote-store= so it is a bit a non-trivial. I am thinking the env var might be better because it means no one can forget the remote program part going forward if they are adding another ssh test, especially if it is also has complicated store URLs.

@Ericson2314
Copy link
Member Author

Is this OK now? Would be nice to merge.

@thufschmitt
Copy link
Member

Actually while this is OK, it’s a bit limited in what it can test, because when NIX_DAEMON_PACKAGE is set, the daemon is systematically used, meaning that the test isn’t really between versions since the daemon and remote builder versions will be the same.
Maybe we could do it the other way around by setting the remote programs to the client version.

@Ericson2314
Copy link
Member Author

Ah good point. Maybe let's start with this, just because it's not worse than today?

@Ericson2314 Ericson2314 changed the title Test ssh:// and ssh-ng:// across versions too Allow testing ssh:// and ssh-ng:// across versions too Dec 9, 2021
@Ericson2314 Ericson2314 marked this pull request as draft December 9, 2021 14:23
@Ericson2314 Ericson2314 force-pushed the test-ssh-across-versions branch 2 times, most recently from 6d98e46 to 4bf2dd5 Compare December 9, 2021 14:29
@Ericson2314 Ericson2314 marked this pull request as ready for review December 9, 2021 14:33
@stale
Copy link

stale bot commented Jun 12, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Jun 12, 2022
@Ericson2314
Copy link
Member Author

@andir an example of one of my PRs relating to cross version testing. It might be nice to do call to page it all back in and answer any questions you have.

@stale stale bot removed the stale label Dec 12, 2022
@fricklerhandwerk fricklerhandwerk added the with-tests Issues related to testing. PRs with tests have some priority label Mar 3, 2023
We want to make sure both protocols don't break. Also recall ssh-ng://
will be slightly different than unix:// because the former transfers
files over the protocol too.

Add env vars for the remote (ssh/ssh-ng) store programs, we will use
them in the test suite soon.
@Ericson2314 Ericson2314 force-pushed the test-ssh-across-versions branch from 4bf2dd5 to 4875e58 Compare October 23, 2023 18:16
@github-actions github-actions bot added store Issues and pull requests concerning the Nix store and removed with-tests Issues related to testing. PRs with tests have some priority labels Oct 23, 2023
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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants