Skip to content

fix(python): publish raw austin profiles as .txt, not .svg - #138

Merged
blue4209211 merged 1 commit into
mainfrom
fix/austin-raw-txt-extension
Oct 3, 2026
Merged

blue4209211 merged 1 commit into
mainfrom
fix/austin-raw-txt-extension

Conversation

@mayankpande88

Copy link
Copy Markdown
Contributor

Summary

A raw austin (Python memory) profile is published as agent-raw-<pid>-1.svg.gz, even though its content is plain text. GetFileExtension had no austin case, so it fell through to the .svg default. Consumers that pick a renderer by file suffix draw the text as a broken image.

austin now shares the Bpf/Perf mapping: raw → .txt, flamegraph → .svg.

This commit was pushed to #137 after it had been merged, so it never reached main.

Type of change

  • Bug fix

Test plan

  • TestGetFileExtension_Austin: raw → .txt, flamegraph → .svg, and the full result file name ends in -<pid>-1.txt.
  • test/e2e/python-austin.sh now also asserts that the published raw profile is *.txt.gz.
Engineering detail

Local e2e: built docker/python/Dockerfile from this branch and ran test/e2e/python-austin.sh against it. All four targets passed, each published as agent-raw-1-1.txt.gz:

  • Python 3.12 Alpine: 316 samples
  • Python 3.12 Debian: 304 samples
  • Python 3.14 Alpine: 213 samples
  • Steady-state process: the no-growth note

Negative control: the same script against the image published from current main (application-profiler-python:6116ac0) fails every target with raw profile published as /tmp/agent-raw-1-1.svg.gz, want *.txt.gz.

Checklist

  • go build ./... and go test ./... pass locally
  • Docs (README, flags) updated if behavior changed: n/a
  • No breaking changes to the agent's stdout JSON envelope. Only the result file's extension changes, from .svg to .txt, for austin raw output.

austin had no case in GetFileExtension and fell through to the ".svg"
default, so a raw memory profile shipped as agent-raw-<pid>-1.svg.gz.
Consumers that choose a renderer by suffix drew the text as an image.
The e2e check now asserts the .txt.gz name.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes an issue where raw Austin memory profiles were incorrectly given an .svg extension instead of .txt, causing rendering issues. It updates GetFileExtension to handle api.Austin correctly, adds corresponding unit tests, and updates the E2E test script to verify the file extension. There are no review comments to address.

@blue4209211
blue4209211 merged commit e8fe8d4 into main Oct 3, 2026
12 checks passed
@blue4209211
blue4209211 deleted the fix/austin-raw-txt-extension branch October 3, 2026 18:25
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