Azure / Azure/azure-powershell
Eanble-AzContextAutoSave should save AzureRmContext.json if default context not empty
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
## Description of the new feature
For cmdlets below, we expect to same output of `Get-AzContext #2` as `Get-AzContext #1`, but actually it does not. The root cause is `Enable-AzContextAutosave` only save in-memory token to disk, but doesn't save in-memory context to AzureRmContext.json
```powershell
Clear-AzContext
Disable-AzContextAutosave
Connect-AzAccount
Get-AzContext #1
Enable-AzContextAutosave
Get-AzContext #2
```
## Proposed implementation details (optional)
Contributor guide
Research direction
Reproduce the sequence using Clear-AzContext, Disable-AzContextAutosave, Connect-AzAccount, Get-AzContext, and Enable-AzContextAutosave. Trace the Enable-AzContextAutosave cmdlet and context persistence behavior; done means a non-empty default context is saved to AzureRmContext.json and Get-AzContext #2 matches Get-AzContext #1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, powershell
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100