CI: move parity job from trial account to Flagsmith prod Snowflake with a scoped role
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the engine-parity CI job, its existing Snowflake configuration, and the repository's GH secrets. Provision FS_CI, the scoped role, service user, warehouse monitor, and key-pair authentication, then update the listed secrets and verify parity tests can create and remove their per-run tables without broader grants.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Flagsmith/flagsmith-sql-flag-engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Dependency Dashboard Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
Flagsmith/flagsmith-sql-flag-engine#3 · 1 comment ·
All issues in Flagsmith/flagsmith-sql-flag-engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100