Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(stacketrace-link): Fix tagging and tag early adopters #41648

Merged
merged 3 commits into from
Nov 22, 2022

Conversation

armenzg
Copy link
Member

@armenzg armenzg commented Nov 22, 2022

Changes:

  • fix: stacktrace_link.found is storing the wrong value
  • feature: Tag early adopter organizations

Fixes:
* `stacktrace_link.found` is containing the wrong value
* All code mappings are tried even if `config.stack_root` does not match

Changes:
* Tag if the organization is an `early_adopter`
Changes:
* fix: `stacktrace_link.found` is storing the wrong value
* feature: Tag early adopter organizations
scope.set_tag("project.slug", project.slug)
scope.set_tag("organization.slug", project.organization.slug)
try:
scope.set_tag("organization.early_adopter", project.organization.flags.early_adopter)
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 is the new addition.

scope.set_tag("organization.early_adopter", project.organization.flags.early_adopter)
except Exception:
# If errors arise we can then follow up with a fix
logger.exception("We failed to set the early adopter flag")
Copy link
Member Author

Choose a reason for hiding this comment

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

If this was to cause errors I would see it and then fix it.

@@ -95,7 +108,7 @@ class ProjectStacktraceLinkEndpoint(ProjectEndpoint):
users can go from the file in the stack trace to the
provider of their choice.

`filepath`: The file path from the stack trace
`file`: The file path from the stack trace
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 parameter the UI uses is file rather than filepath.

@@ -166,7 +178,7 @@ def get(self, request: Request, project) -> Response:
break

# Post-processing before exiting scope context
found = result.get("sourceUrl")
found: bool = result["sourceUrl"] is not 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.

We were storing the URL rather than a boolean.

@armenzg armenzg requested a review from a team November 22, 2022 16:01
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 22, 2022
@armenzg armenzg marked this pull request as ready for review November 22, 2022 16:27
@armenzg armenzg requested a review from a team as a code owner November 22, 2022 16:27
@armenzg armenzg merged commit 55a5dbe into master Nov 22, 2022
@armenzg armenzg deleted the armenzg/stacktrace-link/improve-tagging branch November 22, 2022 17:40
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants