@fabricorg/databricks-testkit 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -616,6 +616,11 @@ interface DashboardResource extends JsonObject {
616
616
  display_name?: string;
617
617
  lifecycle_state?: string;
618
618
  }
619
+ interface PublishedDashboardResource extends JsonObject {
620
+ display_name?: string;
621
+ revision_create_time?: string;
622
+ warehouse_id?: string;
623
+ }
619
624
  interface GenieSpaceResource extends JsonObject {
620
625
  space_id?: string;
621
626
  title?: string;
@@ -659,6 +664,7 @@ declare class DatabricksAdvancedWorkloadsAdapter {
659
664
  pipeline(id: string): Promise<PipelineResource>;
660
665
  table(fullName: string): Promise<JsonObject>;
661
666
  dashboard(id: string): Promise<DashboardResource>;
667
+ publishedDashboard(id: string): Promise<PublishedDashboardResource>;
662
668
  genieSpace(id: string): Promise<GenieSpaceResource>;
663
669
  startGenieConversation(spaceId: string, question: string): Promise<JsonObject>;
664
670
  experiment(id: string): Promise<JsonObject>;
package/dist/index.d.ts CHANGED
@@ -616,6 +616,11 @@ interface DashboardResource extends JsonObject {
616
616
  display_name?: string;
617
617
  lifecycle_state?: string;
618
618
  }
619
+ interface PublishedDashboardResource extends JsonObject {
620
+ display_name?: string;
621
+ revision_create_time?: string;
622
+ warehouse_id?: string;
623
+ }
619
624
  interface GenieSpaceResource extends JsonObject {
620
625
  space_id?: string;
621
626
  title?: string;
@@ -659,6 +664,7 @@ declare class DatabricksAdvancedWorkloadsAdapter {
659
664
  pipeline(id: string): Promise<PipelineResource>;
660
665
  table(fullName: string): Promise<JsonObject>;
661
666
  dashboard(id: string): Promise<DashboardResource>;
667
+ publishedDashboard(id: string): Promise<PublishedDashboardResource>;
662
668
  genieSpace(id: string): Promise<GenieSpaceResource>;
663
669
  startGenieConversation(spaceId: string, question: string): Promise<JsonObject>;
664
670
  experiment(id: string): Promise<JsonObject>;
package/dist/index.js CHANGED
@@ -1900,6 +1900,9 @@ var DatabricksAdvancedWorkloadsAdapter = class {
1900
1900
  dashboard(id) {
1901
1901
  return this.client.get(`/api/2.0/lakeview/dashboards/${segment(id)}`);
1902
1902
  }
1903
+ publishedDashboard(id) {
1904
+ return this.client.get(`/api/2.0/lakeview/dashboards/${segment(id)}/published`);
1905
+ }
1903
1906
  genieSpace(id) {
1904
1907
  return this.client.get(`/api/2.0/genie/spaces/${segment(id)}`);
1905
1908
  }
@@ -2061,11 +2064,18 @@ function aiBiDashboardCheck() {
2061
2064
  description: "Published AI/BI dashboard is accessible",
2062
2065
  configured: (env) => Boolean(env.DBX_TEST_DASHBOARD_ID),
2063
2066
  async run({ env, client }) {
2064
- const dashboard = await adapter(client).dashboard(env.DBX_TEST_DASHBOARD_ID);
2067
+ const api = adapter(client);
2068
+ const id = env.DBX_TEST_DASHBOARD_ID;
2069
+ const dashboard = await api.dashboard(id);
2065
2070
  assertNotFailed("AI/BI dashboard", dashboard.lifecycle_state);
2071
+ const published = await api.publishedDashboard(id);
2072
+ if (!published.revision_create_time) {
2073
+ throw new Error(`AI/BI dashboard ${id} has no published revision`);
2074
+ }
2066
2075
  return {
2067
- dashboardId: dashboard.dashboard_id ?? env.DBX_TEST_DASHBOARD_ID,
2068
- name: dashboard.display_name
2076
+ dashboardId: dashboard.dashboard_id ?? id,
2077
+ name: published.display_name ?? dashboard.display_name,
2078
+ publishedAt: published.revision_create_time
2069
2079
  };
2070
2080
  }
2071
2081
  };
@@ -2369,7 +2379,7 @@ function regionalDrCheck(options = {}) {
2369
2379
 
2370
2380
  // src/advanced-target-packs.ts
2371
2381
  var DOCS2 = "https://experiments.fabric.pro/docs/testing/target-packs/";
2372
- var AZURE_USER_SCOPE = "Azure Databricks, West US, interactive user OAuth, public network path; existing certification fixtures";
2382
+ var AZURE_M2M_SCOPE = "Azure Databricks, dedicated service principal using OAuth M2M, public network path; named managed or disposable certification fixtures";
2373
2383
  var workspace = {
2374
2384
  id: "workspace",
2375
2385
  description: "Databricks workspace host",
@@ -2437,7 +2447,7 @@ function createAdvancedStreamingTargetPack() {
2437
2447
  ],
2438
2448
  docsUrl: `${DOCS2}#advanced-streaming-cdc-and-lakeflow-connect`,
2439
2449
  certificationScopes: [
2440
- `${AZURE_USER_SCOPE}; serverless Lakeflow pipeline AUTO CDC and query-based PostgreSQL foreign-catalog ingestion`
2450
+ `${AZURE_M2M_SCOPE}; serverless Lakeflow pipeline AUTO CDC and query-based PostgreSQL foreign-catalog ingestion`
2441
2451
  ]
2442
2452
  });
2443
2453
  }
@@ -2446,7 +2456,7 @@ function createAiBiGenieTargetPack() {
2446
2456
  id: "aibi-genie",
2447
2457
  name: "AI/BI dashboards and Genie",
2448
2458
  description: "Dashboard accessibility and authenticated Genie space/conversation behavior.",
2449
- version: "0.1.0",
2459
+ version: "0.2.0",
2450
2460
  maturity: "live-gated",
2451
2461
  capabilities: ["aibi.dashboard", "genie.space", "genie.conversation"],
2452
2462
  checks: () => [restrictedPrincipalCheck(), aiBiDashboardCheck(), genieCheck()],
@@ -2464,7 +2474,7 @@ function createAiBiGenieTargetPack() {
2464
2474
  ],
2465
2475
  docsUrl: `${DOCS2}#aibi-dashboards-and-genie`,
2466
2476
  certificationScopes: [
2467
- `${AZURE_USER_SCOPE}; AI/BI dashboard metadata and Genie conversation start`
2477
+ `${AZURE_M2M_SCOPE}; published AI/BI dashboard revision and Genie conversation start`
2468
2478
  ]
2469
2479
  });
2470
2480
  }
@@ -2496,7 +2506,7 @@ function createMlflowLifecycleTargetPack() {
2496
2506
  ],
2497
2507
  docsUrl: `${DOCS2}#mlflow-and-model-lifecycle`,
2498
2508
  certificationScopes: [
2499
- `${AZURE_USER_SCOPE}; MLflow experiment and Unity Catalog model version 20`
2509
+ `${AZURE_M2M_SCOPE}; MLflow experiment and configured Unity Catalog model version`
2500
2510
  ]
2501
2511
  });
