Skip to content

Commit 8289a05

Browse files
authored
refactor: remove ApiPluginAAD feature flag and update related logic (#13065)
1 parent dc12c6b commit 8289a05

File tree

4 files changed

+6
-24
lines changed

4 files changed

+6
-24
lines changed

packages/fx-core/src/common/featureFlags.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class FeatureFlagName {
2828
static readonly DevTunnelTest = "TEAMSFX_DEV_TUNNEL_TEST";
2929
static readonly SyncManifest = "TEAMSFX_SYNC_MANIFEST";
3030
static readonly KiotaIntegration = "TEAMSFX_KIOTA_INTEGRATION";
31-
static readonly ApiPluginAAD = "TEAMSFX_API_PLUGIN_AAD";
3231
static readonly CEAEnabled = "TEAMSFX_CEA_ENABLED";
3332
}
3433

@@ -84,10 +83,6 @@ export class FeatureFlags {
8483
name: FeatureFlagName.KiotaIntegration,
8584
defaultValue: "false",
8685
};
87-
static readonly ApiPluginAAD = {
88-
name: FeatureFlagName.ApiPluginAAD,
89-
defaultValue: "false",
90-
};
9186
static readonly CEAEnabled = {
9287
name: FeatureFlagName.CEAEnabled,
9388
defaultValue: "false",

packages/fx-core/src/question/create.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,9 +954,7 @@ export function apiAuthQuestion(excludeNone = false): SingleSelectQuestion {
954954
options.push(ApiAuthOptions.bearerToken(), ApiAuthOptions.microsoftEntra());
955955
} else if (inputs[QuestionNames.ApiPluginType] === ApiPluginStartOptions.newApi().id) {
956956
options.push(ApiAuthOptions.apiKey());
957-
if (featureFlagManager.getBooleanValue(FeatureFlags.ApiPluginAAD)) {
958-
options.push(ApiAuthOptions.microsoftEntra());
959-
}
957+
options.push(ApiAuthOptions.microsoftEntra());
960958
options.push(ApiAuthOptions.oauth());
961959
}
962960
return options;

packages/fx-core/tests/question/create.test.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,9 +1642,7 @@ describe("scaffold question", () => {
16421642
const tools = new MockTools();
16431643
setTools(tools);
16441644
beforeEach(() => {
1645-
mockedEnvRestore = mockedEnv({
1646-
[FeatureFlagName.ApiPluginAAD]: "true",
1647-
});
1645+
mockedEnvRestore = mockedEnv({});
16481646
});
16491647

16501648
afterEach(() => {
@@ -1981,7 +1979,6 @@ describe("scaffold question", () => {
19811979
it("traverse in cli", async () => {
19821980
mockedEnvRestore = mockedEnv({
19831981
TEAMSFX_CLI_DOTNET: "false",
1984-
[FeatureFlagName.ApiPluginAAD]: "true",
19851982
});
19861983

19871984
const inputs: Inputs = {
@@ -4064,9 +4061,7 @@ describe("scaffold question", () => {
40644061
const tools = new MockTools();
40654062
setTools(tools);
40664063
beforeEach(() => {
4067-
mockedEnvRestore = mockedEnv({
4068-
[FeatureFlagName.ApiPluginAAD]: "true",
4069-
});
4064+
mockedEnvRestore = mockedEnv({});
40704065
});
40714066

40724067
afterEach(() => {
@@ -4131,9 +4126,7 @@ describe("scaffold question", () => {
41314126
const tools = new MockTools();
41324127
setTools(tools);
41334128
beforeEach(() => {
4134-
mockedEnvRestore = mockedEnv({
4135-
[FeatureFlagName.ApiPluginAAD]: "false",
4136-
});
4129+
mockedEnvRestore = mockedEnv({});
41374130
});
41384131

41394132
afterEach(() => {
@@ -4154,6 +4147,7 @@ describe("scaffold question", () => {
41544147
assert.deepEqual(options, [
41554148
ApiAuthOptions.none(),
41564149
ApiAuthOptions.apiKey(),
4150+
ApiAuthOptions.microsoftEntra(),
41574151
ApiAuthOptions.oauth(),
41584152
]);
41594153
}

packages/tests/src/e2e/copilotExtensions/DeclarativeAgentWithEntra.tests.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@
88
import { Capability } from "../../utils/constants";
99
import { ProgrammingLanguage } from "@microsoft/teamsfx-core";
1010
import { CaseFactory } from "../caseFactory";
11-
import { FeatureFlagName } from "../../../../fx-core/src/common/featureFlags";
1211

13-
class DeclarativeAgentWithEntra extends CaseFactory {
14-
public override async onBefore(): Promise<void> {
15-
process.env[FeatureFlagName.ApiPluginAAD] = "true";
16-
}
17-
}
12+
class DeclarativeAgentWithEntra extends CaseFactory {}
1813

1914
const myRecord: Record<string, string> = {};
2015
myRecord["with-plugin"] = "yes";

0 commit comments

Comments
 (0)