Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Onboards support for
mkdir,get,set,rm, andlsfor 16 Fabric item types that were previously unsupported, per the requested support matrix.export/importare 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.Changes
src/fabric_cli/core/fab_types.py: Registered all 16 item types in theItemTypeenum with their Fabric REST API URI segments informat_mapping(verified against the public Fabric REST API documentation for each item type). Registering the enum is what fixesls: item construction (Item.__init__→ItemType.from_string()) previously raised aFabricCLIErrorfor any APItypevalue not in the enum, breaking workspace listing for these items. Also corrected two pre-existing, wrongformat_mappingentries 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.uri_mapping(portal URL route) entries for 13 of the 16 item types, derived from the Fabric portal's internalcatalogTypeAliases/fabricArtifactRouteNamesmapping tables (e.g.DataAgent→ aliasLLMPlugin→ routeaiskills;Plan→ aliasPlanning→ routeplans).src/fabric_cli/core/fab_config/command_support.yaml:get/set/rmuse a blocklist (unsupported_items) — removed all 16 item types from these lists to enable them.mkdiris 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 tomkdir'sunsupported_itemsto keep them blocked (since the blocklist model otherwise defaults to allow). None of the 7 mkdir-enabled item types require special creation parameters — theirCreate<Item>RequestAPI bodies only takedisplayName/description/folderId, so no changes were needed tofab_cmd_mkdir_utils.py.openis now enabled for 13 of the 16 item types (all exceptAnomalyDetector's three siblings that lack a resolvable portal route — actually onlyMirroredWarehouseremains blocked, see below). Only the pre-existingMirroredWarehouseitem type (unrelated to this PR's 16 item types, but found to have the identical latent gap) remains blocked foropen, 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)..changes/unreleased/(one per item type, matching the repo's existing convention), each accurately scoped to the commands enabled for that item.Verification
check_command_support— 100% match.ItemTypewith aformat_mappingentry either has auri_mappingentry or is blocked foropen— no gaps remain (onlyMirroredWarehouseis blocked, correctly).black --checkandmypy --ignore-missing-importspass on the modified Python file.tests/test_core+tests/test_utilssuite: 605 passed, 1 pre-existing failure unrelated to this change (confirmed identical onmain, intest_fab_logger.py).uri_mapping, sofab openwould build a malformed URL. Fixed by blockingopenfor them (superseded by the portal mapping added afterward).MirroredWarehousehad the identical gap and remained unblocked. Fixed.Known limitation / follow-up
export/importsupport, and adding these 16 item types to the VCR-cassette-drivenALL_ITEM_TYPES/basic_item_parametrizetest parametrization intests/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'sopensupport is also left as a follow-up pending a confirmed portal route. Tracked in #104.