[BUG] Subscription override warning message (ephemeral storage)

Đang mở
#560 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
azure, powershell
Lĩnh vực
cloud

Hướng nghiên cứu

Bắt đầu với luồng khởi động Cloud Shell xác thực với Azure và phát ra các cảnh báo về subscription, sau đó tái hiện hành vi của phiên tạm thời bằng lệnh Update-AzConfig đã được tài liệu hóa. Được xem là hoàn tất khi subscription mặc định được duy trì trong phiên hoặc cảnh báo override bị ẩn khi không thể sử dụng tính năng duy trì, mà không xóa cảnh báo về nhiều subscription.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug Priority 1

To Reproduce

  1. Follow the steps in https://learn.microsoft.com/en-us/azure/cloud-shell/get-started/ephemeral?tabs=powershell
  2. Use the command in the supplied warning message (Update-AzConfig -DefaultSubscriptionForLogin) to set the default subscription to the desired subscription
  3. Restart the shell

Observed Behavior

Requesting a Cloud Shell.Succeeded. 
Connecting terminal...

Your Cloud Shell session will be ephemeral so no files or system changes will persist beyond your current session.

MOTD: SqlServer has been updated to Version 22!

VERBOSE: Authenticating to Azure ...
WARNING: TenantId '{my tenant id}' contains more than one active subscription. First one will be selected for further use. To select another subscription, use Set-AzContext.
WARNING: To override which subscription Connect-AzAccount selects by default, use `Update-AzConfig -DefaultSubscriptionForLogin 00000000-0000-0000-0000-000000000000`. Go to https://go.microsoft.com/fwlink/?linkid=2200610 for more information.
VERBOSE: Building your Azure drive ...

Expected behavior

Ideally, I would love the default subscription configuration to persist through the ephemeral session.

That being said, I understand that there are limitations to the ephemeral cloud shell. If the setting cannot be persisted, the override warning should be suppressed as to not misdirect ephemeral cloud shell users. (That warning and the message about "no files or system changes" appear to be at odds)

Is this specific to Cloud Shell?

Not sure how to answer this question, since it seems to be an edge case interaction between Azure Powershell and Azure Cloud Shell. I don't believe that this issue would make sense in the Azure Powershell repo (as it is a specific quirk of the ephemeral implementation of Azure Cloud Shell).

Interface information

How are you accessing Cloud Shell - portal.azure.com
If a browser, which Operating System and browser are you using? Firefox on Windows 11

Additional context

I know this is maybe a minor gripe, but it's definitely confusing, especially as a new user, to be prompted with a warning whose instructions do not resolve the issue.

I have no issue with the first warning message (re: multiple subscriptions), and I definitely think that the first warning is important to have regardless of whether this issue is resolved by suppressing the second warning or incorporating some way to persist the default subscription selection.

Ngôn ngữ chính
PowerShell
Star
273
Fork
116
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/CloudShell

Tất cả issue của Azure/CloudShell

Issue tương tự

Thêm issue về Cloud

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.