istio.io icon indicating copy to clipboard operation
istio.io copied to clipboard

Regenerate 1.24 and 1.25 archive with header

Open craigbox opened this issue 6 months ago • 11 comments

Applied #16457 to release-1.25 branch and regenerated archive.

This should result in all docs pages (in all languages) having a localised header.

I would prefer it didn't touch the other pages, but we have a minified CSS file with a name that has changed.

craigbox avatar May 28 '25 02:05 craigbox

  • https://deploy-preview-16529--preliminary-istio.netlify.app/v1.25/docs/ : no header
  • https://deploy-preview-16529--preliminary-istio.netlify.app/v1.25/docs/overview: no header

I built the archive with:

export SCRIPT_DIR=scripts
export PREV_MINOR=1.25
DRY_RUN=1 ISTIOIO_GIT_SOURCE=https://github.com/istio/istio.io.git "${SCRIPT_DIR}"/build_old_archive.sh "build-old-archive-${PREV_MINOR}.0"

1.25 was never marked as archived (compare 1.25 and 1.24.

This looks like something John did with a commit, rather than a PR, and will have to go into the new release process. /cc @dhawton

I'll build 1.24 in the meantime and send a PR to archive 1.25.

craigbox avatar May 28 '25 02:05 craigbox

  • https://deploy-preview-16529--preliminary-istio.netlify.app/v1.25/docs/ : no header
  • https://deploy-preview-16529--preliminary-istio.netlify.app/v1.25/docs/overview: no header

I built the archive with:

export SCRIPT_DIR=scripts
export PREV_MINOR=1.25
DRY_RUN=1 ISTIOIO_GIT_SOURCE=https://github.com/istio/istio.io.git "${SCRIPT_DIR}"/build_old_archive.sh "build-old-archive-${PREV_MINOR}.0"

1.25 was never marked as archived (compare 1.25 and 1.24.

This looks like something John did with a commit, rather than a PR, and will have to go into the new release process. /cc @dhawton

I'll build 1.24 in the meantime and send a PR to archive 1.25.

Right, that was one of the reasons for the PR/rework of the script I did. The old process required an admin to run the script which did the commits directly to release branches and the master branch, which was always risky. With the new flow, the script should allow it to be standardized and done in a more repeatable manner by any docs maintainer.

dhawton avatar May 28 '25 11:05 dhawton

https://deploy-preview-16529--preliminary-istio.netlify.app/v1.24/docs/ 🎉

craigbox avatar May 29 '25 04:05 craigbox

https://deploy-preview-16529--preliminary-istio.netlify.app/v1.24/docs/ 🎉

When I click on the "read latest", it says page requested cannot be found.

kfaseela avatar May 29 '25 05:05 kfaseela

https://deploy-preview-16529--preliminary-istio.netlify.app/v1.24/docs/ 🎉

When I click on the "read latest", it says page requested cannot be found.

I see the same.. looks like the read latest link retains the /v1.24 path prefix and just appends /latest/docs.

dhawton avatar May 29 '25 08:05 dhawton

Hmm, it wasn't supposed to do that.
/cc @sbegin0

craigbox avatar May 29 '25 08:05 craigbox

OK, here's the deal.

  • build_old_archive.sh calls make archive which is archive_version.sh (run in the build container)
  • that calls build_site.sh /"${VERSION}"
  • that runs Hugo with --baseURL "$1"

The link we add is "/latest{{ .RelPermalink | safeURL }}"

Thus any link added to this page is going to be relative to /v1.24/.

Workarounds:

  • We could change the URL to start https://istio.io/latest/, which will almost certainly break another linter
    • edit: I think the linter is only going to check .md content; we use URLs in things like the language selector in the footer and they are OK
  • maybe //latest/ would work?
    • edit: testing this first
  • We could special-case /vX.XX/latest/ URLs in the netlify handler
  • ...something else?

craigbox avatar May 29 '25 09:05 craigbox

Trying //latest on the v1.25 archive to see what that makes the browser do

craigbox avatar May 29 '25 09:05 craigbox

it makes it do https://latest/docs/ 🤦

OK, next best bet is to make it redirect to preliminary.istio.io/latest/ if it's on prelim and istio.io/latest/ if it's on live, but those are thoughts for tomorrow

craigbox avatar May 29 '25 09:05 craigbox

(Status update: this is waiting on the baseURL work that Ajay is doing at present.)

craigbox avatar Jun 12 '25 00:06 craigbox

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

istio-testing avatar Nov 05 '25 10:11 istio-testing