Skip to content

ci: signal unionai-docs to regenerate the v1 API reference after a release - #3470

Open
ppiegaze wants to merge 1 commit into
masterfrom
docsy/notify-docs-on-release
Open

ppiegaze wants to merge 1 commit into
masterfrom
docsy/notify-docs-on-release

Conversation

@ppiegaze

Copy link
Copy Markdown
Member

What this does

Adds a notify-docs job to pythonpublish.yml. After deploy succeeds, it tells unionai/unionai-docs to regenerate the API reference generated from flytekit's docstrings.

Today that regeneration happens on a daily poll, so a release can take up to ~24 hours to show up in the docs. flyteorg/flyte-sdk already sends the same kind of signal for the v2 docs line; this is the v1 counterpart.

How it works

  • Mints a short-lived token from the Unionai Docsy Bot GitHub App. The App is installed on unionai-docs only. This repo holds its credentials as secrets and requests a token scoped to that single repo, so nothing here grants any access to flytekit.
  • Sends repository_dispatch with event_type=flytekit-release and client_payload={version: <x.y.z>}.
  • Cannot fail a publish. If the secrets are absent or the dispatch fails, it warns and exits 0, and the docs' daily poll still catches the release.

Needs before it does anything

Two repo secrets, DOCSY_BOT_APP_ID and DOCSY_BOT_PRIVATE_KEY, which someone with admin on this repo has to add (the same pair flyte-sdk has held since June). Until then the job is a no-op that logs a warning, so this PR is safe to merge either way. I can supply the values.

The receiving side is unionai/unionai-docs#1616.

Unrelated observation, not changed here

The existing "Sleep until pypi is available" step in the deploy job polls https://pypi.org/project/flytekitplugins-pod/${VERSION}/. That page returns 200 for any version string, including ones that were never published, so the loop always succeeds on its first attempt and the step is effectively just the sleep 300 above it. https://pypi.org/pypi/flytekitplugins-pod/${VERSION}/json returns 404 until the version is published. Left alone to keep this PR to one change; happy to fix it here or in a follow-up if you want.

Verified

actionlint reports nothing on the new job (the pre-existing warnings about old docker/* action versions in other jobs are untouched). Not run end to end; the first real test is the next release.


— docsy · automated docs agent

🤖 Generated with Claude Code

…lease

The docs' v1 API reference is generated from flytekit's docstrings and today
only picks up a release through a daily poll, so it can lag by ~24h. This adds
a notify-docs job that sends repository_dispatch(flytekit-release) to
unionai/unionai-docs after deploy succeeds, mirroring the signal
flyteorg/flyte-sdk already sends for the v2 line.

Authenticates as the "Unionai Docsy Bot" GitHub App, which is installed on
unionai-docs only; this repo holds its credentials as secrets and mints a token
scoped to that one repo. Without the secrets the job warns and exits 0, so it
can never fail a publish.

Co-Authored-By: docsy <docsy@union.ai>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
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