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

fix: replace env var with runtime values in run_sh #2254

Merged
merged 6 commits into from Mar 6, 2024

Conversation

tedim52
Copy link
Contributor

@tedim52 tedim52 commented Mar 4, 2024

Description:

Env vars weren't being replaced with runtime value in run_sh eg.

def run(plan, args):
    database = plan.add_service(name="database", config=ServiceConfig(image="postgres:latest"))

    plan.run_sh(
        run="echo $VAR_1",
        env_vars={
            "VAR_1": database.ip_address
        }
    )

used to output

Command returned with exit code '0' and the following output:
--------------------
{{kurtosis:b49259098950411ba1e409e8a749c562:ip_address.runtime_value}}
--------------------

but now we get:

 Command returned with exit code '0' and the following output:
--------------------
172.16.24.5
--------------------

Is this change user facing?

YES

@tedim52 tedim52 changed the title fix: replace env var magic strings fix: replace env var with runtime values in run_sh Mar 4, 2024
@tedim52 tedim52 requested a review from h4ck3rk3y March 4, 2024 18:07
@tedim52 tedim52 enabled auto-merge March 6, 2024 14:01
@tedim52 tedim52 added this pull request to the merge queue Mar 6, 2024
Merged via the queue into main with commit 4107443 Mar 6, 2024
52 checks passed
@tedim52 tedim52 deleted the tedi/runsh-future-ref branch March 6, 2024 14:13
github-merge-queue bot pushed a commit that referenced this pull request Mar 7, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.88.2](0.88.1...0.88.2)
(2024-03-07)


### Bug Fixes

* replace env var with runtime values in run_sh
([#2254](#2254))
([4107443](4107443))
* use fixed version of path compression module
([#2264](#2264))
([eef65e1](eef65e1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: kurtosisbot <kurtosisbot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants