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

Add support for recursive dictionary templating to more places #614

Merged

Conversation

bpkroth
Copy link
Contributor

@bpkroth bpkroth commented Nov 29, 2023

Fixes extracted from #606

This expands support for doing secondary $var string template expansion to two additional places beyond global_config:

  • const_args
  • deploymentTemplateParameters in AzureVmService (and soon AzureNetworkService)

Expands a few test cases to check for this and relies on one prior existing one to still pass (the launch_parse_args tests which already checked for this behavior in global_config expansion).

@bpkroth bpkroth requested a review from a team as a code owner November 29, 2023 17:33
Copy link
Member

@motus motus left a comment

Choose a reason for hiding this comment

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

Looks good! Left a few minor comments

@bpkroth bpkroth enabled auto-merge (squash) November 29, 2023 23:07
@bpkroth bpkroth merged commit 3b9d0b4 into microsoft:main Nov 29, 2023
@bpkroth bpkroth deleted the expand-support-for-recursive-variable-expansion branch November 29, 2023 23:16
bpkroth added a commit that referenced this pull request Dec 1, 2023
…s platforms (#618)

Fixes a bug introduced in #614 for Windows tests.

On Windows, 

```python
os.environ["string"] = "str"
```

internally gets replaced as

```python
os.environ["STRING"]
```

The workaround is to use `nt.environ` on Windows instead.

This change introduces an abstraction to use a new simple drop in
replacement library everywhere we need to handle environment variables.
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