-
Notifications
You must be signed in to change notification settings - Fork 280
feat(dashboard api): user/team provisioning handlers #2335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ben-fornefeld
merged 111 commits into
main
from
feature/dashboard-api-user-team-management
Apr 15, 2026
Merged
Changes from 99 commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
c50d248
feat: supabase auth users sync background runner in dashboard api
ben-fornefeld 68a6265
chore: auto-commit generated changes
github-actions[bot] 9d8fe63
feat(db): enhance auth user sync triggers to retain direct operations…
ben-fornefeld 1e5f28b
Merge branch 'feature/supabase-users-sync-worker' of https://github.c…
ben-fornefeld 56154df
feat(sync): implement user sync queue with enhanced error handling an…
ben-fornefeld 3a431aa
feat(sync): add supabase auth user sync configuration and secrets man…
ben-fornefeld eb69678
chore: remove smoke test
ben-fornefeld bb9fa39
add: e2e runner test
ben-fornefeld 461d2ec
chore: change dashboard-api env variable management
ben-fornefeld ce0cbd1
refactor(sync): update user sync logic to utilize new database structure
ben-fornefeld 4d622ce
fix: lint
ben-fornefeld 84ecd06
test: apply database migrations in end-to-end test setup
ben-fornefeld 3f56979
Merge origin/main into feature/supabase-users-sync-worker
ben-fornefeld 386d0c6
feat(sync): enhance user sync processing and acknowledgment
ben-fornefeld 3e3fa3c
refactor(gcp): remove auth_db_connection_string resources and update …
ben-fornefeld 5e0972b
chore(dashboard-api): refactor environment variable management
ben-fornefeld 6b5a5c8
refactor: use river for queue worker
ben-fornefeld 1113654
chore: auto-commit generated changes
github-actions[bot] fb0afd4
chore: auto-commit generated changes
github-actions[bot] bd4dd80
chore: update pgx dependency to v5.9.1 and golang.org/x/mod to v0.34.…
ben-fornefeld 97e305a
Merge branch 'feature/supabase-users-sync-worker' of https://github.c…
ben-fornefeld c98878f
chore: fix lint
ben-fornefeld e314b96
chore: auto-commit generated changes
github-actions[bot] db124a4
improve: retrying for river jobs
ben-fornefeld 0e7f147
Merge branch 'feature/supabase-users-sync-worker' of https://github.c…
ben-fornefeld eed510b
refactor: enhance auth user sync worker and streamline environment va…
ben-fornefeld 8226f67
chore: rename config and fix test
ben-fornefeld 8485d7a
improve: config
ben-fornefeld 37f842f
Merge origin/main into feature/supabase-users-sync-worker
ben-fornefeld c0b1102
chore: auto-commit generated changes
github-actions[bot] 87ef8f0
fix: correct env var name in template to match Go config
cursoragent 45a7ccb
fix: update permissions for trigger_user on river_job and sequences i…
ben-fornefeld 638429a
Merge branch 'feature/supabase-users-sync-worker' of https://github.c…
ben-fornefeld 6b6cfda
Merge remote-tracking branch 'origin/feature/supabase-users-sync-work…
ben-fornefeld aae228c
wip: team provisioning sink
ben-fornefeld 07d4c25
refactor: update environment variable handling and improve auth user …
ben-fornefeld bd1ebb1
chore: auto-commit generated changes
github-actions[bot] 126d984
fix: lint
ben-fornefeld d4ba4c2
Merge branch 'feature/supabase-users-sync-worker' of https://github.c…
ben-fornefeld 24a425c
chore: use write auth db for user check in team creation
ben-fornefeld 4155a96
refactor(dashboard-api): localize team creation policy
ben-fornefeld 18dfac4
Merge origin/main into feature/dashboard-api-user-team-management
ben-fornefeld 4187a1f
chore: auto-commit generated changes
github-actions[bot] 407530a
chore: auto-commit generated changes
github-actions[bot] 7760e3f
refactor(dashboard-api): block new teams for recent users
ben-fornefeld 5842767
fix(dashboard-api): serialize user bootstrap team creation
ben-fornefeld acb1374
test(dashboard-api): add tests for provisioning failures and ensure t…
ben-fornefeld b31e568
chore: cleanup
ben-fornefeld c2bccdd
Merge remote-tracking branch 'origin/feature/supabase-users-sync-work…
ben-fornefeld 7117c13
feat(dashboard-api): add billing server integration for team provisio…
ben-fornefeld 66efe05
chore: auto-commit generated changes
github-actions[bot] c21f0fd
chore: observability
ben-fornefeld a4cb5e0
Merge branch 'feature/dashboard-api-user-team-management' of https://…
ben-fornefeld a78fd00
chore: auto-commit generated changes
github-actions[bot] 6ae0aa6
chore: observability
ben-fornefeld 9a89372
Merge branch 'feature/dashboard-api-user-team-management' of https://…
ben-fornefeld cc77e88
chore: fix lint
ben-fornefeld d53308c
fix: lint
ben-fornefeld 4544bf7
address comments
ben-fornefeld 04e18ea
refactor(dashboard-api): simplify team provisioning configuration + a…
ben-fornefeld b695386
chore: work sync
ben-fornefeld 41b247e
chore: auto-commit generated changes
github-actions[bot] bf9b998
chore: bugbot comments
ben-fornefeld 76f1b2b
Merge branch 'feature/dashboard-api-user-team-management' of https://…
ben-fornefeld 2ac1f83
Merge main into feature/supabase-users-sync-worker
ben-fornefeld da28e6a
chore: auto-commit generated changes
github-actions[bot] 1512ede
chore: auto-commit generated changes
github-actions[bot] d25d531
refactor(dashboard-api): align auth user sync worker with review feed…
ben-fornefeld fe217ea
chore: auto-commit generated changes
github-actions[bot] 40a5cd0
refactor(db): split supabase auth sync source client
ben-fornefeld c25caba
chore(db): address follow-up nits
ben-fornefeld b549874
chore: make extra env sensitive
ben-fornefeld 581afcc
improve: pass billing env explicitly instead of implicitly
ben-fornefeld 18f7839
fix(dashboard-api): stop river worker gracefully on shutdown
ben-fornefeld 9667b77
refactor(dashboard-api): simplify service lifecycle orchestration
ben-fornefeld 37eb463
chore: auto-commit generated changes
github-actions[bot] c5d82f0
refactor(db): drop supabase replica client plumbing
ben-fornefeld e4d5bff
fix: use write db for supabase db get user read
ben-fornefeld 4862139
chore: fix lint
ben-fornefeld 449df87
chore: address comments
ben-fornefeld 4ecc627
fix(dashboard-api): lazy-init supabase worker client
ben-fornefeld 29bbf59
chore(dashboard-api): reduce supabase worker pool size
ben-fornefeld dc36b11
fix(dashboard-api): validate and normalize team names
ben-fornefeld 48a620c
test(dashboard-api): tighten auth user sync coverage
ben-fornefeld 2eda1d4
chore: auto-commit generated changes
github-actions[bot] 17d09f9
test(dashboard-api): trim low-signal provisioning coverage
ben-fornefeld bb31094
feat(dashboard-api): add supabase db config override
ben-fornefeld 62cac52
fix(dashboard-api): require admin auth for bootstrap
ben-fornefeld 2a2311a
Merge remote-tracking branch 'origin/main' into feature/supabase-user…
ben-fornefeld 11d0f0f
refactor(dashboard-api): narrow infra sync runner changes
ben-fornefeld 268400f
fix(dashboard-api): harden bootstrap auth and provisioning
ben-fornefeld bb44d06
merge feature/supabase-users-sync-worker
ben-fornefeld 63b4a2b
chore: auto-commit generated changes
github-actions[bot] 06b3274
chore: auto-commit generated changes
github-actions[bot] 097db23
refactor(dashboard-api): remove env blob wiring
ben-fornefeld b766bf0
Merge remote-tracking branch 'origin/feature/dashboard-api-user-team-…
ben-fornefeld 3b5c98f
Merge remote-tracking branch 'origin/main' into feature/dashboard-api…
ben-fornefeld 33e45b9
chore
ben-fornefeld c982884
test(dashboard-api): trim low-signal sync coverage
ben-fornefeld 5285ea8
chore: cleanup main exiting
ben-fornefeld 973d304
fix: use supabase db client for auth.users queries
ben-fornefeld 32d9d9c
chore: template env
ben-fornefeld 58e1c65
Merge remote-tracking branch 'origin/main' into feature/dashboard-api…
ben-fornefeld fdea3be
refactor(dashboard-api): align auth locking and sink setup
ben-fornefeld a486438
chore: auto-commit generated changes
github-actions[bot] 8d70872
fix(dashboard-api): preserve create-team provisioning errors
ben-fornefeld 1e49371
test(dashboard-api): parallelize provisioning subtests
ben-fornefeld e3f6b09
Use auth DB client for auth queries
ben-fornefeld 83f66e7
Add sqlc auth queries for teams and users
ben-fornefeld 449b14a
Remove unused IsBadRequest and net/http import
ben-fornefeld b8c3bca
Do not block teams for NULL user.created_at
ben-fornefeld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| package auth | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestAdminValidationFunction(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| validate := adminValidationFunction("super-secret-token") | ||
|
|
||
| t.Run("accepts matching token", func(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| _, err := validate(t.Context(), nil, "super-secret-token") | ||
| require.Nil(t, err) | ||
| }) | ||
|
|
||
| t.Run("rejects non-matching token", func(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| _, err := validate(t.Context(), nil, "super-secret-tokem") | ||
| require.NotNil(t, err) | ||
| require.Equal(t, 401, err.Code) | ||
| }) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.