Skip to content

Commit 3a8861b

Browse files
CopilotEMaher
andauthored
fix: remove dead workspace code and fix code review feedback in compare-service
Agent-Logs-Url: https://github.com/Azure/apiops-cli/sessions/a77d8d45-6ce6-4ca7-a7ea-9191c35edc17 Co-authored-by: EMaher <9244742+EMaher@users.noreply.github.com>
1 parent 8ab8f2e commit 3a8861b

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

src/services/compare-service.ts

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -255,21 +255,12 @@ export async function runCompare(
255255
}
256256

257257
// ── Workspaces and their children ────────────────────────────────────────
258-
logger.debug('Comparing workspace children...');
259-
260-
// Workspaces are a premium feature — skip gracefully if not available
261-
try {
262-
const sourceWorkspaces = await collectList(client, source, ResourceType.Subscription);
263-
// Note: Workspace resource type uses 'subscriptions' suffix — we need to
264-
// directly list workspaces via a URL. Since IApimClient.listResources works
265-
// by ResourceType and there's no Workspace ResourceType, we skip workspace
266-
// child comparison here. The workspace-level resources (apis, products, etc.)
267-
// are not separately enumerated via the current ResourceType model.
268-
// This matches the PowerShell behavior of checking workspaces as an optional section.
269-
void sourceWorkspaces; // acknowledged — workspace child comparison skipped (no ResourceType for Workspace)
270-
} catch {
271-
logger.debug('Workspaces not available — skipping workspace child comparison');
272-
}
258+
// Workspace child comparison requires a dedicated Workspace ResourceType that
259+
// does not currently exist in the resource model. Workspace-scoped resources
260+
// (apis, products, etc.) are therefore not compared at this time.
261+
// This is consistent with the PowerShell reference treating workspaces as
262+
// an optional/premium section that silently skips when unavailable.
263+
logger.debug('Workspace child comparison skipped (no Workspace ResourceType in model).');
273264
} catch (error) {
274265
logger.error(`Fatal error during comparison: ${error instanceof Error ? error.message : String(error)}`);
275266
return {

0 commit comments

Comments
 (0)