Skip to content

feat: unify Serverless Tekton builds and devbuild routing - #5368

Merged
ti-chi-bot[bot] merged 11 commits into
mainfrom
feat/serverless-artifacts
Oct 21, 2026
Merged

ti-chi-bot[bot] merged 11 commits into
mainfrom
feat/serverless-artifacts

Conversation

@ti-chi-bot

@ti-chi-bot ti-chi-bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Add product-based Serverless build routes for five tidbcloud components in the active GCP environment. Retired prod2 routes are not restored. Each Devbuild platform event starts one run, uses the fixed source revision, retains event correlation, writes the dev GAR and is excluded from the generic fake-GitHub routes. Forks keep the product's artifact namespace; canonical legacy events remain supported.

Reuse the Linux package Pipeline with its existing pushed-binaries and pushed-images results unchanged. Shared execution changes are limited to optional runtime credentials for private dependencies, required-artifact checks, delivery opt-out and direct Git-version passthrough for Serverless. Builder selection and artifacts checkouts retain the existing main-branch behavior. No validation-only parameters or additional Task steps are introduced. Legacy delivery and artifact-check defaults remain unchanged.

Serverless uses git describe --tags --always --dirty directly, without classifying branches or computing pre versions. The shared versioning-strategy.ts, its tests, and the legacy Deno command and arguments remain unchanged.

Formal branch/tag routes, their activation tests and the cutover guide were integrated into this branch through the merged #5369. Definitions exist only at their deployed GCP paths, without staging copies. Each enabled branch still requires its source cutover, reachable Git baseline and native validation before activation on main. The formal template creates amd64/arm64 runs; environment distribution belongs to the controller.

Tests live in tekton/tests/ and use the existing Deno/TypeScript stack. There is no separate Go module under tools/. The pinned CEL interpreter evaluates actual YAML filters and overlays; CI runs these tests with the original versioning tests and a frozen dependency lockfile.

Validation:

  • Deno tests: 8 passed, 84 substeps, including five-product routing, forks, fixed revision, legacy exclusion, single/dual-platform template counts, unchanged Pipeline results, mounted credentials, and 19 local Git version cases. Formal whitelist and activation-reference tests, type checking and Deno lint passed. Kustomize builds passed for GCP triggers, templates, bindings, Pipelines and Tasks after syncing main and removing retired prod2 routes.
  • Content-policy checks passed after removing redundant build annotations from the new templates. Event correlation remains in tekton.dev/ce-context; existing API recovery tests passed using SHA/platform from PipelineRun params and the unchanged results.
  • Earlier raw Git versions generated binary/image scripts on both architectures for all five components; all 10 cases and ShellCheck passed. Kubernetes server dry-run accepted the reduced shared resources.
  • Earlier native/integration evidence covers the five components on both architectures, package checksums, image provenance and manifests. Those runs predate the interface/versioning refinements. The test migration did not trigger new native builds or distribution.

Build configuration: PingCAP-QE/artifacts#1118. API integration: PingCAP-QE/ee-apps#725. Runtime mappings: PingCAP-QE/ee-ops#2475. No remote baseline tags or business deployments are created by this PR.

@ti-chi-bot

ti-chi-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@wuhuizuo
wuhuizuo marked this pull request as ready for review October 20, 2026 11:43
@wuhuizuo

Copy link
Copy Markdown
Contributor

/approve

@ti-chi-bot

ti-chi-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wuhuizuo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Oct 20, 2026
Add and activate the Serverless formal GitHub push/tag routes in the GCP
EventListener kustomization. These definitions exist only at their
deployed paths under
`tekton/v1/triggers/triggers/env-gcp/tidbcloud/serverless/`; there are
no staging copies in the base PR
#5368.

Merge only after shared build resources are deployed, source cutover PRs
have merged, each enabled branch has a reachable Git baseline and native
build verification, and repository webhooks reach the listener. The
cutover guide lives beside the two route definitions. Retarget to main
after the base PR merges.

Explicit allowlists cover the current TiDB 8.5 primary and enumerated
maintenance lines, PD release-8.5-keyspace, Operator
serverless-on-release-1.4, Cassandra master and Qdrant-on-TiDB main,
plus semantic version tags. Each formal event creates exactly two Linux
runs and writes the formal serverless GAR. Replay baseline tag events if
they preceded activation. Future release lines require a reviewed
allowlist change.

Formal routing tests are included in this PR under `tekton/tests/` using
the existing Deno/TypeScript stack. They evaluate deployed YAML
filters/overlays, maintained and rejected branches, version tags,
out-of-scope repositories, formal registry bindings and kustomization
activation references.

Validation: 8 Deno tests passed with 84 substeps, including base
routing, Git/legacy version compatibility and Pipeline/Task contracts.
Type checking and Deno lint passed. Kustomization regeneration confirmed
both activation references; unrelated existing ordering noise was
excluded. The test/configuration cleanup does not change any Task,
Pipeline or version script.

