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: Fix starlark value reference bug #322

Merged
merged 4 commits into from
Mar 24, 2023

Conversation

gbouv
Copy link
Contributor

@gbouv gbouv commented Mar 24, 2023

Description:

Running:

def run(plan):
	my_dict = {}
	plan.print(my_dict)
	my_dict["hello"] = "world"

right now returns:

> print msg={"hello": "world"}
{"hello": "world"}

This is because of the 3 steps execution, combined with the fact that "complex" starlark.Value object are passed as pointers to our instructions. This PR fixes it by copying the arg value into each instruction at the interpretation phase.

Is this change user facing?

NO

References (if applicable):

@gbouv gbouv requested a review from leoporoli March 24, 2023 11:39
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 24, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9bdb727
Status: ✅  Deploy successful!
Preview URL: https://a2073960.kurtosis-docs.pages.dev
Branch Preview URL: https://gbouv-fix-starlark-value-ref.kurtosis-docs.pages.dev

View logs

@gbouv gbouv force-pushed the gbouv/fix-starlark-value-reference-bug branch from dbfad24 to cd6a470 Compare March 24, 2023 11:43
@gbouv gbouv enabled auto-merge (squash) March 24, 2023 15:50
@gbouv gbouv merged commit 63f6626 into main Mar 24, 2023
@gbouv gbouv deleted the gbouv/fix-starlark-value-reference-bug branch March 24, 2023 15:55
gbouv pushed a commit that referenced this pull request Mar 27, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.70.1](0.70.0...0.70.1)
(2023-03-27)


### Features

* Add context `rm` command
([#275](#275))
([c20ca12](c20ca12))
* Add context `switch` CLI command
([#317](#317))
([ebab7eb](ebab7eb))
* add kurtosis engine logs command that dumps logs for all engines in
target dir
([#313](#313))
([cbb588c](cbb588c))
* result of add service contains a `name` property
([#314](#314))
([af8ca5f](af8ca5f))
* Tunnel remote APIC port to local machine using Kurtosis Portal
([#295](#295))
([4c3ba69](4c3ba69))


### Bug Fixes

* add example historical version
([#150](#150))
([1548489](1548489))
* be clear about the engine that is being started
([#282](#282))
([5bc1b79](5bc1b79))
* Fix starlark value reference bug
([#322](#322))
([63f6626](63f6626))
* name all args for add_services instruction in quickstart
([#316](#316))
([d413826](d413826))
* reformat build prereqs in readme
([#290](#290))
([c286151](c286151))

---
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>
leoporoli pushed a commit that referenced this pull request Mar 27, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.70.1](0.70.0...0.70.1)
(2023-03-27)


### Features

* Add context `rm` command
([#275](#275))
([c20ca12](c20ca12))
* Add context `switch` CLI command
([#317](#317))
([ebab7eb](ebab7eb))
* add kurtosis engine logs command that dumps logs for all engines in
target dir
([#313](#313))
([cbb588c](cbb588c))
* result of add service contains a `name` property
([#314](#314))
([af8ca5f](af8ca5f))
* Tunnel remote APIC port to local machine using Kurtosis Portal
([#295](#295))
([4c3ba69](4c3ba69))


### Bug Fixes

* add example historical version
([#150](#150))
([1548489](1548489))
* be clear about the engine that is being started
([#282](#282))
([5bc1b79](5bc1b79))
* Fix starlark value reference bug
([#322](#322))
([63f6626](63f6626))
* name all args for add_services instruction in quickstart
([#316](#316))
([d413826](d413826))
* reformat build prereqs in readme
([#290](#290))
([c286151](c286151))

---
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.

2 participants