Skip to content

Iam changes jacky 2559#2301

Open
Jacky-Pham wants to merge 7 commits intobcgov:mainfrom
Jacky-Pham:iam-changes-jacky-2559
Open

Iam changes jacky 2559#2301
Jacky-Pham wants to merge 7 commits intobcgov:mainfrom
Jacky-Pham:iam-changes-jacky-2559

Conversation

@Jacky-Pham
Copy link

I added IAM capabilities with a user:pass fallback if an IAM is not present.
One thing we ran into is that csv_export uses a function that is exclusive to psycopg and not pg8000. This implementation should fix this.

The tradeoff is that instead COPY TO STDOUT all rows are loaded into memory first rather than streamed. For a job that runs periodically and generates a CSV export, that should be fine. Otherwise I believe the Alembic flow satisfies the requirements

Jacky-Pham and others added 7 commits February 25, 2026 16:22
unit tests don't show any particular failure relating to this change.

added failsafes to go back to user:pass if iam is unavailable

Add role switching in Alembic migrations via DB_OWNER_ROLE env var
COPY TO STDOUT is a tradeoff because all rows are loaded into memory first rather than streamed. For a job that runs periodically and generates a CSV export, that should be fine.

Since this is possibly business logic please take a look at this commit to ensure things are okay.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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