Skip to content

Conversation

Francisco-Gamino
Copy link
Contributor

Issue describing the changes in this PR

Add POWERSHELL_DISTRIBUTION_CHANNEL environment variable

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

Copy link
Contributor

@AnatoliB AnatoliB left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -97,6 +97,7 @@ internal StreamingMessage ProcessWorkerInitRequest(StreamingMessage request)
{
var workerInitRequest = request.WorkerInitRequest;
Environment.SetEnvironmentVariable("AZUREPS_HOST_ENVIRONMENT", $"AzureFunctions/{workerInitRequest.HostVersion}");
Environment.SetEnvironmentVariable("POWERSHELL_DISTRIBUTION_CHANNEL", $"Azure-Functions-{workerInitRequest.HostVersion}");

Choose a reason for hiding this comment

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

I think a colon works better as a separator as that's what we use in our MSI

Suggested change
Environment.SetEnvironmentVariable("POWERSHELL_DISTRIBUTION_CHANNEL", $"Azure-Functions-{workerInitRequest.HostVersion}");
Environment.SetEnvironmentVariable("POWERSHELL_DISTRIBUTION_CHANNEL", $"Azure-Functions:{workerInitRequest.HostVersion}");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. Code updated.

@Francisco-Gamino Francisco-Gamino merged commit 96191a5 into dev Nov 24, 2021
Francisco-Gamino added a commit that referenced this pull request Nov 29, 2021
* Add POWERSHELL_DISTRIBUTION_CHANNEL env variable

* Update environment variable value format
Francisco-Gamino added a commit that referenced this pull request Nov 29, 2021
* Add POWERSHELL_DISTRIBUTION_CHANNEL env variable

* Update environment variable value format
Francisco-Gamino added a commit that referenced this pull request Nov 29, 2021
* Add POWERSHELL_DISTRIBUTION_CHANNEL env variable

* Update environment variable value format
Francisco-Gamino added a commit that referenced this pull request Nov 29, 2021
* Add POWERSHELL_DISTRIBUTION_CHANNEL env variable

* Update environment variable value format
@Francisco-Gamino Francisco-Gamino deleted the Francisco-Gamino/add-env-variable branch January 10, 2022 23:24
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.

3 participants