Remove throughput bucketing feature registration check (#2604)

Derive throughput bucket availability in container settings from the supported AAD ARM path, and remove obsolete global and URL feature state.

Co-authored-by: Asier Isayas <[email protected]>
This commit is contained in:
asier-isayas
2026-09-22 08:34:26 -07:00
committed by GitHub
co-authored by Asier Isayas
parent a92669ccbc
commit 575ebd6193
6 changed files with 8 additions and 27 deletions
@@ -258,7 +258,6 @@ describe("SettingsComponent", () => {
it("should save throughput bucket changes when Save button is clicked", async () => { it("should save throughput bucket changes when Save button is clicked", async () => {
updateUserContext({ updateUserContext({
apiType: "SQL", apiType: "SQL",
throughputBucketsEnabled: true,
authType: AuthType.AAD, authType: AuthType.AAD,
}); });
@@ -16,7 +16,7 @@ import {
import { useIndexingPolicyStore } from "Explorer/Tabs/QueryTab/ResultsView"; import { useIndexingPolicyStore } from "Explorer/Tabs/QueryTab/ResultsView";
import { useDatabases } from "Explorer/useDatabases"; import { useDatabases } from "Explorer/useDatabases";
import { Keys, t } from "Localization"; import { Keys, t } from "Localization";
import { isFabricNative } from "Platform/Fabric/FabricUtil"; import { isFabric, isFabricNative } from "Platform/Fabric/FabricUtil";
import { isVectorSearchEnabled } from "Utils/CapabilityUtils"; import { isVectorSearchEnabled } from "Utils/CapabilityUtils";
import { isRunningOnPublicCloud } from "Utils/CloudUtils"; import { isRunningOnPublicCloud } from "Utils/CloudUtils";
import * as React from "react"; import * as React from "react";
@@ -204,7 +204,11 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
this.isFullTextSearchEnabled = userContext.apiType === "SQL"; this.isFullTextSearchEnabled = userContext.apiType === "SQL";
this.changeFeedPolicyVisible = userContext.features.enableChangeFeedPolicy; this.changeFeedPolicyVisible = userContext.features.enableChangeFeedPolicy;
this.throughputBucketsEnabled = userContext.throughputBucketsEnabled; this.throughputBucketsEnabled =
userContext.authType === AuthType.AAD &&
userContext.apiType === "SQL" &&
!userContext.features.enableSDKoperations &&
!isFabric();
// Mongo container with system partition key still treat as "Fixed" // Mongo container with system partition key still treat as "Fixed"
this.isFixedContainer = this.isFixedContainer =
+2 -20
View File
@@ -3,14 +3,8 @@ import { sendMessage } from "Common/MessageHandler";
import { stringifyError } from "Common/stringifyError"; import { stringifyError } from "Common/stringifyError";
import { MessageTypes } from "Contracts/ExplorerContracts"; import { MessageTypes } from "Contracts/ExplorerContracts";
import { useDataPlaneRbac } from "Explorer/Panes/SettingsPane/SettingsPane"; import { useDataPlaneRbac } from "Explorer/Panes/SettingsPane/SettingsPane";
import { import { isFabricMirrored, isFabricMirroredKey, scheduleRefreshFabricToken } from "Platform/Fabric/FabricUtil";
isFabricMirrored,
isFabricMirroredKey,
isFabricNative,
scheduleRefreshFabricToken,
} from "Platform/Fabric/FabricUtil";
import { acquireMsalTokenForAccount } from "Utils/AuthorizationUtils"; import { acquireMsalTokenForAccount } from "Utils/AuthorizationUtils";
import { featureRegistered } from "Utils/FeatureRegistrationUtils";
import { update } from "Utils/arm/generatedClients/cosmos/databaseAccounts"; import { update } from "Utils/arm/generatedClients/cosmos/databaseAccounts";
import * as ko from "knockout"; import * as ko from "knockout";
import React from "react"; import React from "react";
@@ -577,9 +571,6 @@ export default class Explorer {
scenarioMonitor.start(MetricScenario.DatabaseLoad); scenarioMonitor.start(MetricScenario.DatabaseLoad);
} }
// Run independent initialization tasks in parallel:
// - Database loading (ARM/SDK calls for databases + collections)
// - Feature registration check (ARM call — no dependency on databases)
const databasesTask = const databasesTask =
userContext.apiType !== "Postgres" && userContext.apiType !== "VCoreMongo" userContext.apiType !== "Postgres" && userContext.apiType !== "VCoreMongo"
? (async () => { ? (async () => {
@@ -596,15 +587,6 @@ export default class Explorer {
})() })()
: Promise.resolve(); : Promise.resolve();
const featureRegistrationTask = await databasesTask;
userContext.authType === AuthType.AAD && userContext.apiType === "SQL" && !isFabricNative()
? featureRegistered(userContext.subscriptionId, "ThroughputBucketing")
: Promise.resolve(false);
const [, throughputBucketsEnabled] = await Promise.all([databasesTask, featureRegistrationTask]);
if (throughputBucketsEnabled) {
updateUserContext({ throughputBucketsEnabled });
}
} }
} }
-2
View File
@@ -16,7 +16,6 @@ export type Features = {
readonly enableAadDataPlane: boolean; readonly enableAadDataPlane: boolean;
readonly enableResourceGraph: boolean; readonly enableResourceGraph: boolean;
readonly enableKoResourceTree: boolean; readonly enableKoResourceTree: boolean;
readonly enableThroughputBuckets: boolean;
readonly hostedDataExplorer: boolean; readonly hostedDataExplorer: boolean;
readonly junoEndpoint?: string; readonly junoEndpoint?: string;
readonly phoenixEndpoint?: string; readonly phoenixEndpoint?: string;
@@ -80,7 +79,6 @@ export function extractFeatures(given = new URLSearchParams(window.location.sear
enableSpark: "true" === get("enablespark"), enableSpark: "true" === get("enablespark"),
enableTtl: "true" === get("enablettl"), enableTtl: "true" === get("enablettl"),
enableKoResourceTree: "true" === get("enablekoresourcetree"), enableKoResourceTree: "true" === get("enablekoresourcetree"),
enableThroughputBuckets: "true" === get("enablethroughputbuckets"),
executeSproc: "true" === get("dataexplorerexecutesproc"), executeSproc: "true" === get("dataexplorerexecutesproc"),
hostedDataExplorer: "true" === get("hosteddataexplorerenabled"), hostedDataExplorer: "true" === get("hosteddataexplorerenabled"),
mongoProxyEndpoint: get("mongoproxyendpoint"), mongoProxyEndpoint: get("mongoproxyendpoint"),
-1
View File
@@ -144,7 +144,6 @@ export interface UserContext {
readonly feedbackPolicies?: AdminFeedbackPolicySettings; readonly feedbackPolicies?: AdminFeedbackPolicySettings;
readonly dataPlaneRbacEnabled?: boolean; readonly dataPlaneRbacEnabled?: boolean;
readonly refreshCosmosClient?: boolean; readonly refreshCosmosClient?: boolean;
throughputBucketsEnabled?: boolean;
readonly sessionId: string; readonly sessionId: string;
} }
-1
View File
@@ -34,7 +34,6 @@ describe("AuthorizationUtils", () => {
executeSproc: false, executeSproc: false,
enableResourceGraph: false, enableResourceGraph: false,
enableKoResourceTree: false, enableKoResourceTree: false,
enableThroughputBuckets: false,
hostedDataExplorer: false, hostedDataExplorer: false,
sandboxNotebookOutputs: true, sandboxNotebookOutputs: true,
showMinRUSurvey: false, showMinRUSurvey: false,