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

fix(process): refactor away the bugs and race conditions in proc_t #3604

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

FrogTheFrog
Copy link
Collaborator

@FrogTheFrog FrogTheFrog commented Jan 29, 2025

Description

This is a continuation of #3417.

Moved the code around to remove possible race conditions and bad patterns in general. I tried to not change the logic at all if possible, therefore while some of the sonarqube suggestions are valid, will not be addressed.

Screenshot

Since I have moved stuff around to be in the same order as a header, the diff can be hard to read. These are the screenshots I used for checking for changes (for the "refactoring" commit only):


1

2

3

4_1
4_2
4_3
4_4

5

6

7

8

9

10

11

12

13

14

15

16_1
16_2

17

Issues Fixed or Closed

Resolves this PR: #3417

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 1.48515% with 199 lines in your changes missing coverage. Please review.

Project coverage is 11.59%. Comparing base (23e1314) to head (29ba06f).

Files with missing lines Patch % Lines
src/process.cpp 1.57% 130 Missing and 57 partials ⚠️
src/nvhttp.cpp 0.00% 0 Missing and 7 partials ⚠️
src/confighttp.cpp 0.00% 0 Missing and 2 partials ⚠️
src/stream.cpp 0.00% 0 Missing and 2 partials ⚠️
src/process.h 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3604      +/-   ##
==========================================
- Coverage   11.62%   11.59%   -0.04%     
==========================================
  Files          93       93              
  Lines       17318    17344      +26     
  Branches     8091     8114      +23     
==========================================
- Hits         2014     2011       -3     
+ Misses      14710    12827    -1883     
- Partials      594     2506    +1912     
Flag Coverage Δ
Linux 11.26% <1.53%> (-0.05%) ⬇️
Windows 12.99% <0.00%> (-0.05%) ⬇️

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

Files with missing lines Coverage Δ
src/process.h 0.00% <0.00%> (-12.50%) ⬇️
src/confighttp.cpp 0.00% <0.00%> (ø)
src/stream.cpp 2.51% <0.00%> (ø)
src/nvhttp.cpp 18.62% <0.00%> (+0.08%) ⬆️
src/process.cpp 0.74% <1.57%> (-0.35%) ⬇️

... and 27 files with indirect coverage changes

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
5 New issues
5 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@FrogTheFrog FrogTheFrog marked this pull request as ready for review January 29, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants