Skip to content

Trigger documentation site rebuild after function release#1276

Merged
liamfallon merged 1 commit into
kptdev:mainfrom
Nordix:trigger-docs-rebuild-on-release
Jul 9, 2026
Merged

Trigger documentation site rebuild after function release#1276
liamfallon merged 1 commit into
kptdev:mainfrom
Nordix:trigger-docs-rebuild-on-release

Conversation

@aravindtga

Copy link
Copy Markdown
Contributor

Description

  • What changed: Added a step to the after-tag-with-version.yaml workflow that triggers a Netlify documentation site rebuild after every function release tag push.
  • Why it's needed: The homepage function catalog table fetches release versions from the GitHub API via Hugo's resources.GetRemote at build time. Since releases are created manually (via tag push), there was no mechanism to trigger a docs rebuild then the cached data remained stale indefinitely.
  • How it works: After the image push and release notes steps complete, the workflow POSTs to a Netlify build hook with {"clear_cache": true}, which triggers a fresh build with no cached remote resources.

Why triggering per tag is safe

The after-tag-with-version.yaml workflow runs independently for each tag push. When using manual-patch-release with functions: "all", multiple tags are created in quick succession each triggering a separate Netlify build hook call.
This is handled gracefully by Netlify's context queue: when multiple builds are triggered on the same site in an identical deploy context, they enter a context queue.
When the current build completes, only the newest enqueued build runs and all intermediate ones are skipped. So even if 10+ tags fire simultaneously, at most 2 actual builds occur (the one in progress + the latest queued). No wasted build minutes, no race conditions.

Related Issue(s)

  • N/A

Type of Change

  • Bug fix
  • New feature
  • Enhancement
  • Refactor
  • Documentation
  • Tests
  • Other: ________

Checklist

  • Code follows project style guidelines
  • Self-reviewed changes
  • Tests added/updated
  • Documentation added/updated
  • All tests and gating checks pass

AI Disclosure

  • I have used AI in the creation of this PR.

If so, please describe how:
- Kiro used for this PR message and analysis

@aravindtga aravindtga self-assigned this Jul 9, 2026
@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for krm-function-catalog canceled.

Name Link
🔨 Latest commit 6a981d5
🔍 Latest deploy log https://app.netlify.com/projects/krm-function-catalog/deploys/6a4f6d49ba72e80008f5d31c

Copilot AI left a comment

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.

Pull request overview

This PR updates the release-tag GitHub Actions workflow to trigger a Netlify documentation site rebuild after a function release tag is pushed, ensuring the docs site refreshes cached GitHub API data used to render the function catalog.

Changes:

  • Adds a post-release workflow step that POSTs to a Netlify build hook to force a rebuild with cleared cache.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/after-tag-with-version.yaml Outdated
@aravindtga aravindtga force-pushed the trigger-docs-rebuild-on-release branch from 3e4875f to f51f004 Compare July 9, 2026 09:10
@aravindtga aravindtga requested a review from Copilot July 9, 2026 09:11

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/after-tag-with-version.yaml
@aravindtga aravindtga force-pushed the trigger-docs-rebuild-on-release branch from f51f004 to a5a6e90 Compare July 9, 2026 09:37
@aravindtga aravindtga requested a review from Copilot July 9, 2026 09:38

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/after-tag-with-version.yaml
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@aravindtga aravindtga force-pushed the trigger-docs-rebuild-on-release branch from a5a6e90 to 6a981d5 Compare July 9, 2026 09:43
@aravindtga aravindtga marked this pull request as ready for review July 9, 2026 10:21
@aravindtga aravindtga requested review from a team July 9, 2026 10:21
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 9, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 9, 2026
@aravindtga aravindtga requested a review from a team July 9, 2026 10:24

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.

This is very nice. i wonder if we could also leverage something like this but for the porch documentation site so that the install version we give e.g. install version tag could be auto updated on every new release we make in the docs also as right now we have to manually update it and speaking of which we should propably do so considering it states to install 1.5.7 right now... porch install

@aravindtga

aravindtga commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

This is very nice. i wonder if we could also leverage something like this but for the porch documentation site so that the install version we give e.g. install version tag could be auto updated on every new release we make in the docs also as right now we have to manually update it and speaking of which we should propably do so considering it states to install 1.5.7 right now... porch install

Yes, this is feasible. we already have the building blocks in place across repositories. In kpt, we resolve the latest version from git tags https://github.com/kptdev/kpt/blob/main/documentation/Makefile#L19, and we can adapt the porch docs to follow the same pattern.
We'd then use the same Netlify build hook approach from this PR to trigger documentation rebuilds on each release. Note that porch has both Porch API and porch Server/controller releases, so the trigger logic would need to account for both.

@liamfallon liamfallon merged commit 6cf8fda into kptdev:main Jul 9, 2026
13 checks passed
@efiacor efiacor deleted the trigger-docs-rebuild-on-release branch July 9, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants