mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Three fixes for https://github.com/ClickHouse/ClickHouse/pull/109746: - Run the job directly on the runner instead of in `clickhouse/docs-builder`. The generator only needs `python3` and the built `clickhouse` binary, and the pull-request management needs `gh`; all three are on the runner, which is where the other `enable_gh_auth` jobs already run. The docs-builder image has no `gh`, so the previous configuration would have failed at PR time (and at `gh auth` time). This avoids adding `gh` to a shared docs image. - Do not manage the `pr-autogenerated-docs` label from the workflow. The label is provisioned once in the repository as part of the rollout, so the workflow only attaches it and the repository stays the single source of truth for its color and description. - Reconcile the no-diff path. When regeneration produces no changes but a stale bot pull request is still open (the same regeneration was merged manually, or a later source change made the tree match master again), close it and delete its branch instead of leaving it advertising outdated changes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
53 lines
1.5 KiB
Python
53 lines
1.5 KiB
Python
from praktika import Job, Workflow
|
|
|
|
from ci.defs.defs import (
|
|
BASE_BRANCH,
|
|
DOCKERS,
|
|
SECRETS,
|
|
ArtifactConfigs,
|
|
ArtifactNames,
|
|
RunnerLabels,
|
|
)
|
|
from ci.defs.job_configs import JobConfigs
|
|
|
|
# Reuse the regular ARM binary build so the generator queries `system.documentation`
|
|
# from a fresh master binary.
|
|
arm_binary_build = next(
|
|
job for job in JobConfigs.build_jobs if ArtifactNames.CH_ARM_BINARY in job.provides
|
|
)
|
|
|
|
# Runs directly on the runner (no container), matching the other `enable_gh_auth`
|
|
# jobs: the generator only needs python3 and the built `clickhouse` binary, and
|
|
# the pull-request management needs `gh`, which the runner provides. `enable_gh_auth`
|
|
# supplies the GitHub App token used to push the branch and open the pull request.
|
|
# Requiring the artifact orders it after the build.
|
|
docs_autogen_job = Job.Config(
|
|
name="Docs autogenerate",
|
|
runs_on=RunnerLabels.FUNC_TESTER_ARM,
|
|
command="python3 ./ci/jobs/docs_autogen_nightly.py",
|
|
requires=[ArtifactNames.CH_ARM_BINARY],
|
|
enable_gh_auth=True,
|
|
)
|
|
|
|
workflow = Workflow.Config(
|
|
name="NightlyDocsAutogenerate",
|
|
event=Workflow.Event.SCHEDULE,
|
|
branches=[BASE_BRANCH],
|
|
jobs=[
|
|
arm_binary_build,
|
|
docs_autogen_job,
|
|
],
|
|
dockers=DOCKERS,
|
|
secrets=SECRETS,
|
|
artifacts=[
|
|
*ArtifactConfigs.clickhouse_binaries,
|
|
],
|
|
enable_report=True,
|
|
enable_cidb=False,
|
|
cron_schedules=["13 7 * * *"], # off-peak, distinct from the other nightlies
|
|
)
|
|
|
|
WORKFLOWS = [
|
|
workflow,
|
|
]
|