Nested runs of `ie` utilize the same environment state file

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
bash, go, markdown
Domain
cli, testing-qa

Research direction

Trace how ie creates, writes, and restores the temporary environment state file during command execution, then reproduce the issue with the three-step markdown scenario shown. Done means a nested ie invocation no longer destroys the outer run's state and the final echo still sees VAR=foo.

Written by the indexing model from the issue text.

Description

bug

To keep track of environment variables created by executing commands, we save them into a temporary file named /tmp/env-var after the execution of each command so that we can restore the environment variables during the execution of the next command. This means that if ie were to execute a doc that has a codeblock which calls ie, the state file will be overwritten from the nested invocation of ie which can break steps that come after invoking ie in a scenario.

This can be replicated with a markdown file scenario that has these 3 steps:

export VAR=foo
ie <any-execution-command> <scenario>
echo $VAR # Should break because the previous command deletes the environment state.

This isn't a critical issue for most scenarios, but it will prevent us from having our specs execute correctly because they rely on invoking ie to showcase new features.

Dominant language
Go
Stars
40
Forks
27
Avg merge
2d 20h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

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.

More from Azure/InnovationEngine

All issues in Azure/InnovationEngine

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.