2502
2512
  }
@@ -2534,7 +2544,7 @@ function createFeatureEngineeringTargetPack() {
2534
2544
  ],
2535
2545
  docsUrl: `${DOCS2}#feature-engineering-and-serving`,
2536
2546
  certificationScopes: [
2537
- `${AZURE_USER_SCOPE}; Delta feature table, PostgreSQL-backed Synced Table, and SQL freshness`
2547
+ `${AZURE_M2M_SCOPE}; Delta feature table, PostgreSQL-backed Synced Table, and SQL freshness`
2538
2548
  ]
2539
2549
  });
2540
2550
  }
@@ -2569,7 +2579,7 @@ function createModelServingTargetPack() {
2569
2579
  ],
2570
2580
  docsUrl: `${DOCS2}#model-serving-and-ai-gateway`,
2571
2581
  certificationScopes: [
2572
- `${AZURE_USER_SCOPE}; custom-model inference and AI Gateway inference-table configuration`
2582
+ `${AZURE_M2M_SCOPE}; custom-model inference and AI Gateway inference-table configuration`
2573
2583
  ]
2574
2584
  });
2575
2585
  }
@@ -2599,7 +2609,7 @@ function createVectorRagAgentsTargetPack() {
2599
2609
  ],
2600
2610
  docsUrl: `${DOCS2}#vector-search-rag-and-agents`,
2601
2611
  certificationScopes: [
2602
- `${AZURE_USER_SCOPE}; Delta Sync vector retrieval and custom PyFunc agent invocation`
2612
+ `${AZURE_M2M_SCOPE}; Delta Sync vector retrieval and custom PyFunc agent invocation`
2603
2613
  ]
2604
2614
  });
2605
2615
  }
@@ -2633,7 +2643,7 @@ function createFederationSharingTargetPack() {
2633
2643
  ],
2634
2644
  docsUrl: `${DOCS2}#federation-delta-sharing-and-clean-rooms`,
2635
2645
  certificationScopes: [
2636
- `${AZURE_USER_SCOPE}; managed PostgreSQL federation, Delta Sharing table, and two-metastore Clean Room`
2646
+ `${AZURE_M2M_SCOPE}; managed PostgreSQL federation, Delta Sharing table, and two-metastore Clean Room`
2637
2647
  ]
2638
2648
  });
2639
2649
  }
@@ -2669,7 +2679,7 @@ function createSecurityCostDrTargetPack() {
2669
2679
  ],
2670
2680
  docsUrl: `${DOCS2}#networking-security-cost-and-regional-dr`,
2671
2681
  certificationScopes: [
2672
- `${AZURE_USER_SCOPE}; TEST-NET block list, bounded compute policy, billing system-table guardrail, and West US 3 serverless DR warehouse`
2682
+ `${AZURE_M2M_SCOPE}; TEST-NET block list, bounded compute policy, billing system-table guardrail, and West US 3 serverless DR warehouse`
2673
2683
  ]
2674
2684
  });
2675
2685
  }