Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Calico Enterprise release notes
sidebar_label: Release notes
---

import TechPreviewTable from '@site/src/components/FeatureStatusTable';
import { TechPreviewTable, DeprecatedFeaturesTable } from '@site/src/components/FeatureStatusTable';

# Calico Enterprise 3.21 release notes

Expand Down Expand Up @@ -83,12 +83,7 @@ Review the following table to see what features have recently been deprecated or
Deprecated features are still present and supported, but they are scheduled for removal.
You should consider migrating away from a deprecated feature before it is removed.

| Feature | 3.19 | 3.20 | 3.21 |
| --- | --- | --- | --- |
| Compliance reporting | GA | Deprecated | Deprecated |
| Fortinet integration | Deprecated | Deprecated | Deprecated |

GA = generally available, Deprecated = scheduled for removal, Removed = no longer present.
<DeprecatedFeaturesTable />

## Release details

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Calico Enterprise release notes
sidebar_label: Release notes
---

import TechPreviewTable from '@site/src/components/FeatureStatusTable';
import { TechPreviewTable, DeprecatedFeaturesTable } from '@site/src/components/FeatureStatusTable';

# Calico Enterprise 3.22 release notes

Expand Down Expand Up @@ -129,12 +129,7 @@ Review the following table to see what features have recently been deprecated or
Deprecated features are still present and supported, but they are scheduled for removal.
You should consider migrating away from a deprecated feature before it is removed.

| Feature | 3.20 | 3.21 | 3.22 |
| --- | --- | --- | --- |
| Compliance reporting | Deprecated | Deprecated | Deprecated |
| Fortinet integration | Deprecated | Deprecated | Deprecated |

GA = generally available, Deprecated = scheduled for removal, Removed = no longer present.
<DeprecatedFeaturesTable />

## Release details

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Calico Enterprise release notes
sidebar_label: Release notes
---

import TechPreviewTable from '@site/src/components/FeatureStatusTable';
import { TechPreviewTable, DeprecatedFeaturesTable } from '@site/src/components/FeatureStatusTable';

# Calico Enterprise 3.23 release notes

Expand Down Expand Up @@ -148,15 +148,7 @@ Review the following table to see what features have recently been deprecated or
Deprecated features are still present and supported, but they are scheduled for removal.
You should consider migrating away from a deprecated feature before it is removed.

| Feature | 3.21 | 3.22 | 3.23 |
| --- | --- | --- | --- |
| Aggregation API server | GA | GA | Deprecated |
| Application layer policy based on Envoy | GA | GA | Deprecated |
| L7 logging with Envoy | GA | GA | Deprecated |
| Compliance reporting | Deprecated | Deprecated | Deprecated |
| Fortinet integration | Deprecated | Deprecated | Deprecated |

GA = generally available, Deprecated = scheduled for removal, Removed = no longer present.
<DeprecatedFeaturesTable />

### Deprecated and removed features in this release

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Calico Enterprise release notes
sidebar_label: Release notes
---

import TechPreviewTable from '@site/src/components/FeatureStatusTable';
import { TechPreviewTable, DeprecatedFeaturesTable } from '@site/src/components/FeatureStatusTable';

# Calico Enterprise 3.24 release notes

Expand Down Expand Up @@ -74,15 +74,7 @@ Review the following table to see what features have recently been deprecated or
Deprecated features are still present and supported, but they are scheduled for removal.
You should consider migrating away from a deprecated feature before it is removed.

| Feature | 3.22 | 3.23 | 3.24 |
| --- | --- | --- | --- |
| Compliance reporting | Deprecated | Deprecated | Removed |
| Aggregation API server | GA | Deprecated | Deprecated |
| Application layer policy based on Envoy | GA | Deprecated | Deprecated |
| L7 logging with Envoy | GA | Deprecated | Deprecated |
| Fortinet integration | Deprecated | Deprecated | Deprecated |

GA = generally available, Deprecated = scheduled for removal, Removed = no longer present.
<DeprecatedFeaturesTable />

### Deprecated and removed features in this release

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Calico Enterprise release notes
sidebar_label: Release notes
---

import TechPreviewTable from '@site/src/components/FeatureStatusTable';
import { TechPreviewTable, DeprecatedFeaturesTable } from '@site/src/components/FeatureStatusTable';

# Calico Enterprise 3.24 release notes

Expand Down Expand Up @@ -74,15 +74,7 @@ Review the following table to see what features have recently been deprecated or
Deprecated features are still present and supported, but they are scheduled for removal.
You should consider migrating away from a deprecated feature before it is removed.

| Feature | 3.22 | 3.23 | 3.24 |
| --- | --- | --- | --- |
| Compliance reporting | Deprecated | Deprecated | Removed |
| Aggregation API server | GA | Deprecated | Deprecated |
| Application layer policy based on Envoy | GA | Deprecated | Deprecated |
| L7 logging with Envoy | GA | Deprecated | Deprecated |
| Fortinet integration | Deprecated | Deprecated | Deprecated |

GA = generally available, Deprecated = scheduled for removal, Removed = no longer present.
<DeprecatedFeaturesTable />

### Deprecated and removed features in this release

Expand Down
8 changes: 2 additions & 6 deletions calico_versioned_docs/version-3.30/release-notes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Calico Open Source release notes
sidebar_label: Release notes
---

import TechPreviewTable from '@site/src/components/FeatureStatusTable';
import { TechPreviewTable, DeprecatedFeaturesTable } from '@site/src/components/FeatureStatusTable';

# Calico Open Source 3.30 release notes

Expand Down Expand Up @@ -163,11 +163,7 @@ Review the following table to see what features have recently been deprecated or
Deprecated features are still present and supported, but they are scheduled for removal.
You should consider migrating away from a deprecated feature before it is removed.

| Feature | 3.28 | 3.29 | 3.30 |
| --- | --- | --- | --- |
| FIPS mode | GA | GA | Deprecated |

GA = generally available, Deprecated = scheduled for removal, Removed = no longer present.
<DeprecatedFeaturesTable />

### Deprecated and removed features in this release

Expand Down
8 changes: 2 additions & 6 deletions calico_versioned_docs/version-3.31/release-notes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Calico Open Source release notes
sidebar_label: Release notes
---

import TechPreviewTable from '@site/src/components/FeatureStatusTable';
import { TechPreviewTable, DeprecatedFeaturesTable } from '@site/src/components/FeatureStatusTable';

# Calico Open Source 3.31 release notes

Expand Down Expand Up @@ -189,11 +189,7 @@ Review the following table to see what features have recently been deprecated or
Deprecated features are still present and supported, but they are scheduled for removal.
You should consider migrating away from a deprecated feature before it is removed.

| Feature | 3.29 | 3.30 | 3.31 |
| --- | --- | --- | --- |
| FIPS mode | GA | Deprecated | Deprecated |

GA = generally available, Deprecated = scheduled for removal, Removed = no longer present.
<DeprecatedFeaturesTable />

## Bug fixes

Expand Down
9 changes: 2 additions & 7 deletions calico_versioned_docs/version-3.32/release-notes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Calico Open Source release notes
sidebar_label: Release notes
---

import TechPreviewTable from '@site/src/components/FeatureStatusTable';
import { TechPreviewTable, DeprecatedFeaturesTable } from '@site/src/components/FeatureStatusTable';

# Calico Open Source 3.32 release notes

Expand Down Expand Up @@ -98,12 +98,7 @@ Review the following table to see what features have recently been deprecated or
Deprecated features are still present and supported, but they are scheduled for removal.
You should consider migrating away from a deprecated feature before it is removed.

| Feature | 3.30 | 3.31 | 3.32 |
| --- | --- | --- | --- |
| Aggregation API server | GA | GA | Deprecated |
| FIPS mode | Deprecated | Deprecated | Deprecated |

GA = generally available, Deprecated = scheduled for removal, Removed = no longer present.
<DeprecatedFeaturesTable />

### Deprecated and removed features in this release

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ import fs from 'fs';
import path from 'path';
import { parse } from 'yaml';

import { buildLegend, buildRows, cellLabel, PREVIEW_LEGEND, releaseWindow } from '../featureStatus';
import { buildLegend, buildRows, cellLabel, DEPRECATION_TABLE, PREVIEW_TABLE, releaseWindow } from '../featureStatus';
import type { Feature } from '../featureStatus';

const features: Feature[] = parse(
fs.readFileSync(path.join(__dirname, '../../../../data/feature-status.yaml'), 'utf8')
).features;

/** Render rows the way the Markdown tables they replace were written. */
const asMarkdown = (product: string, versions: string[]) =>
buildRows(features, product, versions).map((row) => `| ${row.name} | ${row.cells.map(cellLabel).join(' | ')} |`);
const asMarkdown = (product: string, versions: string[], include = PREVIEW_TABLE.include) =>
buildRows(features, product, versions, include).map(
(row) => `| ${row.name} | ${row.cells.map(cellLabel).join(' | ')} |`
);

describe('releaseWindow', () => {
it('returns the three releases ending at the given version, oldest first', () => {
Expand All @@ -34,16 +36,21 @@ describe('releaseWindow', () => {

describe('buildRows', () => {
const window = ['3.30', '3.31', '3.32'];
const names = (product: string, versions: string[]) => buildRows(features, product, versions).map((row) => row.name);
const names = (product: string, versions: string[]) =>
buildRows(features, product, versions, PREVIEW_TABLE.include).map((row) => row.name);

it('carries a status forward until the next recorded change', () => {
// nftables is recorded as tech preview in 3.29 and GA in 3.31, and nothing else.
const [row] = buildRows(features, 'calico', window).filter((r) => r.name === 'nftables data plane');
const [row] = buildRows(features, 'calico', window, PREVIEW_TABLE.include).filter(
(r) => r.name === 'nftables data plane'
);
expect(row.cells).toEqual(['tech-preview', 'ga', 'ga']);
});

it('reports no status before a feature first appears', () => {
const [row] = buildRows(features, 'calico', window).filter((r) => r.name === 'Native v3 CRDs');
const [row] = buildRows(features, 'calico', window, PREVIEW_TABLE.include).filter(
(r) => r.name === 'Native v3 CRDs'
);
expect(row.cells).toEqual([null, null, 'tech-preview']);
});

Expand Down Expand Up @@ -112,14 +119,55 @@ describe('buildRows', () => {

describe('buildLegend', () => {
it('names every status the preview table tracks, reached or not', () => {
expect(buildLegend(PREVIEW_LEGEND)).toBe(
expect(buildLegend(PREVIEW_TABLE.legend)).toBe(
'TP = technology preview, GA = generally available, – = not available in that release.'
);
});

it('names every status the deprecation table tracks, reached or not', () => {
expect(buildLegend(DEPRECATION_TABLE.legend)).toBe(
'GA = generally available, Deprecated = scheduled for removal, Removed = no longer present, ' +
'– = not available in that release.'
);
});

it('glosses in progression order and puts the dash last', () => {
expect(buildLegend(['removed', 'tech-preview'])).toBe(
'TP = technology preview, Removed = no longer present, – = not available in that release.'
);
});
});

describe('buildRows for the deprecated and removed table', () => {
it('reproduces the Calico Open Source 3.32 table', () => {
expect(asMarkdown('calico', ['3.30', '3.31', '3.32'], DEPRECATION_TABLE.include)).toEqual([
'| Aggregation API server | GA | GA | Deprecated |',
'| FIPS mode | Deprecated | Deprecated | Deprecated |',
]);
});

it('reproduces the Calico Enterprise 3.24 table, where a feature is removed inside the window', () => {
expect(asMarkdown('calico-enterprise', ['3.22', '3.23', '3.24'], DEPRECATION_TABLE.include)).toEqual([
'| Fortinet integration | Deprecated | Deprecated | Deprecated |',
'| Aggregation API server | GA | Deprecated | Deprecated |',
'| Application layer policy based on Envoy | GA | Deprecated | Deprecated |',
'| Compliance reporting | Deprecated | Deprecated | Removed |',
'| L7 logging with Envoy | GA | Deprecated | Deprecated |',
]);
});

it('drops a feature that is only ever GA or in preview', () => {
const names = buildRows(features, 'calico', ['3.30', '3.31', '3.32'], DEPRECATION_TABLE.include).map(
(row) => row.name
);
expect(names).not.toContain('nftables data plane');
expect(names).not.toContain('Flow logs API and Whisker');
});

it('keeps a feature deprecated before the window and still deprecated in it', () => {
// Fortinet was deprecated in 3.18, before any window rendered today reaches.
expect(asMarkdown('calico-enterprise', ['3.19', '3.20', '3.21'], DEPRECATION_TABLE.include)).toContainEqual(
'| Fortinet integration | Deprecated | Deprecated | Deprecated |'
);
});
});
23 changes: 22 additions & 1 deletion src/components/FeatureStatusTable/__test__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react';

import TechPreviewTable from '../index';
import { DeprecatedFeaturesTable, TechPreviewTable } from '../index';
import type { Feature } from '../featureStatus';

const features: Feature[] = [
Expand Down Expand Up @@ -96,3 +96,24 @@ describe('<TechPreviewTable/>', () => {
expect(container).toBeEmptyDOMElement();
});
});

describe('<DeprecatedFeaturesTable/>', () => {
beforeEach(() => {
docsVersion.pluginId = 'calico';
docsVersion.version = '3.32';
});

it('selects on deprecated and removed rather than preview', () => {
render(<DeprecatedFeaturesTable />);

expect(columns()).toEqual(['Feature', '3.30', '3.31', '3.32']);
expect(rows()).toEqual([['FIPS mode', 'Deprecated', 'Deprecated', 'Deprecated']]);
});

it('shares the empty and legend behaviour of the preview table', () => {
docsVersion.version = '3.29';
const { container } = render(<DeprecatedFeaturesTable />);

expect(container).toBeEmptyDOMElement();
});
});
37 changes: 29 additions & 8 deletions src/components/FeatureStatusTable/featureStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,19 @@ function statusAt(changes: ReturnType<typeof statusChanges>, version: string): C
}

/**
* The rows of the technology preview table: every feature that was in preview at some
* The rows of one table: every feature that held one of the `include` statuses at some
* point in the window.
*
* Rows are ordered by the release a feature first appeared in, oldest first, so the
* table reads as the order features arrived. Features that arrived in the same release
* keep their data-file order, which is alphabetical by id.
*/
export function buildRows(features: Feature[], product: string, versions: string[]): FeatureRow[] {
export function buildRows(
features: Feature[],
product: string,
versions: string[],
include: readonly FeatureStatus[]
): FeatureRow[] {
const rows: (FeatureRow & { since: string; order: number })[] = [];

features.forEach((feature, order) => {
Expand All @@ -113,7 +118,7 @@ export function buildRows(features: Feature[], product: string, versions: string
if (!changes.length) return;

const cells = versions.map((version) => statusAt(changes, version));
if (!cells.includes('tech-preview')) return;
if (!include.some((status) => cells.includes(status))) return;

rows.push({ name: feature.name, cells, since: changes[0].version, order });
});
Expand All @@ -123,14 +128,30 @@ export function buildRows(features: Feature[], product: string, versions: string
.map(({ name, cells }) => ({ name, cells }));
}

export interface TableKind {
/** A feature appears as a row when it held one of these somewhere in the window. */
include: readonly FeatureStatus[];
/** The statuses the legend names, whether or not the table uses them. */
legend: readonly FeatureStatus[];
}

/**
* The statuses the technology preview legend names.
* What each table selects for, and what its legend names.
*
* Wider than the rows on purpose: GA is here because a preview feature graduating to GA
* is the outcome the table exists to track, so the reader needs it explained even in a
* release where nothing has got there yet.
* Each legend is wider than the rows it sits under, on purpose. The preview table names
* GA because a preview feature graduating is the outcome that table exists to track,
* and the deprecation table names Removed because removal is where a deprecation ends.
* A reader needs both explained in a release that has not got there yet.
*/
export const PREVIEW_LEGEND: readonly FeatureStatus[] = ['tech-preview', 'ga'];
export const PREVIEW_TABLE: TableKind = {
include: ['tech-preview'],
legend: ['tech-preview', 'ga'],
};

export const DEPRECATION_TABLE: TableKind = {
include: ['deprecated', 'removed'],
legend: ['ga', 'deprecated', 'removed'],
};

/**
* The legend sentence for a table.
Expand Down
Loading