Skip to content

ci: reuse verified PostgreSQL rustls SQLx CLI binaries - #1435

Merged
proerror77 merged 3 commits into
mainfrom
codex/ci-sqlx-cli-20261016
Oct 16, 2026
Merged

proerror77 merged 3 commits into
mainfrom
codex/ci-sqlx-cli-20261016

Conversation

@proerror77

@proerror77 proerror77 commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Change

SQLx CLI 在 control-plane、market-data、research-heavy 三条 CI 路径重复编译。统一复用独立的 0.8.6 --locked --no-default-features --features rustls,postgres 预编译缓存;应用锁文件变化不再使工具缓存失效。缓存保存两个 CLI 和校验凭据,验证实际 Cargo feature 记录、编译环境、版本和二进制摘要。

Quickinstall 的现成包只支持默认 features,SQLx 默认配置包含 native-tls/MySQL/SQLite。为保持原 PostgreSQL/rustls 配方,本次缓存由现有编译命令生成,不引入第三方不同特性的二进制。Quickinstall 限制

精确工具缓存 -> 恢复并校验 / 首次构建 -> 原 PostgreSQL 迁移和合同测试

正式缓存只由 main 可信触发保存;显式分支诊断使用独立的 source-SHA 键。SQLx 诊断有独立并发组和 SQLx CLI diagnostic gate,不能替代发布门禁。三个消费者的数据库测试及失败传播保留,并在运行前核对 CLI 版本。

Issue relationship

None

Validation

先验证后接入:工具、composite action 和 PostgreSQL/TLS 验证脚本在接入消费者时未修改。

  • 验证源 b7bb8ecc5db9788a5eb1f7766dfef397a2f1641f:冷运行 38837191585、热运行 38837676499 均 completed/success。
  • 冷运行原编译 66 秒,首次缓存准备 64 秒;热运行同次新编译 45 秒,缓存恢复/校验全步骤 2 秒,净省 43 秒。真实 cache_hit=true,SQLx SHA-256 相同:d8266f138b863f8402b68b654825c5cb296711161f19c1cc1dc535e0bd5bbcb4。
  • 两组各 14 项真实 PostgreSQL 15 检查通过:明文与可信 TLS、连接加密状态、幂等迁移和回滚、错误 CA/主机名、无 TLS 服务上的 require 拒绝、SQLite 未启用、完整仓库迁移。新编译和预编译版本的迁移校验和、规范化 schema 完全一致。
  • 本地缓存 profile/破损拒绝合同、完整 selector 合同、诊断门禁隔离合同、shellcheck、actionlint、diff-check 全部通过。诊断合同同时验证两种 probe 的独立名称、并发组、冲突参数拒绝,以及诊断成功不能满足发布门禁;所选 SQLx 任务缺失、跳过、失败或取消均拒绝。
  • 当前 head c2b741a8a412baa6c7da745de5aa7ed2f27c4bf3:Monorepo CI 38839125467、Prediction CI 38839125581、Security 38839125660 均 completed/success。三条数据库消费者及当前 head 的 PostgreSQL/TLS 等价性 job 全部通过。
  • 评审指出的旧研究诊断精确断言已由当前提交扩展为双诊断边界合同,并经上述 CI 验证。合并前核对 current main 兼容性和评审讨论。
  • 已合并为 a9480969afbbae4c46685203045503c8dc405a09。正常 main CI 38839770665 全部成功,三条数据库消费者和等价性任务均通过。main 三项保护门禁也均 completed/success。
  • 正式缓存 ID 9027623181、ref=refs/heads/main、key=sqlx-cli-v1-trusted-d2971c900e91f577c946bb28bde81638efe8634580b19db3f6f3f2d50d338f34 已读回。
  • 独立 main 热运行 38840295851 在同一合并源码上 completed/success;真实恢复上述正式键、cache_hit=true,二进制 SHA-256 与前述冷/热样本一致。其新编译基线 69 秒,完整缓存准备日志跨度 0.604 秒(API 的秒级记录为 0 秒)。14 项检查及 schema、迁移校验和均与前述样本一致。
  • 收益外推采用较慢的已观察热准备 2 秒;只覆盖历史单列计时的 57 次安装,不把未计量的另外两处收益或整体流水线变化算入该数字。实际对照不等于长期日均净收益。
  • 任务诊断缓存已清理,main 正式缓存保留。
  • 历史独立计时的 SQLx 安装共 57 次/周、2,669 秒;若热准备为 2 秒,按这一口径外推约 6.1 runner 分钟/天。另两处原安装嵌在大步骤中,未将未计量收益加入估算。该数字不是长期日均实测。

Runtime impact and rollback

只改变 CI 工具准备和验证入口。数据库/TLS 验证使用 GitHub runner 内的临时 PostgreSQL 容器,退出时清理;没有本地或生产数据库操作。还原本 PR 可恢复原安装方式。合并可能触发现有自动发布,发布不代表部署。

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 36166dd3-dcb5-4f9f-8bcb-d7a9e2f97ad4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T02:13:58.626539Z c2b741a New commits
🔒 Security Review ✅ Completed 2026-10-16T02:17:50.236382Z c2b741a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b8dde79b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ploy-ci.yml
@proerror77
proerror77 merged commit a948096 into main Oct 16, 2026
57 checks passed
@proerror77
proerror77 deleted the codex/ci-sqlx-cli-20261016 branch October 16, 2026 02:18
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.

1 participant