Skip to content

Commit 8e9fe88

Browse files
authored
chore: rename ADL → ADF MONGOSH-1230 (#1324)
1 parent 0868ae3 commit 8e9fe88

File tree

9 files changed

+24
-23
lines changed

9 files changed

+24
-23
lines changed

packages/autocomplete/src/index.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const standalone440 = {
1010
apiVersionInfo: () => undefined,
1111
connectionInfo: () => ({
1212
is_atlas: false,
13-
is_data_lake: false,
13+
is_data_federation: false,
1414
server_version: '4.4.0'
1515
}),
1616
getCollectionCompletionsForCurrentDb: () => collections,
@@ -28,7 +28,7 @@ const sharded440 = {
2828
apiVersionInfo: () => undefined,
2929
connectionInfo: () => ({
3030
is_atlas: false,
31-
is_data_lake: false,
31+
is_data_federation: false,
3232
server_version: '4.4.0'
3333
}),
3434
getCollectionCompletionsForCurrentDb: () => collections,
@@ -40,7 +40,7 @@ const standalone300 = {
4040
apiVersionInfo: () => undefined,
4141
connectionInfo: () => ({
4242
is_atlas: false,
43-
is_data_lake: false,
43+
is_data_federation: false,
4444
server_version: '3.0.0'
4545
}),
4646
getCollectionCompletionsForCurrentDb: () => collections,
@@ -51,7 +51,7 @@ const datalake440 = {
5151
apiVersionInfo: () => undefined,
5252
connectionInfo: () => ({
5353
is_atlas: true,
54-
is_data_lake: true,
54+
is_data_federation: true,
5555
server_version: '4.4.0'
5656
}),
5757
getCollectionCompletionsForCurrentDb: () => collections,

packages/autocomplete/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface AutocompleteParameters {
2020
topology: () => Topologies;
2121
connectionInfo: () => undefined | {
2222
is_atlas: boolean;
23-
is_data_lake: boolean;
23+
is_data_federation: boolean;
2424
server_version: string;
2525
},
2626
apiVersionInfo: () => { version: string, strict: boolean } | undefined;
@@ -192,7 +192,7 @@ function isAcceptable(
192192
const isAcceptableEnvironment =
193193
!entry.env ||
194194
!connectionInfo ||
195-
(connectionInfo.is_data_lake ? entry.env.includes(ADL) :
195+
(connectionInfo.is_data_federation ? entry.env.includes(ADL) :
196196
connectionInfo.is_atlas ? entry.env.includes(ATLAS) :
197197
entry.env.includes(ON_PREM));
198198
return isAcceptableVersion && isAcceptableEnvironment;

packages/browser-runtime-core/src/autocompleter/shell-api-autocompleter.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const standalone440 = {
77
apiVersionInfo: () => undefined,
88
connectionInfo: () => ({
99
is_atlas: false,
10-
is_data_lake: false,
10+
is_data_federation: false,
1111
server_version: '4.4.0'
1212
}),
1313
getCollectionCompletionsForCurrentDb: () => ['bananas'],

packages/cli-repl/src/mongosh-repl.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ describe('MongoshNodeRepl', () => {
10841084
sp.getNewConnection.callsFake(async() => {
10851085
Object.assign(connectionInfo.extraInfo, {
10861086
is_localhost: true,
1087-
is_data_lake: true
1087+
is_data_federation: true
10881088
});
10891089
return sp;
10901090
});
@@ -1096,7 +1096,7 @@ describe('MongoshNodeRepl', () => {
10961096

10971097
input.write('db = Mongo("foo").getDB("bar")\n');
10981098
await waitEval(bus);
1099-
expect(output).to.contain('AtlasDataLake bar> ');
1099+
expect(output).to.contain('AtlasDataFederation bar> ');
11001100
});
11011101

11021102
context('user-provided prompt', () => {

packages/service-provider-core/src/connect-info.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe('getConnectInfo', function() {
8787
mongosh_version: '0.0.6',
8888
is_enterprise: true,
8989
auth_type: 'LDAP',
90-
is_data_lake: false,
90+
is_data_federation: false,
9191
dl_version: null,
9292
atlas_version: '20210330.0.0.1617063608',
9393
is_genuine: true,
@@ -115,7 +115,7 @@ describe('getConnectInfo', function() {
115115
mongosh_version: '0.0.6',
116116
is_enterprise: true,
117117
auth_type: null,
118-
is_data_lake: false,
118+
is_data_federation: false,
119119
dl_version: null,
120120
atlas_version: '20210330.0.0.1617063608',
121121
is_genuine: true,
@@ -143,7 +143,7 @@ describe('getConnectInfo', function() {
143143
mongosh_version: '0.0.6',
144144
is_enterprise: true,
145145
auth_type: 'LDAP',
146-
is_data_lake: false,
146+
is_data_federation: false,
147147
dl_version: null,
148148
atlas_version: null,
149149
is_genuine: true,
@@ -171,7 +171,7 @@ describe('getConnectInfo', function() {
171171
mongosh_version: '0.0.6',
172172
is_enterprise: false,
173173
auth_type: 'LDAP',
174-
is_data_lake: false,
174+
is_data_federation: false,
175175
dl_version: null,
176176
atlas_version: null,
177177
is_genuine: true,

packages/service-provider-core/src/connect-info.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface ConnectInfo {
1313
server_arch?: string;
1414
is_enterprise: boolean;
1515
auth_type?: string;
16-
is_data_lake: boolean;
16+
is_data_federation: boolean;
1717
dl_version?: string;
1818
atlas_version?: string;
1919
is_genuine: boolean;
@@ -26,7 +26,8 @@ export default function getConnectInfo(uri: string, mongoshVersion: string, buil
2626
buildInfo ??= {}; // We're currently not getting buildInfo with --apiStrict.
2727
const { isGenuine: is_genuine, serverName: non_genuine_server_name } =
2828
getBuildInfo.getGenuineMongoDB(buildInfo, cmdLineOpts);
29-
const { isDataLake: is_data_lake, dlVersion: dl_version }
29+
// Atlas Data Lake has been renamed to Atlas Data Federation
30+
const { isDataLake: is_data_federation, dlVersion: dl_version }
3031
= getBuildInfo.getDataLake(buildInfo);
3132

3233
// get this information from topology rather than cmdLineOpts, since not all
@@ -48,7 +49,7 @@ export default function getConnectInfo(uri: string, mongoshVersion: string, buil
4849
server_arch,
4950
is_enterprise: getBuildInfo.isEnterprise(buildInfo),
5051
auth_type,
51-
is_data_lake,
52+
is_data_federation,
5253
dl_version,
5354
atlas_version: atlasVersion?.atlasVersion ?? null,
5455
is_genuine,

packages/shell-api/src/shell-instance-state.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ describe('ShellInstanceState', () => {
8585
serviceProvider.getConnectionInfo.resolves({
8686
extraInfo: {
8787
uri: 'mongodb://localhost/',
88-
is_data_lake: true
88+
is_data_federation: true
8989
}
9090
});
9191

9292
await instanceState.fetchConnectionInfo();
9393
const prompt = await instanceState.getDefaultPrompt();
94-
expect(prompt).to.equal('AtlasDataLake test> ');
94+
expect(prompt).to.equal('AtlasDataFederation test> ');
9595
});
9696

9797
it('wins against enterprise and atlas', async() => {
@@ -100,13 +100,13 @@ describe('ShellInstanceState', () => {
100100
uri: 'mongodb://localhost/',
101101
is_enterprise: true,
102102
is_atlas: true,
103-
is_data_lake: true
103+
is_data_federation: true
104104
}
105105
});
106106

107107
await instanceState.fetchConnectionInfo();
108108
const prompt = await instanceState.getDefaultPrompt();
109-
expect(prompt).to.equal('AtlasDataLake test> ');
109+
expect(prompt).to.equal('AtlasDataFederation test> ');
110110
});
111111
});
112112

packages/shell-api/src/shell-instance-state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ export default class ShellInstanceState {
437437

438438
private getDefaultPromptPrefix(): string {
439439
const extraConnectionInfo = this.connectionInfo?.extraInfo;
440-
if (extraConnectionInfo?.is_data_lake) {
441-
return 'AtlasDataLake';
440+
if (extraConnectionInfo?.is_data_federation) {
441+
return 'AtlasDataFederation';
442442
} else if (extraConnectionInfo?.is_atlas) {
443443
return 'Atlas';
444444
} else if (extraConnectionInfo?.is_enterprise || this.connectionInfo?.buildInfo?.modules?.indexOf('enterprise') >= 0) {

packages/types/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface ConnectEvent {
5252
server_arch?: string;
5353
is_enterprise: boolean;
5454
auth_type?: string;
55-
is_data_lake: boolean;
55+
is_data_federation: boolean;
5656
dl_version?: string;
5757
is_genuine: boolean;
5858
non_genuine_server_name: string;

0 commit comments

Comments
 (0)