Skip to content

Conversation

@armenzg
Copy link
Member

@armenzg armenzg commented Mar 25, 2025

This change enables tests to assert that multiple code mappings are created rather than just one.

This also adds:

  • a helper code_mapping function
  • makes Java tests to make use of the frame helper

Instead of expecting that only one could be created.
@armenzg armenzg self-assigned this Mar 25, 2025
@armenzg armenzg marked this pull request as ready for review March 25, 2025 20:02
@armenzg armenzg requested a review from a team as a code owner March 25, 2025 20:02
self,
filename: str | None = None,
in_app: bool | None = True,
module: str | None = None,
Copy link
Member Author

Choose a reason for hiding this comment

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

The Java tests were not taking advantage of this helper function.

frame["in_app"] = in_app
return frame

def code_mapping(
Copy link
Member Author

Choose a reason for hiding this comment

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

This will help make multi-line code mappings a single line:
image

repo_trees={REPO1: [file_in_repo]},
frames=[self.frame(frame_filename, True)],
platform=platform,
expected_new_code_mapping={
Copy link
Member Author

Choose a reason for hiding this comment

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

From here forward, we're swapping to use self.frame and self.code_mapping.

@armenzg armenzg requested a review from MichaelSun48 March 26, 2025 14:10
Copy link
Contributor

@MichaelSun48 MichaelSun48 left a comment

Choose a reason for hiding this comment

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

nice reduction in LOC!

@armenzg armenzg merged commit aa7ac06 into master Mar 26, 2025
46 checks passed
@armenzg armenzg deleted the ref/multiple_code_mappings/auto_source_config/armenzg branch March 26, 2025 17:50
andrewshie-sentry pushed a commit that referenced this pull request Mar 27, 2025
)

This change enables tests to assert that multiple code mappings are
created rather than just one.

This also adds:

* a helper `code_mapping` function
* makes Java tests to make use of the `frame` helper
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants