Skip to content

Fix pypi workflow on private repos, fix alembic migration check#27

Merged
tedivm merged 1 commit intomainfrom
fix/ci-pypi-permissions-and-migration-check
Mar 30, 2026
Merged

Fix pypi workflow on private repos, fix alembic migration check#27
tedivm merged 1 commit intomainfrom
fix/ci-pypi-permissions-and-migration-check

Conversation

@tedivm
Copy link
Copy Markdown
Owner

@tedivm tedivm commented Mar 30, 2026

  • pypi workflow only had id-token:write; declaring any permissions key drops all others to none, so checkout failed with 'repository not found' on private repos. Added contents:read to restore checkout access.

  • check_ungenerated_migrations ran alembic check against whatever database DATABASE_URL pointed to. With some use cases there may be problems with the database in CI that results in alembic reporting 'Target database is not up to date'. Updated the target to create a fresh temp DB, run upgrade head, then check, then clean up — matching the create_migration pattern.

…check to use temp DB

- pypi workflow only had id-token:write; declaring any permissions key drops
  all others to none, so checkout failed with 'repository not found' on
  private repos. Added contents:read to restore checkout access.

- check_ungenerated_migrations ran alembic check against whatever database
  DATABASE_URL pointed to. In CI there is no pre-existing database, so alembic
  reported 'Target database is not up to date' before comparing models to
  migrations at all. Updated the target to create a fresh temp DB, run
  upgrade head, then check, then clean up — matching the create_migration
  pattern.
@tedivm tedivm merged commit fe75efc into main Mar 30, 2026
3 checks passed
@tedivm tedivm deleted the fix/ci-pypi-permissions-and-migration-check branch March 30, 2026 21:12
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