Skip to content

Commit e9ebaeb

Browse files
committed
Change flag name to DisableCloseOnAttachFailure
1 parent f443bef commit e9ebaeb

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

packages/common/container-definitions/src/loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ export interface IContainer extends IEventProvider<IContainerEvents> {
421421
*
422422
* By default, the container will close if attach fails.
423423
* However, closure can now be avoided in most cased by setting:
424-
* Fluid.Container.RetryOnAttachFailure to true
424+
* Fluid.Container.DisableCloseOnAttachFailure to true
425425
* via the config provider passed to the loader.
426426
*
427427
* If attach fails, check the closed property to discover if retry is possible.

packages/loader/container-loader/src/container.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,9 @@ export class Container
13011301
});
13021302

13031303
// only enable the new behavior if the config is set
1304-
if (this.mc.config.getBoolean("Fluid.Container.RetryOnAttachFailure") !== true) {
1304+
if (
1305+
this.mc.config.getBoolean("Fluid.Container.DisableCloseOnAttachFailure") !== true
1306+
) {
13051307
attachP = attachP.catch((error) => {
13061308
throw normalizeErrorAndClose(error);
13071309
});
@@ -1547,11 +1549,11 @@ export class Container
15471549
service.on("metadataUpdate", this.metadataUpdateHandler);
15481550
}
15491551
} else {
1550-
// When RetryOnAttachFailure is enabled, use no internal retries
1552+
// When DisableCloseOnAttachFailure is enabled, use no internal retries
15511553
// The consumer will own the retry policy
1552-
const retryOnAttachFailure =
1553-
this.mc.config.getBoolean("Fluid.Container.RetryOnAttachFailure") === true;
1554-
const maxRetries = retryOnAttachFailure ? 0 : undefined;
1554+
const disableCloseOnAttachFailure =
1555+
this.mc.config.getBoolean("Fluid.Container.DisableCloseOnAttachFailure") === true;
1556+
const maxRetries = disableCloseOnAttachFailure ? 0 : undefined;
15551557

15561558
service = await runWithRetry(
15571559
async () =>

packages/loader/container-loader/src/test/loader.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ describe("loader unit test", () => {
9898
urlResolver: failProxy(),
9999
configProvider: {
100100
getRawConfig: (name): ConfigTypes =>
101-
name === "Fluid.Container.RetryOnAttachFailure" ? true : undefined,
101+
name === "Fluid.Container.DisableCloseOnAttachFailure" ? true : undefined,
102102
},
103103
});
104104
const detached = await loader.createDetachedContainer({ package: "none" });
@@ -136,7 +136,7 @@ describe("loader unit test", () => {
136136
}),
137137
configProvider: {
138138
getRawConfig: (name): ConfigTypes =>
139-
name === "Fluid.Container.RetryOnAttachFailure" ? true : undefined,
139+
name === "Fluid.Container.DisableCloseOnAttachFailure" ? true : undefined,
140140
},
141141
});
142142
const detached = await loader.createDetachedContainer({ package: "none" });

packages/test/test-end-to-end-tests/src/test/blobs.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ function serializationTests({
583583
loaderProps: {
584584
documentServiceFactory,
585585
configProvider: createTestConfigProvider({
586-
"Fluid.Container.RetryOnAttachFailure": true,
586+
"Fluid.Container.DisableCloseOnAttachFailure": true,
587587
}),
588588
},
589589
});

packages/test/test-end-to-end-tests/src/test/detachedContainerTests.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ describeCompat("Detached Container", "NoCompat", (getTestObjectProvider, apis) =
956956
{
957957
configProvider: {
958958
getRawConfig: (name) =>
959-
name === "Fluid.Container.RetryOnAttachFailure" ? true : undefined,
959+
name === "Fluid.Container.DisableCloseOnAttachFailure" ? true : undefined,
960960
},
961961
},
962962
);

packages/test/test-end-to-end-tests/src/test/serializeAfterFailedAttach.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describeCompat(
8787
logger: provider.logger,
8888
configProvider: {
8989
getRawConfig: (name) =>
90-
name === "Fluid.Container.RetryOnAttachFailure" ? true : undefined,
90+
name === "Fluid.Container.DisableCloseOnAttachFailure" ? true : undefined,
9191
},
9292
});
9393
return testLoader;

0 commit comments

Comments
 (0)