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

Group tool templating exceptions in sentry #18570

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Jul 19, 2024

This will properly group tool templating exceptions. The added tags should make it easy to prioritize and distribute fixes. Also improves the exception if not using sentry:

...
Cheetah.Parser.ParseError:

Some #directives are missing their corresponding #end ___ tag: for
Line 3, column 4

Line|Cheetah Code
----|-------------------------------------------------------------
2   |        moo
3   |
        ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/jobs/runners/__init__.py", line 297, in prepare_job
    job_wrapper.prepare()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/jobs/__init__.py", line 1260, in prepare
    ) = tool_evaluator.build()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/evaluation.py", line 611, in build
    global_tool_logs(self._build_command_line, config_file, "Building Command Line", self.tool)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/evaluation.py", line 111, in global_tool_logs
    raise ToolTemplatingException(
galaxy.tools.evaluation.ToolTemplatingException: Error occurred while building command line for tool 'cheetah_problem_syntax_error'

Instead of indiviual single events we now get proper groupings:
Screenshot 2024-07-19 at 12 49 13
Note that these were produced by different tools, but were produced a different number of times.

We can also filter on these tags:
Screenshot 2024-07-19 at 13 15 19
Here's an example in a dev project:
https://sentry.galaxyproject.org/share/issue/c736b70defbb4b2b9cbc4633c7c86d73/

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    Setup a sentry_dsn and use one of the test tools that produce templating exceptions.

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 24.2 milestone Jul 19, 2024
@mvdbeek mvdbeek force-pushed the sentry_group_cheetah_errors branch 2 times, most recently from bd14baf to 3132c75 Compare July 19, 2024 11:49
This will properly group tool templating exceptions.
The added tags should make it easy to prioritize and distribute fixes.
Also improves the exception if not using sentry:
```
...
Cheetah.Parser.ParseError:

Some #directives are missing their corresponding #end ___ tag: for
Line 3, column 4

Line|Cheetah Code
----|-------------------------------------------------------------
2   |        moo
3   |
        ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/jobs/runners/__init__.py", line 297, in prepare_job
    job_wrapper.prepare()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/jobs/__init__.py", line 1260, in prepare
    ) = tool_evaluator.build()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/evaluation.py", line 611, in build
    global_tool_logs(self._build_command_line, config_file, "Building Command Line", self.tool)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/evaluation.py", line 111, in global_tool_logs
    raise ToolTemplatingException(
galaxy.tools.evaluation.ToolTemplatingException: Error occurred while building command line for tool 'cheetah_problem_syntax_error'
```
@mvdbeek mvdbeek force-pushed the sentry_group_cheetah_errors branch from 3132c75 to 385f752 Compare July 19, 2024 13:15
@mvdbeek mvdbeek requested a review from a team July 24, 2024 14:26
@mvdbeek
Copy link
Member Author

mvdbeek commented Jul 24, 2024

@mvdbeek mvdbeek merged commit 9757c33 into galaxyproject:dev Jul 24, 2024
48 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants