Skip to content

Commit caf418d

Browse files
authored
feat(compass-indexes): only show columnstore index option for mongodb server >= 7 COMPASS-5970 (#3413)
chore(compass-indexes): only show columnstore index option for mongodb server >= 7
1 parent e09b562 commit caf418d

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

packages/compass-e2e-tests/tests/collection-indexes-tab.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ describe('Collection indexes tab', function () {
175175
});
176176
});
177177

178-
describe('server version 6.1.0', function () {
178+
describe('server version 7.0.0', function () {
179179
it('supports creating a columnstore index', async function () {
180-
if (semver.lt(MONGODB_VERSION, '6.1.0-alpha0')) {
180+
if (semver.lt(MONGODB_VERSION, '7.0.0-alpha0')) {
181181
return this.skip();
182182
}
183183

packages/compass-indexes/src/components/create-index-fields/create-index-fields.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ describe('CreateIndexFields Component', function () {
128128
});
129129
});
130130

131-
describe('server version 6.1.0', function () {
131+
describe('server version 7.0.0', function () {
132132
afterEach(cleanup);
133133

134134
it('shows columnstore indexes as a selectable index type', function () {
135135
render(
136136
<CreateIndexFields
137137
schemaFields={[]}
138138
fields={[{ name: '', type: '' }]}
139-
serverVersion="6.1.0"
139+
serverVersion="7.0.0"
140140
isRemovable
141141
updateFieldName={noop}
142142
updateFieldType={noop}

packages/compass-indexes/src/components/create-index-form/create-index-form.spec.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ describe('CreateIndexForm Component', function () {
587587
});
588588
});
589589

590-
describe('server version 6.1.0', function () {
590+
describe('server version 7.0.0', function () {
591591
context('when initial state', function () {
592592
beforeEach(function () {
593593
spyComponentProps();
@@ -625,7 +625,7 @@ describe('CreateIndexForm Component', function () {
625625
useWildcardProjection={false}
626626
columnstoreProjection=""
627627
useColumnstoreProjection={false}
628-
serverVersion="6.1.0"
628+
serverVersion="7.0.0"
629629
columnstoreProjectionChanged={columnstoreProjectionChangedSpy}
630630
wildcardProjectionChanged={wildcardProjectionChangedSpy}
631631
createNewIndexField={createNewIndexFieldSpy}
@@ -698,7 +698,7 @@ describe('CreateIndexForm Component', function () {
698698
useWildcardProjection={false}
699699
columnstoreProjection=""
700700
useColumnstoreProjection={true}
701-
serverVersion="6.1.0"
701+
serverVersion="7.0.0"
702702
columnstoreProjectionChanged={columnstoreProjectionChangedSpy}
703703
wildcardProjectionChanged={wildcardProjectionChangedSpy}
704704
createNewIndexField={createNewIndexFieldSpy}

packages/compass-indexes/src/utils/has-columnstore-indexes-support.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ import { expect } from 'chai';
33
import { hasColumnstoreIndexesSupport } from './has-columnstore-indexes-support';
44

55
describe('hasColumnstoreIndexesSupport', function () {
6-
it('returns false for < 6.1.0', function () {
6+
it('returns false for < 7.0.0', function () {
77
expect(hasColumnstoreIndexesSupport('4.2.0')).to.be.false;
88
expect(hasColumnstoreIndexesSupport('4.4.0')).to.be.false;
99
expect(hasColumnstoreIndexesSupport('5.0.0')).to.be.false;
1010
expect(hasColumnstoreIndexesSupport('6.0.1')).to.be.false;
1111
});
1212

13-
it('returns true for 6.1+', function () {
14-
expect(hasColumnstoreIndexesSupport('6.1.0-alpha0')).to.be.true;
15-
expect(hasColumnstoreIndexesSupport('6.1.0')).to.be.true;
13+
it('returns true for 7+', function () {
1614
expect(hasColumnstoreIndexesSupport('7.0.0')).to.be.true;
1715
expect(hasColumnstoreIndexesSupport('7.2.0')).to.be.true;
1816
});

packages/compass-indexes/src/utils/has-columnstore-indexes-support.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import semver from 'semver';
22

3-
const MIN_COLUMNSTORE_INDEXES_SERVER_VERSION = '6.1.0-alpha0';
3+
const MIN_COLUMNSTORE_INDEXES_SERVER_VERSION = '7.0.0-alpha0';
44

55
export function hasColumnstoreIndexesSupport(
66
serverVersion: string | undefined | null

0 commit comments

Comments
 (0)