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

Nebulous error message "KeyError: 'app-dev'" #1046

Open
senpro-ingwersenk opened this issue Sep 25, 2024 · 0 comments
Open

Nebulous error message "KeyError: 'app-dev'" #1046

senpro-ingwersenk opened this issue Sep 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@senpro-ingwersenk
Copy link

Describe the bug
I have had issues running a container for development on Windows, so I wanted to move it to a Raspberry Pi 4 - however, now I have a wholly new issue instead:

# podman-compose up --build app-dev
Traceback (most recent call last):
  File "/usr/local/bin/podman-compose", line 3472, in <module>
    main()
  File "/usr/local/bin/podman-compose", line 3468, in main
    asyncio.run(async_main())
  File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/local/bin/podman-compose", line 3464, in async_main
    await podman_compose.run()
  File "/usr/local/bin/podman-compose", line 1740, in run
    retcode = await cmd(self, args)
              ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/podman-compose", line 2425, in compose_up
    excluded = get_excluded(compose, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/podman-compose", line 2416, in get_excluded
    excluded -= compose.services[service]["_deps"]
                ~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'app-dev'

From my limited understanding of Python, it can not find the service app-dev. However, that is very much defined and also works mostly fine on my Windows maschine (which uses docker-compose, but Podman as the backend).

To Reproduce
Basically try to run this:

services:
  db-migrations:
    image: dbottiau/surrealdb-migrations
    command: apply
    volumes:
      - ./db/schemas:/schemas
      - ./db/events:/events
      - ./db/migrations:/migrations
    depends_on:
      db:
        condition: service_healthy
  db:
    image: surrealdb/surrealdb:latest
    command: start
    environment:
      SURREAL_NO_BANNER: "true"
      SURREAL_STRICT: "true"
      SURREAL_PATH: "file:/db"
      SURREAL_CLIENT_IP: "socket"
      SURREAL_CAPS_DENY_GUESTS: "false"
      SURREAL_AUTH: "true"
      SURREAL_USER: "db"
      SURREAL_PASS: "db"
    ports:
      - 8000:8000
    volumes:
      - ./runtime/db:/db
    healthcheck:
      test: is-ready
      interval: 60s
      retries: 5
      start_period: 20s
      timeout: 10s

  app:
    profiles:
      - prod
    build:
      context: .
      containerfile: Dockerfile
    ports:
      - 8080:8080
    depends_on:
      db:
        condition: service_healthy
      db-migrations:
        condition: service_completed_successfully

  app-dev:
    profiles:
      - dev
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - "8080:8080"
    volumes:
      - ".:/src"

Even without having the rest of the code, this should do something. As far as I can tell, it stops before having done anything else...

Expected behavior
I expected app-dev to be built, and then ran.

Actual behavior
See the log above.

Output

$ podman-compose version
podman-compose version 1.1.0
podman version 5.0.3

$ podman-compose up
(above)

Environment:

  • OS: Linux
  • podman version: 5.0.3
  • podman compose version: 1.1.0

Additional context

I am on Alpine Linux on a Raspberry Pi 4 and the latest version as supplied via APK is 1.1.0-rc1. Though I have not tried the Git version yet.

@senpro-ingwersenk senpro-ingwersenk added the bug Something isn't working label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant