lando / lando/core

Lando seems to ignore overriding the orchestratorBin configuration

Open
#372 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
62
Forks
41
Avg merge
2h 1m
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented lando config --path orchestratorBin probes with ~/.lando/config.yml and LANDO_ORCHESTRATOR_BIN. Inspect the configuration loading path for orchestratorBin, then review the verification commands in examples/orchestrator (referenced as examples/orchestration) and confirm both override methods and the corrected pipe check work.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, javascript
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.