Skip to content

Conversation

@TylerAdamMartinez
Copy link
Contributor

Why

This PR addresses the following problem/context:

  • upload_profile_artifacts() could crash with TypeError: 'NoneType' object is not iterable when profiling artifacts were not present.

How

Implementation summary - the following was changed/added/removed:

  • Updated upload_profile_artifacts to accept Optional[Iterable[ProfileArtifact]] instead of requiring an iterable
  • Added an early-return guard for None/empty artifacts and logged a helpful message when there’s nothing to upload.
  • Moved list(artifacts) conversion to occur only after the None/empty check to avoid exceptions.

Notes

Any special considerations, workarounds, or follow-up work to note?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a crash in upload_profile_artifacts() that occurred when profiling artifacts were None, causing a TypeError: 'NoneType' object is not iterable.

Changes:

  • Updated function signature to accept Optional[Iterable[ProfileArtifact]]
  • Added early-return guard before converting artifacts to a list
  • Moved list(artifacts) call after the None/empty check

Copy link
Collaborator

@chasetmartin chasetmartin left a comment

Choose a reason for hiding this comment

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

looks good. @jirhiker Just tagging you since the profiler is your recent addition so you see this.

@chasetmartin chasetmartin merged commit 1141ee9 into staging Jan 23, 2026
6 checks passed
@chasetmartin chasetmartin deleted the TAM-profiling-patch branch January 23, 2026 20:58
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.

3 participants