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

[Defect] process-compose project update ignores PC_CONFIG_FILES environment variable #283

Closed
2 of 3 tasks
misuzu opened this issue Dec 10, 2024 · 1 comment
Closed
2 of 3 tasks
Labels
bug Something isn't working done Done, awaiting release

Comments

@misuzu
Copy link

misuzu commented Dec 10, 2024

Defect

Make sure that these boxes are checked before submitting your issue -- thank you!

  • Included the relevant configuration snippet
  • Included the relevant process-compose log (log location: process-compose info)
  • Included a [Minimal, Complete, and Verifiable example] (https://stackoverflow.com/help/mcve)

Version of process-compose: v1.40.1

OS environment:

NixOS unstable

Steps or code to reproduce the issue:

I'd like to use process-compose-flake to generate config files for process-compose. It generates a script which sets PC_CONFIG_FILES environment variable and starts process-compose. While the up operation works as expected, the project update demands that I pass a config file using the --config argument.

cat <<'EOF' > /tmp/test-config.yaml
version: "0.5"

processes:
  hello:
    command: echo 'Hello World'
  pc:
    command: echo 'From Process Compose'
    depends_on:
      hello:
        condition: process_completed
EOF
PC_CONFIG_FILES=/tmp/test-config.yaml process-compose project update

Expected result:

It should run update as instructed using a config set in PC_CONFIG_FILES environment variable.

Actual result:

It complains about missing config file while saying that --config option has default value that I need.

% PC_CONFIG_FILES=/tmp/test-config.yaml process-compose project update
Error: required flag(s) "config" not set
Usage:
  process-compose project update [flags]

Flags:
  -f, --config stringArray   path to config files to load (env: PC_CONFIG_FILES) (default [/tmp/test-config.yaml])
  -h, --help                 help for update
  -v, --verbose              verbose output

Global Flags:
  -a, --address string       address of the target process compose server (default "localhost")
  -L, --log-file string      Specify the log file path (env: PC_LOG_FILE) (default "/tmp/process-compose-misuzu-client.log")
      --no-server            disable HTTP server (env: PC_NO_SERVER)
      --ordered-shutdown     shut down processes in reverse dependency order
  -p, --port int             port number (env: PC_PORT_NUM) (default 8080)
      --read-only            enable read-only mode (env: PC_READ_ONLY)
  -u, --unix-socket string   path to unix socket (env: PC_SOCKET_PATH) (default "/tmp/process-compose-1367971.sock")
  -U, --use-uds              use unix domain sockets instead of tcp
@F1bonacc1 F1bonacc1 added bug Something isn't working done Done, awaiting release labels Dec 14, 2024
@F1bonacc1
Copy link
Owner

Fixed in v1.46.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done Done, awaiting release
Projects
None yet
Development

No branches or pull requests

2 participants