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

Add the commit check for logOnPanic #5866

Open
qfrank opened this issue Sep 23, 2024 · 1 comment
Open

Add the commit check for logOnPanic #5866

qfrank opened this issue Sep 23, 2024 · 1 comment
Assignees
Labels
goal:P0:no_crashes Desktop Core 2024 Q4 goal infra

Comments

@qfrank
Copy link
Contributor

qfrank commented Sep 23, 2024

Description

We want all goroutines to use defer common.LogOnPanic(). Otherwise it's difficult to trace the panic on mobile.
To force this, we need a PR level check that will ensure that all goroutines use this logging.

More details here on implementation here:

@igor-sirotin igor-sirotin changed the title add the commit check for logOnPanic Add the commit check for logOnPanic Oct 3, 2024
@igor-sirotin
Copy link
Collaborator

igor-sirotin commented Oct 15, 2024

This doesn't seem to be an urgent task, yet not good to postpone.
I was curious to do it, so I used my time off for it. Results are in feat/LogOnPanic-linter branch.

func main() {

TODO

Some more work is needed there:

  • Add proper parametrization:
    • A list of directories?
    • -skip argument?
    • -pattern=LogOnPanic argument?
  • Properly filter results directories
    • ./vendor directory, because we can't change it
    • Though we can change waku code. Not sure what's the way to go here.
    • Maybe only print the directories that were given as input?

Which repo?

We have the same check in waku repo, so we might want to extract this app to a separate repo. Or even wrap it into a Gihub Action right away, to be easily used in both repos.

@igor-sirotin igor-sirotin self-assigned this Oct 18, 2024
@igor-sirotin igor-sirotin added the goal:P0:no_crashes Desktop Core 2024 Q4 goal label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:P0:no_crashes Desktop Core 2024 Q4 goal infra
Projects
Status: In Progress
Development

No branches or pull requests

2 participants