Skip to content

CI: sync with latest praktika - #110081

Merged
maxknv merged 47 commits into
masterfrom
ci_check_no_gh_actions
Aug 31, 2026
Merged

maxknv merged 47 commits into
masterfrom
ci_check_no_gh_actions

Conversation

@maxknv

@maxknv maxknv commented Jul 11, 2026 •

Copy link
Copy Markdown
Member

sync latest praktika updates that adds standalone CI engine as gh actions alternative

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Workflow [PR]
Sync PR [sync-upstream/pr/110081]

Version info

  • Merged into: 26.9.1.417 (included in 26.9 and later)

@maxknv
maxknv marked this pull request as draft July 11, 2026 08:32
@maxknv
maxknv force-pushed the ci_check_no_gh_actions branch 10 times, most recently from aa1321e to e85988f Compare July 11, 2026 20:51
@clickhouse-gh

clickhouse-gh Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [0af19b90]

Summary: ✅


AI Review

Summary

This PR syncs a large Praktika update into ClickHouse CI: native orchestrator and webhook Lambda support, GitHub auth/token-minter plumbing, AI review helpers, and regenerated workflow definitions. Several earlier regressions were fixed, but the current tree still has multiple CI-correctness and compatibility problems, including two still-open lambda_gh_trigger TODOs and several silently resolved findings that remain reproducible in the checked-in code.

Findings

❌ Blockers

  • [ci/praktika/infrastructure/native/lambda_gh_trigger.py:987-1003] pull_request.synchronize events are still applied purely by Lambda receive time. A delayed older payload for head A can write a newer cancel-before marker after newer head B is already running, so sweep_cancel can kill the real current workflow; on external PRs the same stale event also overwrites the saved approval state back to A. The code still carries this as a TODO instead of a guard. Suggested fix: refetch the PR before _cancel_runs_before / _handle_external_pr and drop the event unless pull_request.head.sha still matches workflow["head_sha"].
  • [ci/praktika/gh_auth.py:197-247, ci/praktika/validator.py:188-192, ci/praktika/settings.py:90] [dismissed by author -- https://github.com/ClickHouse/ClickHouse/pull/110081#discussion_r3867373349] The PR silently removed the SECRET_GH_APP GitHub App path from GHAuth, but validation and settings still treat that secret as a supported no-lambda configuration. A workflow with enable_report and gh-app configured still passes validation, but runtime token minting now either raises GH_AUTH_LAMBDA_NAME is not configured (get_installation_token) or becomes a no-op that assumes an ambient gh login. That is a backward-incompatible config break, not just cleanup. Suggested fix: either restore the secret-based auth path, or remove the SECRET_GH_APP contract consistently and make validation/docs reject it.

⚠️ Majors

  • [ci/praktika/infrastructure/native/lambda_gh_trigger.py:229-271, ci/praktika/infrastructure/native/lambda_gh_trigger.py:917-949] Internal PR reruns still reconstruct labels=[], title="", and draft=False, then enqueue that synthetic workflow on the internal path. The file's own TODO is accurate: label-gated filters (do-not-test, ci-*, bugfix validation) can therefore schedule a different DAG from the live PR state. Suggested fix: refetch the PR by number on rerun, or persist full PR metadata for all PRs before re-enqueueing.
  • [ci/praktika/native_jobs.py:473-481, ci/praktika/native_jobs.py:514-539, ci/praktika/orchestrator/job_runner.py:293] [dismissed by author -- https://github.com/ClickHouse/ClickHouse/pull/110081#discussion_r3882770796] Local-mode runs still call GHAuth.auth(workflow, force=True) before the PRAKTIKA_LOCAL_RUN skip. With this repo's default GH_AUTH_LAMBDA_NAME, praktika orchestrate on a developer machine fails in Config Workflow before it reaches the later "skip GH status/comment posting" branch. Suggested fix: short-circuit GH auth in local mode, or make the call non-strict before the local-only skip.
  • [ci/praktika/native_jobs.py:247-299, ci/praktika/runner.py:404-425] [dismissed by author -- https://github.com/ClickHouse/ClickHouse/pull/110081#discussion_r3879123621] Config Workflow now turns any submodule-cache miss/upload error into FAIL, but runner-side restore still treats a missing or failed cache as advisory and clones submodules from GitHub. That means a transient S3/archive problem now reddens the whole workflow before the existing fallback path can run. Suggested fix: keep cache creation non-blocking, or remove the downstream fallback consistently.
  • [.github/workflows/pull_request.yml:5534-5536, ci/praktika/yaml_generator.py:241-248, ci/defs/job_configs.py:470-487] [dismissed by author -- https://github.com/ClickHouse/ClickHouse/pull/110081#discussion_r3873443008] Build profile diff is still generated with the default !contains(needs.*.outputs.pipeline_status, 'failure') gate and no run_on_upstream_failure equivalent. On a red head the job is skipped, so it cannot overwrite a stale build-profile-diff PR comment from an older commit. Suggested fix: restore TEMPLATE_IF_EXPRESSION_UPSTREAM_FAILURE_OK for this job.
  • [ci/praktika/gh.py:1240-1246, ci/praktika/ai_review.py:540-543, ci/praktika/utils.py:178-195] [dismissed by author -- https://github.com/ClickHouse/ClickHouse/pull/110081#discussion_r3867373354] The AI review path still trusts GH.get_pr_diff() even though Shell.get_output() returns an empty string on any non-zero exit. On this PR specifically, gh pr diff 110081 --repo ClickHouse/ClickHouse already fails with HTTP 406 because the diff exceeds GitHub's 20,000-line limit, so the reviewer can still inspect nothing and post a false-green summary. Suggested fix: fail closed on empty diff, or switch the review input to paginated pulls/{pr}/files.
Final Verdict

Not ready to merge. The current tree still has unresolved event-ordering and rerun-correctness issues in the native webhook path, plus dismissed-but-still-real regressions in GitHub auth, local execution, submodule caching, workflow comment maintenance, and AI review fail-closed behavior.

LLVM Coverage Report

⚠️ No coverage measurement for commit 0af19b90: no coverable C/C++ source files changed (contrib/ is excluded from coverage).

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jul 11, 2026
@maxknv
maxknv force-pushed the ci_check_no_gh_actions branch from e85988f to 7be1f98 Compare July 11, 2026 21:06
@maxknv maxknv changed the title [WIP] test webhook [WIP] test without GH Actions Jul 11, 2026
@maxknv
maxknv force-pushed the ci_check_no_gh_actions branch 7 times, most recently from e7dd845 to c958bc7 Compare July 12, 2026 20:39
@maxknv
maxknv force-pushed the ci_check_no_gh_actions branch from c958bc7 to 8a592e6 Compare July 13, 2026 09:07
@maxknv
maxknv force-pushed the ci_check_no_gh_actions branch from 930b69a to 0ee0bbc Compare July 13, 2026 10:09
@maxknv
maxknv force-pushed the ci_check_no_gh_actions branch from d9a9aa5 to 4335d64 Compare July 13, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants