Skip to content

TT-17973: Render the public retired-versions table from the plan - #546

Merged
olamilekan000 merged 1 commit into
masterfrom
TT-17973-retired-versions-snippet
Sep 4, 2026
Merged

TT-17973: Render the public retired-versions table from the plan#546
olamilekan000 merged 1 commit into
masterfrom
TT-17973-retired-versions-snippet

Conversation

@olamilekan000

@olamilekan000 olamilekan000 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

Adds gromit pkgs retirement, which renders the retired-versions table published on the tyk.io retention policy page from a committed retention plan, and extends the Retention plan notice workflow to PR the updated snippet to tyk-docs whenever the table changes (no changes → no PR).

The table is rendered from the committed plan.json — which already carries the derived cutoff per repo — rather than recomputed, so the published table can never disagree with what pruning will enforce. Only track-driven repos appear, since their windows are what the public policy describes. The hand-written first draft of the table showed why this matters: it said 5.8.x where the derived cutoff is actually 5.5.x (the EE window retains three released series below the previous LTS).

Jira Ticket: TT-17973

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Chore / documentation / template sync

Verification & Testing

  • I have run local unit tests (go test ./pkgs/... ./cmd/...) and they passed.
  • I have generated policy outputs locally (go run . policy gen) and verified the rendered files. (n/a — no template changes)
  • I have verified the changes in target downstream repositories (e.g. tyk, tyk-analytics). (ran the command against the committed September plan; its output is byte-identical to the snippet on the tyk-docs retention page branch, so the first automated sync is a no-op)

Command(s) used for testing:

go test ./pkgs/ ./cmd/
go run . pkgs retirement --plan plan.json  # against the committed 2026-09 plan

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@olamilekan000
olamilekan000 requested a review from a team as a code owner September 2, 2026 16:19
@olamilekan000
olamilekan000 force-pushed the TT-17973-retired-versions-snippet branch from 2748fb1 to 484d35f Compare September 2, 2026 16:23
@olamilekan000 olamilekan000 changed the title [TT-17973] Render the public retired-versions table from the plan TT-17973: Render the public retired-versions table from the plan Sep 2, 2026
@olamilekan000
olamilekan000 force-pushed the TT-17973-retired-versions-snippet branch 2 times, most recently from 00327ab to 6bad499 Compare September 2, 2026 16:27
Comment thread pkgs/retire.go Outdated
"golang.org/x/mod/semver"
)

var productNames = map[string]string{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this list should be in the config file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it needs a config file. These are just more constants. and besides, gromit doesn't have a config file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure it does not have a config file?
https://github.com/TykTechnologies/gromit/blob/master/config/config.yaml

I still believe hard-coding is something we should avoid.

Comment thread pkgs/retire.go Outdated
"golang.org/x/mod/semver"
)

var productNames = map[string]string{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure it does not have a config file?
https://github.com/TykTechnologies/gromit/blob/master/config/config.yaml

I still believe hard-coding is something we should avoid.

The pkgs retirement subcommand turns the committed retention plan into
the retired-versions snippet published on tyk.io, and the retention
plan workflow PRs it to tyk-docs whenever the table changes. Rendering
from the plan rather than recomputing guarantees the published table
matches what pruning will enforce.

The hand-written first draft of the table proved the point: it said
5.8.x where the derived cutoff is actually 5.5.x, because the EE
window keeps three released series below the previous LTS.
@olamilekan000
olamilekan000 force-pushed the TT-17973-retired-versions-snippet branch from 6bad499 to c40bf26 Compare September 3, 2026 09:38
@olamilekan000
olamilekan000 enabled auto-merge (squash) September 3, 2026 11:27
@olamilekan000
olamilekan000 enabled auto-merge (squash) September 4, 2026 10:38
@olamilekan000
olamilekan000 merged commit abcb6f3 into master Sep 4, 2026
14 of 15 checks passed
@olamilekan000
olamilekan000 deleted the TT-17973-retired-versions-snippet branch September 4, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants