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

arion up fails with strange error #230

Open
augustebaum opened this issue Jan 23, 2024 · 11 comments
Open

arion up fails with strange error #230

augustebaum opened this issue Jan 23, 2024 · 11 comments

Comments

@augustebaum
Copy link

Hi,

I'm trying out arion by following the "first steps" section of the docs.

When I run arion up I get:

/nix/store/w5y9k69h754b17vd0jyzj5dzvgndc45r-docker-compose.yaml
Traceback (most recent call last):
  File "/nix/store/p0nvak45fpgjbva6banmwsc7pkdhwfz9-docker-compose-1.29.2/bin/.docker-compose-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/p0nvak45fpgjbva6banmwsc7pkdhwfz9-docker-compose-1.29.2/lib/python3.11/site-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/nix/store/p0nvak45fpgjbva6banmwsc7pkdhwfz9-docker-compose-1.29.2/lib/python3.11/site-packages/compose/cli/main.py", line 200, in perform_command
    project = project_from_options('.', options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/p0nvak45fpgjbva6banmwsc7pkdhwfz9-docker-compose-1.29.2/lib/python3.11/site-packages/compose/cli/command.py", line 60, in project_from_options
    return get_project(
           ^^^^^^^^^^^^
  File "/nix/store/p0nvak45fpgjbva6banmwsc7pkdhwfz9-docker-compose-1.29.2/lib/python3.11/site-packages/compose/cli/command.py", line 152, in get_project
    client = get_client(
             ^^^^^^^^^^^
  File "/nix/store/p0nvak45fpgjbva6banmwsc7pkdhwfz9-docker-compose-1.29.2/lib/python3.11/site-packages/compose/cli/docker_client.py", line 41, in get_client
    client = docker_client(
             ^^^^^^^^^^^^^^
  File "/nix/store/p0nvak45fpgjbva6banmwsc7pkdhwfz9-docker-compose-1.29.2/lib/python3.11/site-packages/compose/cli/docker_client.py", line 124, in docker_client
    kwargs = kwargs_from_env(environment=environment, ssl_version=tls_version)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'

Has anyone seen this before? Thanks in advance for any help; let me know if you need more information.


More details:

Contents of arion-pkgs.nix:

import <nixpkgs> { system = "x86_64-linux"; }

Contents of arion-compose.nix:

{ pkgs, ... }:
{
  project.name = "test";

  services.mariadb = {
    service.image = "mariadb:latest";
    service.hostname = "mariadb";
    service.restart = "always";
    service.volumes = ["/mariadbfiles:/var/lib/mysql"];
    service.env_file = [".mariadb.env"];
    service.networks = ["db_connect"];
  };
}
@zoechi
Copy link

zoechi commented Jan 23, 2024

The Python package to access Docker/Podman needs to be updated I think.
ssl_version is a parameter that was removed in Docker 7 (from the top of my head)
I switched back from unstable to 23.11. That fixed it for me for now.

@roberth
Copy link
Member

roberth commented Jan 23, 2024

This appears to be a problem with the docker compose package in Nixpkgs.

@augustebaum
Copy link
Author

Indeed installing Arion with nix profile install nixpkgs/23.11#arion makes the issue disappear.

@AkechiShiro
Copy link

Hi @roberth,

I tried using arion but I ran into this error, I changed the derivation to use docker_compose v2 and it worked fine, should I make a PR to update the arion derivation ? Do you have any input regarding this way of fixing the issue ?

Currently arion uses docker_compose_1 version 1 and I believe it's why this error is happening.

@KiaraGrouwstra
Copy link
Contributor

@AkechiShiro nice! would you have a branch with the fix maybe? i wouldn't mind using that ^^

@AkechiShiro
Copy link

@KiaraGrouwstra you can try and see if this branch fixes your issues, but I'm not entirely sure if that is a proper way to fix the issue that was reported here, I would most likely have to check with more knowledgeable people about arion I guess.

Let me know if it fixes your issues.

@KiaraGrouwstra
Copy link
Contributor

@AkechiShiro yep, that works for me! if you open a PR there i'll add a review. :)

@KiaraGrouwstra
Copy link
Contributor

@AkechiShiro in case you're busy i could try filing it there as well

@KiaraGrouwstra
Copy link
Contributor

NixOS/nixpkgs#325802

@KiaraGrouwstra
Copy link
Contributor

closed in NixOS/nixpkgs#325802 - thanks @AkechiShiro! 🎉

@AkechiShiro
Copy link

Thank you as well for the PR @KiaraGrouwstra

errfrom added a commit to Plutonomicon/cardano-transaction-lib that referenced this issue Jul 20, 2024
Arion should use docker-compose v2, otherwise we get:

TypeError: kwargs_from_env() got an unexpected keyword argument
'ssl_version'.

See hercules-ci/arion#230 and
NixOS/nixpkgs#325802.
KiaraGrouwstra added a commit to KiaraGrouwstra/cfg that referenced this issue Aug 27, 2024
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

5 participants