CI: move parity job from trial account to Flagsmith prod Snowflake with a scoped role
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
调研方向
首先检查 engine-parity CI job、现有的 Snowflake 配置以及 repository 的 GH secrets。Provision FS_CI、范围受限的 role、service user、warehouse monitor 和密钥对身份验证,然后更新列出的 secrets,并验证 parity tests 是否能够在不授予更广泛 grants 的情况下创建和删除每次运行所使用的表。
由索引模型根据 Issue 内容生成。
描述
The engine-parity CI job currently runs against my personal Snowflake trial account under ACCOUNTADMIN. The current trial account is tied to a personal email and expires; production account with billing is the durable home.
What needs to happen
-
Provision a CI database + schema in the Flagsmith prod Snowflake account. Suggested layout: a dedicated
FS_CIdatabase, scratch schemaPUBLIC. The parity tests already create per-run transientIDENTITIES_PARITY_<uuid>/TRAITS_PARITY_<uuid>tables there and drop them on teardown, so concurrent runs don't collide. -
Create a least-privilege role for CI, e.g.
FS_SQL_ENGINE_CI_RW. Required grants:USE ROLE SECURITYADMIN; CREATE ROLE FS_SQL_ENGINE_CI_RW; USE ROLE SYSADMIN; GRANT USAGE ON DATABASE FS_CI TO ROLE FS_SQL_ENGINE_CI_RW; GRANT USAGE ON SCHEMA FS_CI.PUBLIC TO ROLE FS_SQL_ENGINE_CI_RW; GRANT CREATE TABLE ON SCHEMA FS_CI.PUBLIC TO ROLE FS_SQL_ENGINE_CI_RW; GRANT USAGE ON WAREHOUSE FS_CI_WH TO ROLE FS_SQL_ENGINE_CI_RW; GRANT ROLE FS_SQL_ENGINE_CI_RW TO USER <ci-user>; ALTER USER <ci-user> SET DEFAULT_ROLE = FS_SQL_ENGINE_CI_RW;No grants beyond that — the parity tests do
CREATE TRANSIENT TABLE,INSERT,SELECT,DROP TABLEand that's it. -
Provision a service user for CI (e.g.
flagsmith_sql_engine_ci) with key-pair auth. Generate the keypair, register the public key on the user, capture the private key for GH secrets. Disable password auth on the user. -
Add a resource monitor on
FS_CI_WHcapping monthly credit spend (suggest $5-10 / month — current usage is ~$0.05 per CI run, ~$2-5 / month at heavy PR volume). -
Update GH secrets in this repo:
SNOWFLAKE_ACCOUNT→ prod account locatorSNOWFLAKE_USER→flagsmith_sql_engine_ciSNOWFLAKE_ROLE→FS_SQL_ENGINE_CI_RWSNOWFLAKE_WAREHOUSE→FS_CI_WHSNOWFLAKE_DATABASE→FS_CISNOWFLAKE_SCHEMA→PUBLICSNOWFLAKE_PRIVATE_KEY→ contents of the new key file
- 主要语言
- Python
- 星标
- 1
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Flagsmith/flagsmith-sql-flag-engine 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
-
难度 4/5 3-5 天 新手友好度 15/100
-
难度 2/5 1-3 小时 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 48/100
-
难度 5/5 一周以上 新手友好度 45/100
Flagsmith/flagsmith-sql-flag-engine#3 · 1 条评论 ·
查看 Flagsmith/flagsmith-sql-flag-engine 的全部 Issue
相似的 Issue
-
triage/confirmed
难度 2/5 1-3 小时 新手友好度 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
难度 1/5 1 小时以内 新手友好度 92/100
NousResearch/hermes-agent#118866 ·
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
apache/cloudstack#14222 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug
难度 2/5 1-3 小时 新手友好度 82/100