Skip to content

Onboard mkdir/get/set/rm/ls support for 16 item types - #105

Open
ayeshurun wants to merge 7 commits into
mainfrom
dev/alonyeshurun/turbo-broccoli
Open

ayeshurun wants to merge 7 commits into
mainfrom
dev/alonyeshurun/turbo-broccoli

Conversation

@ayeshurun

@ayeshurun ayeshurun commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Onboards support for mkdir, get, set, rm, and ls for 16 Fabric item types that were previously unsupported, per the requested support matrix. export/import are intentionally out of scope for this iteration. As a follow-up within this PR, open (portal URL) support was also added for 13 of the 16 item types.

Item type mkdir get set rm ls open
AnomalyDetector — (unchanged) ✅ ✅ ✅ ✅ ✅
ApacheAirflowJob ✅ ✅ ✅ ✅ ✅ (already) ✅ (already)
AppBackend — (unchanged) ✅ ✅ ✅ ✅ ✅
AzureDatabricksStorage — (unchanged) ✅ ✅ ✅ ✅ ✅
DataAgent ✅ ✅ ✅ ✅ ✅ ✅
DataBuildToolJob ✅ ✅ ✅ ✅ ✅ ✅
EventSchemaSet ✅ ✅ ✅ ✅ ✅ ✅
MirroredAzureDatabricksCatalog — (unchanged) ✅ ✅ ✅ ✅ ✅
MirroredCatalog — (unchanged) ✅ ✅ ✅ ✅ ✅
OperationsAgent ✅ ✅ ✅ ✅ ✅ ✅
OrgApp ✅ ✅ ✅ ✅ ✅ (already) ✅ (already)
OrgAppAudience — (unchanged) ✅ ✅ ✅ ✅ ✅
PaginatedReport — (unchanged) ✅ ✅ ✅ ✅ (already) ✅ (already)
Plan ✅ ✅ ✅ ✅ ✅ ✅
SnowflakeDatabase — (unchanged) ✅ ✅ ✅ ✅ ✅
WarehouseSnapshot — (unchanged) ✅ ✅ ✅ ✅ ✅

Changes

  • src/fabric_cli/core/fab_types.py: Registered all 16 item types in the ItemType enum with their Fabric REST API URI segments in format_mapping (verified against the public Fabric REST API documentation for each item type). Registering the enum is what fixes ls: item construction (Item.__init__ → ItemType.from_string()) previously raised a FabricCLIError for any API type value not in the enum, breaking workspace listing for these items. Also corrected two pre-existing, wrong format_mapping entries discovered along the way (ApacheAirflowJob: apacheairflowprojects → apacheAirflowJobs; OrgApp: orgapps → orgApps), and moved these two item types out of the stale "Portal only, not documented in the API" comment section since they do have working, documented REST APIs.
    • Added uri_mapping (portal URL route) entries for 13 of the 16 item types, derived from the Fabric portal's internal catalogTypeAliases/fabricArtifactRouteNames mapping tables (e.g. DataAgent → alias LLMPlugin → route aiskills; Plan → alias Planning → route plans).
  • src/fabric_cli/core/fab_config/command_support.yaml:
    • get/set/rm use a blocklist (unsupported_items) — removed all 16 item types from these lists to enable them.
    • mkdir is enabled only for the 7 item types whose cell in the requested table isn't — (ApacheAirflowJob, DataAgent, DataBuildToolJob, EventSchemaSet, OperationsAgent, OrgApp, Plan); the other 9 are explicitly added to mkdir's unsupported_items to keep them blocked (since the blocklist model otherwise defaults to allow). None of the 7 mkdir-enabled item types require special creation parameters — their Create<Item>Request API bodies only take displayName/description/folderId, so no changes were needed to fab_cmd_mkdir_utils.py.
    • open is now enabled for 13 of the 16 item types (all except AnomalyDetector's three siblings that lack a resolvable portal route — actually only MirroredWarehouse remains blocked, see below). Only the pre-existing MirroredWarehouse item type (unrelated to this PR's 16 item types, but found to have the identical latent gap) remains blocked for open, since neither portal mapping table has an entry for it.
  • docs/essentials/resource_types.md: Added the 13 brand-new item types to the resource type reference table (the 3 that already existed — ApacheAirflowJob, OrgApp, PaginatedReport — were already listed).
  • Added 16 individual changie entries under .changes/unreleased/ (one per item type, matching the repo's existing convention), each accurately scoped to the commands enabled for that item.

Verification

  • Programmatic check of the full 16×4 (mkdir/get/set/rm) matrix from the issue against check_command_support — 100% match.
  • Programmatic check that every ItemType with a format_mapping entry either has a uri_mapping entry or is blocked for open — no gaps remain (only MirroredWarehouse is blocked, correctly).
  • black --check and mypy --ignore-missing-imports pass on the modified Python file.
  • Full tests/test_core + tests/test_utils suite: 605 passed, 1 pre-existing failure unrelated to this change (confirmed identical on main, in test_fab_logger.py).
  • Independent review loop (3 rounds, each a fresh agent with no access to implementation reasoning):
    1. Round 1: REQUEST CHANGES — flagged that 13 new item types had no uri_mapping, so fab open would build a malformed URL. Fixed by blocking open for them (superseded by the portal mapping added afterward).
    2. Round 2: REQUEST CHANGES — flagged that pre-existing MirroredWarehouse had the identical gap and remained unblocked. Fixed.
    3. Round 3: APPROVE WITH COMMENTS — independently re-verified the full support matrix and the open/uri_mapping invariant with fresh scripts, re-ran the test suite, and found no further blocking issues.

Known limitation / follow-up

export/import support, and adding these 16 item types to the VCR-cassette-driven ALL_ITEM_TYPES/basic_item_parametrize test parametrization in tests/test_commands/conftest.py, are left for a follow-up iteration — cassettes require recording against a live Fabric tenant, which isn't available in this environment. MirroredWarehouse's open support is also left as a follow-up pending a confirmed portal route. Tracked in #104.

Alon Yeshurun and others added 7 commits September 23, 2026 18:25
- Resolves #104

Register AnomalyDetector, ApacheAirflowJob, AppBackend,
AzureDatabricksStorage, DataAgent, DataBuildToolJob, EventSchemaSet,
MirroredAzureDatabricksCatalog, MirroredCatalog, OperationsAgent,
OrgApp, OrgAppAudience, PaginatedReport, Plan, SnowflakeDatabase and
WarehouseSnapshot in ItemType with their Fabric REST API URI segments
(verified against the public Fabric REST API docs), which also fixes
ls for these items since unregistered item types previously raised
a FabricCLIError when listed.

Enable get/set/rm for all 16 item types, and mkdir for the subset that
supports it in this iteration (ApacheAirflowJob, DataAgent,
DataBuildToolJob, EventSchemaSet, OperationsAgent, OrgApp, Plan) by
updating command_support.yaml's unsupported_items lists. mkdir stays
unsupported for the remaining 9 item types per the onboarding table.

export/import (and cp/mv) support, plus VCR-recorded test coverage,
are left for follow-up iterations since they require a live tenant to
record cassettes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Registering these 16 item types in ItemType now makes them listable
and gettable, but 13 of them have no `uri_mapping` entry (portal URL
slug), which the `open` command relies on unconditionally. Without a
guard, `fab open` on one of these items would build a malformed URL
(missing/duplicated path segment) instead of failing cleanly.

Block `open` explicitly for the 13 item types lacking a uri_mapping
entry via command_support.yaml, consistent with how other
not-yet-supported combinations are gated elsewhere in this file.
PaginatedReport, ApacheAirflowJob and OrgApp already have working
uri_mapping entries, so `open` remains enabled for them.

Found during independent code review of PR #105.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
MirroredWarehouse predates this PR (already registered with a
format_mapping entry) but was also missing a uri_mapping entry,
leaving fab open exposed to the same malformed-URL problem for it.
Found while verifying the open/uri_mapping fix was complete during
round-2 independent review.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace the single combined changelog entry with 16 individual
entries, one per onboarded item type, matching the existing
convention of one changie entry per item (see GraphModel/Ontology
entries) and accurately reflecting that mkdir is only enabled for
the 7 item types that support it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Derive real portal route slugs for AnomalyDetector, AppBackend,
AzureDatabricksStorage, DataAgent, DataBuildToolJob, EventSchemaSet,
MirroredAzureDatabricksCatalog, MirroredCatalog, OperationsAgent,
OrgAppAudience, Plan, SnowflakeDatabase and WarehouseSnapshot from the
Fabric portal's catalogTypeAliases/fabricArtifactRouteNames mapping
tables, and add them to uri_mapping in fab_types.py. Remove these 13
item types from open.unsupported_items in command_support.yaml now
that `fab open` can build a correct URL for them.

MirroredWarehouse (a pre-existing item type, unrelated to this PR's
16 onboarded types) has no entry in either portal mapping table, so
it stays blocked for `open` per "if uncertain, keep unsupported".

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add the 16 onboarded item types to shared command parametrization and
set metadata coverage. Keep mkdir success tests restricted to the seven
item types enabled for mkdir, and cover the other nine through the
existing unsupported-item failure parametrization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Include all existing and newly supported item types in mkdir success
coverage, while deriving mkdir unsupported coverage from the command
support matrix. Keep rm unsupported coverage aligned with rm instead of
reusing mkdir-only item types.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Onboard mkdir/get/set/rm/ls support for 16 currently-unsupported item types

1 participant