Skip to content

tp: validate Python export format before opening output - #8513

Merged
LalitMaganti merged 1 commit into
google:mainfrom
0z5a:dev/0z5a/python-export-invalid-format
Nov 4, 2026
Merged

LalitMaganti merged 1 commit into
google:mainfrom
0z5a:dev/0z5a/python-export-invalid-format

Conversation

@0z5a

@0z5a 0z5a commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Problem

An invalid export format is rejected only after the Python API opens the destination for writing. This creates a new empty file or truncates an existing one before raising ValueError.

Validate the supported formats before opening the output.

Closes #8512.

Validation

  • The new regression covers both existing and missing destinations: both cases fail on the base revision and pass with this change.
  • The existing Perfetto export integration test passes with a small synthetic trace and the v59.1 Trace Processor shell on Linux aarch64.

@0z5a
0z5a requested a review from a team as a code owner November 4, 2026 18:41
@LalitMaganti
LalitMaganti enabled auto-merge (squash) November 4, 2026 19:01
@LalitMaganti
LalitMaganti disabled auto-merge November 4, 2026 20:26
@LalitMaganti
LalitMaganti merged commit 86d7d6b into google:main Nov 4, 2026
23 of 26 checks passed
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.

Python export truncates the destination before rejecting an invalid format

3 participants