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

Initialize CheckForUpgrade to false #20575

Merged
merged 6 commits into from
Nov 1, 2024
Merged

Conversation

onetocny
Copy link
Contributor

@onetocny onetocny commented Oct 21, 2024

Task names:

  • AzureCloudPowerShellDeploymentV1
  • AzureCloudPowerShellDeploymentV2
  • AzureFileCopyV1
  • AzureFileCopyV2
  • AzureFileCopyV3
  • AzureFileCopyV4
  • AzureFileCopyV5
  • AzureFileCopyV6
  • AzurePowerShellV2
  • AzurePowerShellV3
  • AzurePowerShellV4
  • AzurePowerShellV5
  • SqlAzureDacpacDeploymentV1

Description
The code inside Az PowerShell module that is responsible for checking for the latest module version in some cases fails with StackOverflowException. This logic might be disabled by setting Az configuration CheckForUpgrade value to false. This PR changes the Az module initialization so that disabling CheckForUpgrade is the very first thing after the module is imported. The fix might be enabled by setting USE_FIXED_AZ_CONFIG_INIT environment value to true. There will be a follow up PR which will populate the value of that variable based on the feature flag.

Documentation changes required: N

Added unit tests: N

Attached related issue:

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

@onetocny onetocny marked this pull request as ready for review November 1, 2024 14:05
@onetocny onetocny requested review from manolerazvan and a team as code owners November 1, 2024 14:05
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