Skip to content

Lando seems to ignore overriding the orchestratorBin configuration #372

@gabesullice

Description

@gabesullice

The documentation pages indicate that it should be possible to override the orchestratorBin property via the ~/.lando/config.yml file or the LANDO_ORCHESTRATOR_BIN environment variable. However, it seems impossible to do so.

This problem seems to be specific to the orchestratorBin property, since I am able to override a different setting. Specifically, I was able to override the LANDO_NETWORK_LIMIT setting with an environment variable.

Here is a series of probes I conducted in my shell to demonstrate the issue:

$ cat ~/.lando/config.yml
orchestratorBin: /usr/bin/docker-compose

$ export LANDO_ORCHESTRATOR_BIN=/usr/bin/docker-compose

$ echo $LANDO_ORCHESTRATOR_BIN
/usr/bin/docker-compose

$ LANDO_ORCHESTRATOR_BIN=/usr/bin/docker-compose lando --clear
Lando has cleared the tasks cache!

$ LANDO_ORCHESTRATOR_BIN=/usr/bin/docker-compose lando config --path orchestratorBin
'/home/gabe/.lando/bin/docker-compose-v2.31.0'

$ lando config --path networkLimit
32

$ LANDO_NETWORK_LIMIT=64 lando config --path networkLimit
64

$ lando config --path configSources
[ '/snapshot/core/config.yml',
  '/snapshot/core/config.yml',
  '/home/gabe/.lando/config.yml' ]

Additionally, while trying to debug this and ensure I was configuring things correctly, I noticed a mistake in the verification commands in the examples/orchestration directory.

Specifically, this bit:

# Should use the orchestratorBin if set
LANDO_ORCHESTRATOR_BIN="/usr/local/bin/docker-compose" lando config --path orchestratorBin | grep "$LANDO_ORCHESTRATOR_BIN"

The mistake is that the LANDO_ORCHESTRATOR_BIN="/usr/local/bin/docker-compose" only sets that environment variable for the command preceding the pipe |. That means grep "$LANDO_ORCHESTRATOR_BIN" evaluates to the equivalent of grep "", which matches anything and thus doesn't prove that the config override worked as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions