Skip to content
Merged
2 changes: 1 addition & 1 deletion src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
-->

## Upcoming Release
* Added config `DisableErrorRecordsPersistence` to disable writing error records to file system [#21732]
* Updated Azure.Core to 1.34.0.
* Updated the reference of Azure PowerShell Common to 1.3.82-preview.

## Version 2.12.5
* Changed output stream from debug stream to warning stream for `CmdletPreviewAttribute`
Expand Down
65 changes: 63 additions & 2 deletions src/Accounts/Accounts/help/Clear-AzConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Clear-AzConfig [-Force] [-PassThru] [-AppliesTo <String>] [-Scope <ConfigScope>]
```
Clear-AzConfig [-PassThru] [-AppliesTo <String>] [-Scope <ConfigScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [-DefaultSubscriptionForLogin]
[-DisplayBreakingChangeWarning] [-DisplaySurveyMessage] [-EnableDataCollection] [-EnableLoginByWam]
[<CommonParameters>]
[-DisableErrorRecordsPersistence] [-DisplayBreakingChangeWarning] [-DisplayRegionIdentified]
[-DisplaySurveyMessage] [-EnableDataCollection] [-EnableLoginByWam] [-EnableTestCoverage]
[-TestCoverageLocation] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -100,6 +101,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -DisableErrorRecordsPersistence
When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in around November 2023

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: ClearByKey
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DisplayBreakingChangeWarning
Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release.

Expand All @@ -115,6 +131,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -DisplayRegionIdentified
When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: ClearByKey
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DisplaySurveyMessage
When enabled, you are prompted infrequently to participate in user experience surveys for Azure PowerShell.

Expand Down Expand Up @@ -164,6 +195,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -EnableTestCoverage
Comment thread
VeryEarly marked this conversation as resolved.
Outdated
When enabled, the test framework will generate data during test run as a preliminary for the test coverage calculation

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: ClearByKey
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Force
Do not ask for confirmation when clearing all configs.

Expand Down Expand Up @@ -211,6 +257,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -TestCoverageLocation
Only takes effect when EnableTestCoverage equals to TRUE. Use this config to redirect the test coverage data location.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: ClearByKey
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

Expand Down
65 changes: 63 additions & 2 deletions src/Accounts/Accounts/help/Get-AzConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ Gets the configs of Azure PowerShell.

```
Get-AzConfig [-AppliesTo <String>] [-Scope <ConfigScope>] [-DefaultProfile <IAzureContextContainer>]
[-DefaultSubscriptionForLogin] [-DisplayBreakingChangeWarning] [-DisplaySurveyMessage] [-EnableDataCollection]
[-EnableLoginByWam] [<CommonParameters>]
[-DefaultSubscriptionForLogin] [-DisableErrorRecordsPersistence] [-DisplayBreakingChangeWarning]
[-DisplayRegionIdentified] [-DisplaySurveyMessage] [-EnableDataCollection] [-EnableLoginByWam]
[-EnableTestCoverage] [-TestCoverageLocation] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -111,6 +112,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -DisableErrorRecordsPersistence
When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in around November 2023

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DisplayBreakingChangeWarning
Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release.

Expand All @@ -126,6 +142,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -DisplayRegionIdentified
When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DisplaySurveyMessage
When enabled, you are prompted infrequently to participate in user experience surveys for Azure PowerShell.

Expand Down Expand Up @@ -175,6 +206,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -EnableTestCoverage
When enabled, the test framework will generate data during test run as a preliminary for the test coverage calculation

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Scope
Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user.
By default it is CurrentUser.
Expand All @@ -192,6 +238,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -TestCoverageLocation
Only takes effect when EnableTestCoverage equals to TRUE. Use this config to redirect the test coverage data location.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

Expand Down
65 changes: 63 additions & 2 deletions src/Accounts/Accounts/help/Update-AzConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Updates the configs of Azure PowerShell.

```
Update-AzConfig [-AppliesTo <String>] [-Scope <ConfigScope>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [-DefaultSubscriptionForLogin <String>] [-DisplayBreakingChangeWarning <Boolean>]
[-WhatIf] [-Confirm] [-DefaultSubscriptionForLogin <String>] [-DisableErrorRecordsPersistence <Boolean>]
[-DisplayBreakingChangeWarning <Boolean>] [-DisplayRegionIdentified <Boolean>]
[-DisplaySurveyMessage <Boolean>] [-EnableDataCollection <Boolean>] [-EnableLoginByWam <Boolean>]
[<CommonParameters>]
[-EnableTestCoverage <Boolean>] [-TestCoverageLocation <String>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -123,6 +124,21 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -DisableErrorRecordsPersistence
When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in around November 2023

```yaml
Type: System.Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -DisplayBreakingChangeWarning
Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release.

Expand All @@ -138,6 +154,21 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -DisplayRegionIdentified
When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs.

```yaml
Type: System.Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -DisplaySurveyMessage
When enabled, you are prompted infrequently to participate in user experience surveys for Azure PowerShell.

Expand Down Expand Up @@ -187,6 +218,21 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -EnableTestCoverage
When enabled, the test framework will generate data during test run as a preliminary for the test coverage calculation

```yaml
Type: System.Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Scope
Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user.
By default it is CurrentUser.
Expand All @@ -204,6 +250,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -TestCoverageLocation
Only takes effect when EnableTestCoverage equals to TRUE. Use this config to redirect the test coverage data location.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

Expand Down
7 changes: 7 additions & 0 deletions src/Accounts/Authentication/Config/ConfigInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ private void RegisterConfigs(IConfigManager configManager)
true,
null,
new[] { AppliesTo.Az }));
//Use DisableErrorRecordsPersistence as opt-out for now, will replace it with EnableErrorRecordsPersistence as opt-in at next major release (November 2023)
configManager.RegisterConfig(new SimpleTypedConfig<bool>(
ConfigKeys.DisableErrorRecordsPersistence,
Resources.HelpMessageOfDisableErrorRecordsPersistence,
false,
ConfigKeys.DisableErrorRecordsPersistence,
Comment thread
VeryEarly marked this conversation as resolved.
Outdated
new[] { AppliesTo.Az }));
#if DEBUG || TESTCOVERAGE
configManager.RegisterConfig(new SimpleTypedConfig<bool>(
ConfigKeys.EnableTestCoverage,
Expand Down
18 changes: 18 additions & 0 deletions src/Accounts/Authentication/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/Accounts/Authentication/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -390,4 +390,10 @@
<data name="HelpMessageOfDisplayRegionIdentified" xml:space="preserve">
<value>When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs.</value>
</data>
<data name="HelpMessageOfDisableErrorRecordsPersistence" xml:space="preserve">
<value>When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in around November 2023</value>
</data>
<data name="HelpMessageOfEnableErrorRecordsPersistence" xml:space="preserve">
<value>When enabled, error records will be written to ~/.Azure/ErrorRecords</value>
</data>
Comment thread
VeryEarly marked this conversation as resolved.
</root>
3 changes: 3 additions & 0 deletions src/shared/ConfigKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ internal static class ConfigKeys
public const string EnableLoginByWam = "EnableLoginByWam";
public const string TestCoverageLocation = "TestCoverageLocation";
public const string DisplayRegionIdentified = "DisplayRegionIdentified";
//Use DisableErrorRecordsPersistence as opt-out for now, will replace it with EnableErrorRecordsPersistence as opt-in at next major release (November 2023)
public const string DisableErrorRecordsPersistence = "DisableErrorRecordsPersistence";
public const string EnableErrorRecordsPersistence = "EnableErrorRecordsPersistence";
}
}
Loading