[Earlier native/integration
evidence](https://github.com/PingCAP-QE/artifacts/blob/bf7c26d7acca6950d9e87ba1db6c797d67be0a49/packages/validation/serverless-20261020.json)
predates the interface/versioning refinements; no new native build or
destination sync was run for this follow-up. Formal artifact
verification and controller dev sync must pass before production source
activation.

Infrastructure PingCAP-QE/ee-infra#158 is
merged. Native regional Qdrant, TiKV/TiFlash, historical tags and
business deployments remain outside this activation.

---------

Co-authored-by: wuhuizuo <wuhuizuo@126.com>
@ti-chi-bot

ti-chi-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

I Skip it since the diff size(94386 bytes > 80000 bytes) is too large

@ti-chi-bot
ti-chi-bot Bot merged commit 4f74c6d into main Oct 21, 2026
7 checks passed
@ti-chi-bot
ti-chi-bot Bot deleted the feat/serverless-artifacts branch October 21, 2026 07:56
ti-chi-bot Bot pushed a commit that referenced this pull request Oct 22, 2026
Reuse the existing fake-GitHub push/PR/tag routes and single-platform
template for the five Serverless Devbuild products. Remove the three
dedicated routes, their duplicated template and the four kustomization
references.

Resolve the product once in a preceding CEL interceptor, then reuse it
for resources and fixed-revision checkout. Branch, arbitrary tag, PR and
direct SHA inputs retain their behavior, including forks and canonical
events without the new headers. Every expanded Linux platform event
creates one run, keeps event context and cannot enter the multi-platform
or Darwin routes.

Remove `deliver-artifacts` and `require-artifacts` from the Pipeline,
Tasks, templates and bindings. Delivery follows the existing
publisher/delivery rules. A component without binary or image
configuration keeps the existing successful skip with an empty result;
the Pipeline does not impose a product's expected artifact set. Real
build/publish failures retain their existing failure behavior. Pipeline
results and the version script remain unchanged.

Select credential workspace and Secret bindings in the shared template.
Existing products retain the original Mac workspace binding; private
Serverless builds bind Git credentials. This removes the product
whitelist from the binary Task and avoids the placeholder Secret. No
Task parameters, steps or results are added.

Validation:

- 10 Deno tests passed with 104 substeps, including five-product
routing, forks, fixed SHA/refspec, one run per platform, event context,
old-product multi-platform/Darwin behavior, legacy authentication,
versions and original empty-result skip behavior for both binary/image
Tasks. Type checking and lint passed.
- Kustomize builds passed for GCP triggers, templates, bindings, Tasks
and Pipelines. Repository content-policy checks passed.
- Server dry-run accepted 8 affected resource definitions and two
rendered PipelineRuns, verifying the private and legacy credential
workspace choices. No builds or deployments were triggered.
- The current artifacts main delivery configuration matches none of the
10 Serverless formal/dev image repositories (40 tag variants) or their
10 package repositories. The real image-command generator produced no
commands; a supported existing product generated commands as a positive
control. Distribution remains governed by those rules and the
controller's formal-source configuration.

API integration PingCAP-QE/ee-apps#725 also
allows image-only builds without requiring a separate binary package.
Follow-up to the merged #5368.

---------

Co-authored-by: wuhuizuo <wuhuizuo@126.com>
ti-chi-bot Bot pushed a commit to PingCAP-QE/ee-apps that referenced this pull request Oct 22, 2026
Add tidb-cse, pd-cse, tidb-operator-cse, cassandra-on-mysql and
qdrant-on-tidb to tibuild-v2's generated API and chatops-lark commands.
Product capability declarations restrict these products to Tekton, Linux
amd64/arm64 and the release/community profile. The runtime
product_repo_map enables the corresponding source mappings; existing
products retain their request validation and advertised capabilities.

Reuse main's unified Git ref resolution: resolve branch/tag/PR/SHA
before saving, persist the commit and reuse it for every platform and
rerun. Annotated tags resolve to their commit. Product and revision
extensions keep fork repository names separate from artifact namespaces.
The request version remains accepted, saved, forwarded and displayed as
request metadata, without changing Git-derived versions or tags.

Reconciliation uses a common completion rule for all products: every
requested platform must have a successful PipelineRun. It refreshes
pipeline and artifact reports even when the overall status is unchanged.
Available images, binaries and checksum addresses are collected through
existing results; missing artifacts or version metadata do not override
Tekton success. Existing printed-version results are still stored when
present. There are no extra TaskRun version queries, Pipeline/Task
result changes, notification-card changes, database migrations or new
reporting schema fields.

Validation:
- tibuild-v2: go test -short ./..., go build ./cmd/tibuild
./cmd/tibuild-cli and go vet ./... passed.
- chatops-lark: go test ./... and go build ./... passed.
- Regression coverage includes product constraints, branch/tag/PR/SHA
resolution, stable product/revision and compatibility version
forwarding, single/dual/all-platform completion for new and existing
products, duplicate runs, report refreshes, optional artifacts and
optional printed-version metadata. Notification code and templates match
main.

[Earlier native and staged integration
evidence](https://github.com/PingCAP-QE/artifacts/blob/bf7c26d7acca6950d9e87ba1db6c797d67be0a49/packages/validation/serverless-20261020.json)
predates this simplification. This update did not trigger native builds,
send Lark messages or deploy services; deployed-service integration
remains a rollout check.

CI resources: PingCAP-QE/ci#5368 and
PingCAP-QE/ci#5376. Runtime mappings and service
image pins: PingCAP-QE/ee-ops#2475. This PR does
not activate source publishers or environment distribution.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants