cockroachdb / docs

CockroachDB user documentation
https://cockroachlabs.com/docs
Creative Commons Attribution 4.0 International
190 stars 460 forks source link

Remove tarballs & Docker links for v20.2 and below #19036

Closed rmloveland closed 1 week ago

rmloveland commented 1 month ago

Fixes DOC-11092

Summary of changes:

How it works:

When a specific release (or an entire major version's releases) should be made no longer available for download, add the following k-v pair to the YAML block for that release:

is_not_downloadable: true

There is now logic in the Liquid templates that build the main releases page that checks for this YAML key being set to true. If it is set to true, the releases page will no longer display links to:

Instead, the table cells where such artifacts used to appear will now display the message:

No longer available for download.
github-actions[bot] commented 1 month ago

Files changed:

netlify[bot] commented 1 month ago

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
Latest commit 3cf34f377f4fb8ec3c8ff49fbdfb9747dc79ed5a
Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/6737a9df46e35c00089f1370
netlify[bot] commented 1 month ago

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
Latest commit 3cf34f377f4fb8ec3c8ff49fbdfb9747dc79ed5a
Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/6737a9df64505000081d3837
netlify[bot] commented 1 month ago

Netlify Preview

Name Link
Latest commit 3cf34f377f4fb8ec3c8ff49fbdfb9747dc79ed5a
Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/6737a9dfe7d44200085e44bb
Deploy Preview https://deploy-preview-19036--cockroachdb-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

rmloveland commented 1 month ago

@mdlinville maybe this is also an offline convo but wanted to show you what i have so far to get your feedback from a tools POV

in fact let me DM you to set up some time to walk through this PR maybe

rmloveland commented 3 weeks ago

@jlinder and @celiala i believe this PR implements the "remove binaries, tarballs, and Docker links for <= v20.1" as we discussed in our meeting

See the PR summary for details of how this is accomplished by adding a new variable to each block of the releases.yml file

the rest of the edits beyond the Liquid templates and the YAML file are removing links from old release pages

probably a good place to start verifying the expected behavior is the rendered previews linked from the description

rmloveland commented 3 weeks ago

cc @jaiayu FYI just so you know this is in progress

rmloveland commented 3 weeks ago

The approach LGTM. Maybe I am missing it but I can't see the logic where you are using the new field from the YAML.

Yayyyy thanks for the review Matt!!!!

the logic is here (and also in several other places but they're all the same basic Liquid code):

https://github.com/cockroachdb/docs/pull/19036/files#diff-36b3d19ca22faa226c8c9d2c83670eaaa78cc25f1d68a53b890ec01f97f87c41R430-R432

it basically adds another case to the existing if-else blocks below the "is this a cloud-only release" check with another check that is basically "is this release no longer downloadable"

rmloveland commented 2 weeks ago

@jlinder just updated to remove v20.2 as well, sorry about the confusion on my end, classic off-by-one error i guess

PTAL!

rmloveland commented 1 week ago

A question: I see the releases.yml file now has the 20.2 releases noted correctly. Do the 20.2 includes files also need to be updated?

thanks for catching this oversight - latest commit Update with jlinder feedback (2) updates all of the v20.2 include files to remove the download links, PTAL