Skip to content

MAINT: Alembic Initialize_pyrit output#1895

Merged
rlundeen2 merged 2 commits into
microsoft:mainfrom
rlundeen2:rlundeen2/silent-migration-output
Jun 2, 2026
Merged

MAINT: Alembic Initialize_pyrit output#1895
rlundeen2 merged 2 commits into
microsoft:mainfrom
rlundeen2:rlundeen2/silent-migration-output

Conversation

@rlundeen2
Copy link
Copy Markdown
Contributor

initialize_pyrit_async could produce output from Alembic's migration. This was kind of confusing.

  • If silent was passed, you still got output
  • Even if not, pyrit would say "no new upgrade detected"

This PR adds some context to that so initialize_pyrit_async output is more cohesive

rlundeen2 and others added 2 commits June 2, 2026 14:25
initialize_pyrit(silent=True) still printed Alembic's 'No new upgrade
operations detected.' message because the schema-check ran with the
default stdout. Thread the silent flag from initialize_pyrit_async
through the memory constructors into the migration helpers, routing
Alembic output to an in-memory buffer when silent and to sys.stdout
(resolved at call time) otherwise.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wrap the migration stdout stream so Alembic's own messages (e.g. 'No new
upgrade operations detected.') are prefixed and identifiable as Alembic
output, disambiguating them from PyRIT/REST API output. Update tests to
assert the prefix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rlundeen2 rlundeen2 changed the title MAINT: Silent migration output MAINT: Alembic Initialize_pyrit output Jun 2, 2026
@rlundeen2 rlundeen2 enabled auto-merge June 2, 2026 21:47
@rlundeen2 rlundeen2 added this pull request to the merge queue Jun 2, 2026
Merged via the queue into microsoft:main with commit ac0da01 Jun 2, 2026
52 checks passed
@rlundeen2 rlundeen2 deleted the rlundeen2/silent-migration-output branch June 2, 2026 22:07
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.

2 participants