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

Trying to deploy config fails with 'found argument --profile-user which wasn't expected' #232

Closed
TheNeikos opened this issue Sep 12, 2023 · 6 comments

Comments

@TheNeikos
Copy link

The output:

✦ ❯ nix run github:serokell/deploy-rs -- --skip-checks .#flutters
🚀 ℹ [deploy] [INFO] Evaluating flake in .
warning: Git tree '/home/neikos/projects/servers' is dirty
trace: warning: Enabling both boot.enableContainers & virtualisation.containers on system.stateVersion < 22.05 is unsupported.

🚀 ℹ [deploy] [INFO] The following profiles are going to be deployed:
[flutters.system]
user = "root"
ssh_user = "root"
path = "/nix/store/bb4csiqr662xpmah6zq2l1553avzsmri-activatable-nixos-system-flutters-23.05.20230820.475d5ae"
hostname = "100.89.240.44"
ssh_opts = []

🚀 ℹ [deploy] [INFO] Building profile `system` for node `flutters`
[1/21/26 built, 8 copied (102.2/102.2 MiB), 19.4 MiB DL] building man-cache
🚀 ℹ [deploy] [INFO] Copying profile `system` to node `flutters`
🚀 ℹ [deploy] [INFO] Activating profile `system` for node `flutters`
🚀 ℹ [deploy] [INFO] Creating activation waiter
error: Found argument '--profile-user' which wasn't expected, or isn't valid in this context

If you tried to supply `--profile-user` as a PATTERN use `-- --profile-user`

USAGE:
    activate activate [FLAGS] <closure> <profile-path> --confirm-timeout <confirm-timeout> --temp-path <temp-path>

For more information try --help
👀 ℹ [wait] [INFO] Waiting for confirmation event...
🚀 ❌ [deploy] [ERROR] Activating over SSH resulted in a bad exit code: Some(2)
🚀 ℹ [deploy] [INFO] Revoking previous deploys
🚀 ❌ [deploy] [ERROR] Deployment failed, rolled back to previous generation

This was working in d0cfc04, so was introduced in the commits after.

@rvem
Copy link
Member

rvem commented Sep 13, 2023

Seems like a breaking change from #231 which was needed to fix #201 (which is a breaking change on this nix side).
Please consider updating deploy-rs input, this should fix the error that you observe

@rvem
Copy link
Member

rvem commented Sep 13, 2023

Apparently, deploy-rs now deserves an update in nixpkgs

@TheNeikos
Copy link
Author

Yup! That was the problem.

Is there an easy trick I can do that allows me to re-export the deploy-rs binary? (I could just add it to my own apps I guess)

@rvem
Copy link
Member

rvem commented Sep 13, 2023

Is there an easy trick I can do that allows me to re-export the deploy-rs binary?

I personally tend to add deploy-rs to the devShell and then run nix develop -c deploy .#<blah> instead of nix run

Thus deployments profiles are always up-to-date with deploy-rs binary(s)

@fherenius
Copy link

Sorry to bump a closed issue, but I'm running into the same errors and from the conversation it's unclear to me how exactly this should be solved. NixOS is new to me, so I might be missing something obvious.

Do I have to update the deploy-rs binary on my node?

@TheNeikos
Copy link
Author

Sorry to bump a closed issue, but I'm running into the same errors and from the conversation it's unclear to me how exactly this should be solved. NixOS is new to me, so I might be missing something obvious.

Do I have to update the deploy-rs binary on my node?

The “deploy” binary you run needs to be up to date with the library that you use as input in your flake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants