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

Include env variables defined in a dependency in the step itself. #4047

Closed
wants to merge 5 commits into from

Conversation

fabacab
Copy link

@fabacab fabacab commented Sep 19, 2023

Prior to this commit, a dependency defined by the molecule.yaml file would not honor the values in its env map. Consider the following:

dependency:
  name: shell
  command: env
  env:
    FOO: bar

Invoking molecule test would show that FOO is not set during the run of this dependency. The cause was the fact that these values were never actually passed to the util.run_command() invocation. This also means MOLECULE_EPHEMERAL_DIRECTORY and similar MOLECULE_* environment variables that are defined by the dependency's default_env property were also never available to the dependency's environment.

This may also fix some other issues, such as #3848 and maybe #3839.

@fabacab fabacab temporarily deployed to ack September 19, 2023 21:35 — with GitHub Actions Inactive
@pre-commit-ci pre-commit-ci bot temporarily deployed to ack September 19, 2023 21:36 Inactive
fabacab and others added 2 commits November 14, 2023 17:15
Prior to this commit, a `dependency` defined by the `molecule.yaml` file
would not honor the values in its `env` map. Consider the following:

```yaml
dependency:
  name: shell
  command: env
  env:
    FOO: bar
```

Invoking `molecule test` would show that `FOO` is not set during the run
of this dependency. The cause was the fact that these values were never
actually passed to the `util.run_command()` invocation. This also means
`MOLECULE_EPHEMERAL_DIRECTORY` and similar `MOLECULE_*` environment
variables that are defined by the dependency's `default_env` property
were also never available to the dependency's environment.
Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ensure that CI/CD reports passing on all jobs.

@ssbarnea
Copy link
Member

Closing due to lack of updates. If someone else wants to takeover this, I an reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants