Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix NewSketch crash when directories.user is not set#2862

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@alessio-perugini
Copy link
Contributor

@alessio-peruginialessio-perugini commentedMar 12, 2025
edited
Loading

Please check if the PR fulfills these requirements

Seehow to contribute

  • The PR has no duplicates (please search among thePull 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 thedirectories.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 theUserDir function that correctly fallback to default dir in case of empty string.

Does this PR introduce a breaking change, and istitled accordingly?

Other information

We were calling directly a function that lookup for user definiedsettings. In case an user did not set explictly the directory it wouldreturn an empty string causing a panic. Instead we should have used adedicated function `UserDir` that uses a fallback the defaultdirectories.user
@alessio-peruginialessio-perugini linked an issueMar 12, 2025 that may beclosed by this pull request
3 tasks
@alessio-peruginialessio-perugini self-assigned thisMar 12, 2025
@alessio-peruginialessio-perugini added topic: codeRelated to content of the project itself type: imperfectionPerceived defect in any part of project labelsMar 12, 2025
@codecov
Copy link

codecovbot commentedMar 12, 2025
edited
Loading

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
FlagCoverage Δ
unit67.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-peruginialessio-perugini merged commit7271e0a intomasterMar 12, 2025
196 checks passed
@alessio-peruginialessio-perugini deleted the 2861-grpc-server-crashes-on-new-sketch-request branchMarch 12, 2025 16:58
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cmagliecmagliecmaglie approved these changes

Labels

topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

gRPC server crashes on new sketch request

2 participants

@alessio-perugini@cmaglie

[8]ページ先頭

©2009-2025 Movatter.jp