Skip to content

feat: add lint check for API key scope enum completeness#19862

Merged
ThomasK33 merged 1 commit into
mainfrom
thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes
Sep 24, 2025
Merged

feat: add lint check for API key scope enum completeness#19862
ThomasK33 merged 1 commit into
mainfrom
thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes

Conversation

@ThomasK33
Copy link
Copy Markdown
Member

@ThomasK33 ThomasK33 commented Sep 17, 2025

Added a script/linter to ensure all policy.RBACPermissions entries are part of the api_key_scope enumerated in the coderd/database/dump.sql file.

Fixes #19846

@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch from 2ba5550 to e548168 Compare September 17, 2025 17:50
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from ab95a1f to 9bc8879 Compare September 17, 2025 17:51
@ThomasK33 ThomasK33 changed the title feat: API key scopes database migration feat: implement API key scopes database enum linter Sep 17, 2025
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from 9bc8879 to 4afb40e Compare September 17, 2025 17:54
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch 2 times, most recently from 1760157 to 7a7e6ad Compare September 17, 2025 19:49
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from 4afb40e to 1ae7af6 Compare September 17, 2025 21:34
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch from 7a7e6ad to 1aba733 Compare September 18, 2025 10:37
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch 2 times, most recently from 0ccc74c to c00de78 Compare September 18, 2025 11:13
@ThomasK33 ThomasK33 linked an issue Sep 18, 2025 that may be closed by this pull request
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch from 1aba733 to 99b5b53 Compare September 18, 2025 11:26
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from c00de78 to 9b40119 Compare September 18, 2025 11:26
@ThomasK33 ThomasK33 marked this pull request as ready for review September 18, 2025 13:21
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from 9b40119 to dbe6a63 Compare September 18, 2025 13:37
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch 2 times, most recently from db8b42e to 32e7137 Compare September 18, 2025 17:01
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from dbe6a63 to 4e8a5c3 Compare September 18, 2025 17:01
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch from 32e7137 to 682511c Compare September 18, 2025 17:14
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from 4e8a5c3 to d6334f6 Compare September 18, 2025 17:15
@ThomasK33 ThomasK33 marked this pull request as draft September 18, 2025 17:19
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch from 682511c to 0fd28db Compare September 18, 2025 20:10
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch from 391fa21 to 5b28178 Compare September 19, 2025 18:50
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from 1d5d9f1 to ce47b02 Compare September 19, 2025 18:50
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch from 5b28178 to ec2d8fb Compare September 22, 2025 13:47
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from ce47b02 to 37f92fe Compare September 22, 2025 13:47
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from 37f92fe to 9c60b1f Compare September 22, 2025 15:28
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch from ec2d8fb to 782f1c7 Compare September 22, 2025 15:28
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from 9c60b1f to 2666417 Compare September 22, 2025 16:33
@ThomasK33 ThomasK33 force-pushed the thomask33/19845-database-migrations-scopes-array-typed-allow-list branch 3 times, most recently from 81b483f to b27f312 Compare September 22, 2025 17:03
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from 2666417 to 5dd94bb Compare September 22, 2025 17:03
@ThomasK33 ThomasK33 changed the base branch from thomask33/19845-database-migrations-scopes-array-typed-allow-list to graphite-base/19862 September 22, 2025 17:26
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch from 5dd94bb to 3a1adbe Compare September 22, 2025 17:27
@graphite-app graphite-app Bot changed the base branch from graphite-base/19862 to main September 22, 2025 17:27
@ThomasK33 ThomasK33 force-pushed the thomask33/19846-build-time-check-db-enum-contains-all-rbac-scopes branch 6 times, most recently from e0432eb to b4b6ef1 Compare September 24, 2025 08:58
Copy link
Copy Markdown
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

Sweet!

@ThomasK33 ThomasK33 merged commit acc0890 into main Sep 24, 2025
28 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build-time check: DB enum contains all RBAC scopes

2 participants