-
Notifications
You must be signed in to change notification settings - Fork 149
Fix DTS resource group default name and auto-refresh after deletion #4971
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,7 +7,7 @@ import {type IActionContext } from "@microsoft/vscode-azext-utils"; | |||||||||||||
| import { type DurableTaskSchedulerClient } from "../../tree/durableTaskScheduler/DurableTaskSchedulerClient"; | ||||||||||||||
| import { localize } from "../../localize"; | ||||||||||||||
| import { type DurableTaskHubResourceModel } from "../../tree/durableTaskScheduler/DurableTaskHubResourceModel"; | ||||||||||||||
| import { type MessageItem } from "vscode"; | ||||||||||||||
| import { commands, type MessageItem } from "vscode"; | ||||||||||||||
| import { withAzureActivity } from "../../utils/AzureActivity"; | ||||||||||||||
| import { withCancellation } from "../../utils/cancellation"; | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -52,6 +52,7 @@ export function deleteTaskHubCommandFactory(schedulerClient: DurableTaskSchedule | |||||||||||||
| } | ||||||||||||||
| finally { | ||||||||||||||
| taskHub.scheduler.refresh(); | ||||||||||||||
| await commands.executeCommand('azureResourceGroups.refresh'); | ||||||||||||||
|
||||||||||||||
| await commands.executeCommand('azureResourceGroups.refresh'); | |
| try { | |
| await commands.executeCommand('azureResourceGroups.refresh'); | |
| } catch { | |
| // Ignore refresh failures so they don't override the delete result. | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commands.executeCommand('azureResourceGroups.refresh')is awaited inside afinallyblock without error handling. If that command fails/rejects, it can mask the original delete error (or surface an error after a successful deletion). Consider wrapping the refresh call in its own try/catch (orvoid ...catch(...)) so the delete flow's outcome isn't overridden by a refresh failure.