Skip to content

Commit 6a0b5ce

Browse files
mabaasitgribnoysup
andauthored
chore(explain-aggregation): remove feature flag COMPASS-5849 (#3122)
Co-authored-by: Sergey Petushkov <[email protected]>
1 parent ba1a6c3 commit 6a0b5ce

File tree

5 files changed

+2
-35
lines changed

5 files changed

+2
-35
lines changed

packages/compass-aggregations/src/components/pipeline-toolbar/pipeline-header/pipeline-actions.spec.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import type { SinonSpy } from 'sinon';
77

88
import { PipelineActions } from './pipeline-actions';
99

10-
const initialEnableExplain = process.env.COMPASS_ENABLE_AGGREGATION_EXPLAIN;
11-
1210
describe('PipelineActions', function () {
1311
describe('options visible', function () {
1412
let onRunAggregationSpy: SinonSpy;
@@ -17,7 +15,6 @@ describe('PipelineActions', function () {
1715
let onExplainAggregationSpy: SinonSpy;
1816

1917
beforeEach(function () {
20-
process.env.COMPASS_ENABLE_AGGREGATION_EXPLAIN = 'true';
2118
onRunAggregationSpy = spy();
2219
onToggleOptionsSpy = spy();
2320
onExportAggregationResultsSpy = spy();
@@ -39,10 +36,6 @@ describe('PipelineActions', function () {
3936
);
4037
});
4138

42-
afterEach(function () {
43-
process.env.COMPASS_ENABLE_AGGREGATION_EXPLAIN = initialEnableExplain;
44-
});
45-
4639
it('calls onRunAggregation callback on click', function () {
4740
const button = screen.getByTestId('pipeline-toolbar-run-button');
4841
expect(button).to.exist;
@@ -123,7 +116,6 @@ describe('PipelineActions', function () {
123116
let onExplainAggregationSpy: SinonSpy;
124117

125118
beforeEach(function () {
126-
process.env.COMPASS_ENABLE_AGGREGATION_EXPLAIN = 'true';
127119
onRunAggregationSpy = spy();
128120
onExportAggregationResultsSpy = spy();
129121
onExplainAggregationSpy = spy();
@@ -145,10 +137,6 @@ describe('PipelineActions', function () {
145137
);
146138
});
147139

148-
afterEach(function () {
149-
process.env.COMPASS_ENABLE_AGGREGATION_EXPLAIN = initialEnableExplain;
150-
});
151-
152140
it('run action disabled', function () {
153141
const button = screen.getByTestId('pipeline-toolbar-run-button');
154142
expect(button.getAttribute('disabled')).to.exist;

packages/compass-aggregations/src/components/pipeline-toolbar/pipeline-header/pipeline-actions.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,13 @@ export const PipelineActions: React.FunctionComponent<PipelineActionsProps> = ({
5151
showUpdateViewButton,
5252
isUpdateViewButtonDisabled,
5353
isExplainButtonDisabled,
54-
showExplainButton: _showExplainButton,
54+
showExplainButton,
5555
onUpdateView,
5656
onRunAggregation,
5757
onToggleOptions,
5858
onExportAggregationResults,
5959
onExplainAggregation,
6060
}) => {
61-
const showExplainButton =
62-
process?.env?.COMPASS_ENABLE_AGGREGATION_EXPLAIN === 'true' &&
63-
_showExplainButton;
6461
return (
6562
<div className={containerStyles}>
6663
{showUpdateViewButton && (

packages/compass-aggregations/src/components/pipeline/pipeline.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,7 @@ class Pipeline extends PureComponent {
298298
{this.renderModifyingViewSourceError()}
299299
{this.renderPipelineWorkspace()}
300300
{this.renderSavePipeline()}
301-
{process?.env?.COMPASS_ENABLE_AGGREGATION_EXPLAIN === 'true' && (
302-
<PipelineExplain />
303-
)}
301+
<PipelineExplain />
304302
<Settings
305303
isAtlasDeployed={this.props.isAtlasDeployed}
306304
isExpanded={this.props.settings.isExpanded}

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ async function waitForAnyText(
2525
return text !== '';
2626
});
2727
}
28-
const initialAggregationToolbarValue =
29-
process.env.COMPASS_SHOW_NEW_AGGREGATION_TOOLBAR;
30-
const initialAggregationExplainValue =
31-
process.env.COMPASS_ENABLE_AGGREGATION_EXPLAIN;
3228

3329
async function goToRunAggregation(browser: CompassBrowser) {
3430
if (await browser.$(Selectors.AggregationBuilderWorkspace).isDisplayed()) {
@@ -726,9 +722,6 @@ describe('Aggregation Explain', function () {
726722
let browser: CompassBrowser;
727723

728724
before(async function () {
729-
process.env.COMPASS_SHOW_NEW_AGGREGATION_TOOLBAR = 'true';
730-
process.env.COMPASS_ENABLE_AGGREGATION_EXPLAIN = 'true';
731-
732725
compass = await beforeTests();
733726
browser = compass.browser;
734727
});
@@ -749,10 +742,6 @@ describe('Aggregation Explain', function () {
749742
});
750743

751744
after(async function () {
752-
process.env.COMPASS_SHOW_NEW_AGGREGATION_TOOLBAR =
753-
initialAggregationToolbarValue;
754-
process.env.COMPASS_ENABLE_AGGREGATION_EXPLAIN =
755-
initialAggregationExplainValue;
756745
await afterTests(compass, this.currentTest);
757746
});
758747

packages/compass/src/index.d.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ declare module 'process' {
5252

5353
COMPASS_CLUSTERED_COLLECTIONS?: 'true' | 'false';
5454

55-
/**
56-
* Enable aggregation explain feature
57-
*/
58-
COMPASS_ENABLE_AGGREGATION_EXPLAIN?: 'true' | 'false';
59-
6055
/**
6156
* Permanent feature flag for debugging.
6257
*/

0 commit comments

Comments
 (0)