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

simple recovery function added #388

Merged

Conversation

tschuyebuhl
Copy link
Contributor

Summary

I added a simple recovery function and named return parameters to the ExecuteCommand function. Please let me know if this is correct. Would be grateful for any feedback. I'm new to the Mattermost ecosystem, we just recently joined the train in my org.

Ticket Link

This fixes #373.

Copy link
Contributor

@mickmister mickmister left a comment

Choose a reason for hiding this comment

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

Thanks so much for this contribution @tschuyebuhl 🎉

Functionally LGTM. Just one non-blocking suggestion for an improvement

server/command.go Outdated Show resolved Hide resolved
@mickmister mickmister requested a review from hanzei August 7, 2023 02:21
@mickmister mickmister added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Aug 7, 2023
Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

Nice work, one suggestion below.

server/command.go Outdated Show resolved Hide resolved
@tschuyebuhl
Copy link
Contributor Author

Thanks for the comments. I really appreciate it. Addressed both of them, hope that this is a step in the right direction and that the type assertion is not a problem.

server/command.go Outdated Show resolved Hide resolved
server/command.go Outdated Show resolved Hide resolved
server/command.go Outdated Show resolved Hide resolved
@tschuyebuhl tschuyebuhl requested a review from hanzei August 7, 2023 16:44
Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

Awesome 🎉

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.10% ⚠️

Comparison is base (03e6909) 33.03% compared to head (b481fb4) 32.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #388      +/-   ##
==========================================
- Coverage   33.03%   32.93%   -0.10%     
==========================================
  Files          22       22              
  Lines        4002     4014      +12     
==========================================
  Hits         1322     1322              
- Misses       2549     2561      +12     
  Partials      131      131              
Files Changed Coverage Δ
server/command.go 24.27% <0.00%> (-0.46%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mickmister mickmister left a comment

Choose a reason for hiding this comment

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

LGTM, just one remaining suggestion to explicitly name the *model.AppError as appErr instead of err

server/command.go Outdated Show resolved Hide resolved
Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

One non-blocking suggestion to make the stack trace more readable:

Screenshot from 2023-08-08 12-35-29

server/command.go Outdated Show resolved Hide resolved
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
@hanzei hanzei added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Aug 8, 2023
@hanzei hanzei added this to the v1.7.0 milestone Aug 8, 2023
@hanzei hanzei merged commit 8638c32 into mattermost:master Aug 8, 2023
9 checks passed
@hanzei
Copy link
Collaborator

hanzei commented Aug 8, 2023

Thanks you @tschuyebuhl 🎉

@tschuyebuhl
Copy link
Contributor Author

Thank you guys!!! it's been an honor!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply panic recovery logic to slash command handlers
3 participants