CI: Add OpenAPI lint + S3 publish workflows#6401
Open
reakaleek wants to merge 7 commits into
Open
Conversation
Adds the push side of RFC elastic/docs-eng-team#634: a fork-safe PR lint check and a publish-on-merge workflow that upload the docs-final OpenAPI specs to S3 via the new elastic/docs-actions/openapi/{lint,upload} actions. Closes elastic/docs-eng-team#642. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Following you can find the validation changes against the target branch for the APIs. No changes detected. You can validate these APIs yourself by using the |
Lets the workflow run on this PR (which doesn't touch specification/**) so it can be verified end-to-end before the filter goes back on.
The openapi-pr lint check (elastic/docs-actions/openapi/lint) flagged this as an invalid uri-reference: a raw '#' isn't a legal fragment character, so the second one broke the URL.
Both openapi workflows ran the identical setup-node + make sequence; .github/actions/build-openapi-docs now owns it. Same job, no artifact round-trip.
Renames openapi-pr.yml to openapi-lint.yml and normalizes both workflows' name: fields to match their filenames, aligning with the convention used across the OpenAPI-to-S3 rollout (elastic/docs-eng-team#638). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
reakaleek
marked this pull request as ready for review
July 8, 2026 21:02
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.
What
Adds a fork-safe PR lint check (
openapi-pr.yml) and a publish-on-merge workflow (openapi-publish.yml) that build the docs-final OpenAPI specs and upload them to S3.Why
Rollout of RFC elastic/docs-eng-team#634 — replaces the hourly pull-based mirror (
open-api-mirror.ymlin docs-internal-workflows) with the producer repo pushing its own spec. Closes elastic/docs-eng-team#642.How
make setup→make generate→make transform-to-openapi-for-docs→make overlay-docs, producing the two*-docs-final.jsonfiles.openapi-pr.yml:pull_request, paths-filtered tospecification/**,docs/overlays/**,docs/linters/**,Makefile. No secrets — lints both specs withopenapi/lint.openapi-publish.yml:pushtomainand[0-9]+.[0-9]+. Lints, then uploads viaopenapi/upload(OIDC): stateful spec on every publishable branch, serverless spec onmainonly (always-latest).generate.yml/publish-release-artifacts.ymlare untouched.Blocked / not yet mergeable: actual S3 upload needs the bucket/OIDC roles from elastic/docs-infra (tracked in elastic/docs-eng-team#641). Draft until that lands.
Test plan
openapi/lint+openapi/uploadreleased underv1; SHA pins swapped to@v1openapi-prrun is green on this PR#), fixed in this PRmain, confirm both keys land ats3://elastic-docs-openapi-specs/elastic/elasticsearch-specification/main/elasticsearch{,-serverless}.json9.4) publishes the stateful spec onlyNotes
Labeled for backport to
9.4and8.19via this repo's label-driven backport bot. 7.17 was considered but dropped: its Makefile lacks the docs-final build targets (transform-to-openapi-for-docs,overlay-docs), so it cannot produce the spec.