WIP: Release/mesh 3 - #7176
Open
fabianrbz wants to merge 53 commits into
Open
WIP: Release/mesh 3#7176fabianrbz wants to merge 53 commits into
fabianrbz wants to merge 53 commits into
Conversation
don't inherit pages from the kuma repo
…ause we" This reverts commit d973067248730acf5d68c48d3ff4ed7aa364c94d.
app/mesh/v2/sbom.md, upgrade.md, and validated-versions.md are evergreen but were still preseint in the v2 release map, so ReleaseMapLoader aborted every build with "No page found".
site.data.mesh_latest.version is the newest release across all majors, so every /mesh/v2/ page rendered 3.0.0 after the 3.0 cut. Replace it with a value scoped to the page's major: - how-tos use page.latest_release.version (2.14.3) - reference pages use page.release.version, set by ReferencePages::Versioner - app/mesh/sbom.md keeps site.data.mesh_latest.version, it is evergreen Both latest_version.html endpoints now declare content_type: reference so Versioner reaches them. They also need no_wrap, because content_type: reference triggers the section wrapper. Drops::Release gains #version for the patch number. MinVersion now sets latest_release before the min_version guard, because the major alone resolves it; two how-tos that render the kumactl prereq declare no min_version.
The v2 pages pulled includes from shared, unversioned paths, so a mesh 3 edit to any of them would silently change the version 2 snapshot. Move all 33 mesh includes to md/mesh/v2/, the layout the ai-gateway cut established (md/<product>/<segment>/). Every user of every moved file is a /v2/ page, so no evergreen page is affected. Drop the now-redundant product prefix from the basenames, e.g. faqs/mesh-zone-authentication -> md/mesh/v2/faqs/zone-authentication. Two includes also pointed at the evergreen installer. Both now use /mesh/v2/installer.sh, and deploy-zone-cp-universal moves from http to https. Left in place: prereqs/mesh.md, which has no users at all, and support/mesh.md, whose user is the evergreen support-policy page.
/mesh/policies/*/ are left alone. The generated policy pages have no v2 snapshot at all, which is recorded as a follow-up.
These need a description and title and update app/_headers so that it also handles /mesh/v2/latest_version gracefully
we start the server with ---skip-wait-port
The shared overview and reference address builders, and the mesh, AI Gateway and Event Gateway page classes, now take the policy so a later change can vary the address by policy major. AI Gateway and Event Gateway still ignore the argument; every generated address is unchanged.
The mesh policy generator now discovers a policy set at the top level of the mesh policy source folder plus one policy set per version subfolder, deriving the policy major from the folder name. Release resolution, addresses, breadcrumbs, the policy lookup table and the policy tag are all policy-major aware, and the version segment comes from the product data template rather than a hardcoded value. No policy has moved yet, so the live site output is unchanged.
All 22 mesh policies move into the v2 policy set, keeping their bodies, examples and version constraints untouched. A new major-2 hub page lists them, and the dropped external-services policy's old address redirects to its v2 address. The missing-redirects tool now strips the version subfolder when building a mesh policy address, and the generator seeds the current-major alias so the (now empty) current hub renders without error.
Each mesh* policy gets a frontmatter-only stub at the top level of app/_mesh_policies, carrying every field from its v2 source except min_version, which named a 2.x release and has no meaning inside major 3. external-services stays major-2-only, since 3.0 drops it. Mesh writers fill in prose and examples later; the generator and the current-major hub already render placeholders correctly once the frontmatter exists. A spec locks in that the examples redirect builder already skips a policy with no examples, so no line is emitted for these until they gain examples.
19 of the 22 major-2 policies link to other mesh pages with no version segment, so those links now resolve against major-3 content. Every /mesh/... link in the major-2 policy bodies, frontmatter related resources, and example files gains the v2 segment, so a major-2 reader stays in major 2.
Major-2 prose and how-to pages link to policy addresses with no version segment, so a major-2 reader following one of those links lands on major-3 policy documentation instead. Every /mesh/policies/... link, including the hub link and the legacy health-check alias, now carries the v2 segment and resolves inside the major-2 policy set.
Add a major-2 documentation index that mirrors the mesh index with every mesh address given the v2 segment, declares the policy major, and points canonically back at the mesh index. Reduce the mesh index to its title and description until major-3 pages land. Guard the index generator against a missing groups key so a sectionless index still renders.
Add one pending release-map entry per major-2 policy overview so the canonical-target pass covers policies too. Fix two latent bugs this exposed: ReleaseMapLoader (priority :high) raced with MeshPoliciesGenerator (also :high) for generator run order since Jekyll does not guarantee ordering among same-priority plugins, so lower ReleaseMapLoader to :normal. Also hardcode major_version frontmatter on each major-2 policy overview, matching every other major-2 mesh page, since the loader needs it to wire up the cross-major banner.
…ence in the release map Add pending release-map entries for every major-2 policy example page (58 total) and for external-services's reference page. Reference canonical targets for the 21 mesh*-named policies are deferred pending a decision on the redirect approach. Example pages stay pending since the current policy major has no examples/ content yet to point to.
ReleaseMap.load_all now skips YAML files for products outside KONG_PRODUCTS when the build is filtered (dev builds only, matching BuildFilter#filtered?), so a scoped dev build doesn't try to resolve release-map entries for pages that got filtered out of site.pages.
…rom v2 folder Read each v2 mesh policy's major from a hardcoded major_version frontmatter key instead of parsing it out of the v2 folder name, for consistency with how every other policy fact lives in frontmatter. The v2 folder stays for organization only; the generator still recurses into it, but no longer uses its name to compute the major.
Even though reference pages don't have a source file, the pages are generated with a dummy value set to its relative_path. Adding the entries in the app/_config/releases file will set the right canonical_url to them.
post_processor, both the links and the toc are generated correctly
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Snapshots current mesh docs into v2.
Leave just a placeholder
/mesh/ladning page.Policy pages - latest -
Includes for latest version should live in this folder under
v3- we don't have any yet, all the ones used in v2 pages live underv2.TODO:
canonical_urlto each of the entries and removestatus: pendingafter thecanonical_urlis set.NOTE:
If you want to run it locally, the recommend way is to comment these configs out:
- release_map_loader
and run it with
make clean && KONG_PRODUCTS=mesh make runFixes #issue
Preview Links
Checklist
descriptionentry in frontmatter.