Skip to content

Conversation

@alessio-perugini
Copy link
Contributor

@alessio-perugini alessio-perugini commented Mar 12, 2025

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Fix a nil pointer

What is the current behavior?

When the directories.user is not set by the user, an empty string is returned instead of using the default value. This leads to a panic

What is the new behavior?

Use the UserDir function that correctly fallback to default dir in case of empty string.

Does this PR introduce a breaking change, and is titled accordingly?

Other information

We were calling directly a function that lookup for user definied
settings. In case an user did not set explictly the directory it would
return an empty string causing a panic. Instead we should have used a
dedicated function `UserDir` that uses a fallback the default
directories.user
@alessio-perugini alessio-perugini linked an issue Mar 12, 2025 that may be closed by this pull request
3 tasks
@alessio-perugini alessio-perugini self-assigned this Mar 12, 2025
@alessio-perugini alessio-perugini added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Mar 12, 2025
@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.87%. Comparing base (b9edb78) to head (fc495da).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2862      +/-   ##
==========================================
- Coverage   67.90%   67.87%   -0.03%     
==========================================
  Files         238      238              
  Lines       22412    22412              
==========================================
- Hits        15218    15212       -6     
- Misses       6001     6005       +4     
- Partials     1193     1195       +2     
Flag Coverage Δ
unit 67.87% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alessio-perugini alessio-perugini merged commit 7271e0a into master Mar 12, 2025
196 checks passed
@alessio-perugini alessio-perugini deleted the 2861-grpc-server-crashes-on-new-sketch-request branch March 12, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gRPC server crashes on new sketch request

2 participants