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

Moved duplicate operation to function #2255

Merged

Conversation

stephanrotolante
Copy link
Contributor

@stephanrotolante stephanrotolante commented Jun 13, 2022

Description

Nothing crazy here, I was exploring the code base and thought this would be an easy thing to refactor

Essentially I am moving some of the duplicated actions that Get/Put packet allocations from the Pool into reusable functions :)

Reference issue

Fixes #...

@stephanrotolante stephanrotolante changed the title refactor(PacketPool): mvd duplicate actions 2 func refactor(PacketPool): moved duplicate actions to function Jun 13, 2022
@ashellunts
Copy link
Contributor

LGTM, @stephanrotolante can you check linter failure please?

@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Base: 77.50% // Head: 77.51% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (769c710) compared to base (6b1e684).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 769c710 differs from pull request most recent head b1f92db. Consider uploading reports for the commit b1f92db to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2255   +/-   ##
=======================================
  Coverage   77.50%   77.51%           
=======================================
  Files          87       87           
  Lines        9261     9264    +3     
=======================================
+ Hits         7178     7181    +3     
  Misses       1649     1649           
  Partials      434      434           
Flag Coverage Δ
go 79.28% <100.00%> (+<0.01%) ⬆️
wasm 70.15% <ø> (ø)

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

Impacted Files Coverage Δ
track_local_static.go 82.60% <100.00%> (+0.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@stephanrotolante
Copy link
Contributor Author

@ashellunts yes, it looks like a commit lint error

Screen Shot 2022-10-31 at 11 38 54 PM

@ashellunts
Copy link
Contributor

Can you fix that please? 😀

@stephanrotolante stephanrotolante changed the title refactor(PacketPool): moved duplicate actions to function Moved duplicate operation to function Nov 1, 2022
@stephanrotolante
Copy link
Contributor Author

@ashellunts updated!

@stephanrotolante
Copy link
Contributor Author

ok wth give me a sec

@stephanrotolante
Copy link
Contributor Author

@ashellunts ok I believe I got it this time. And I validated the commit by running the commit lint script on my local. I didn't know when you commit you can format the message like this git commit -m "This is the subject" -m "This is the body"

@stephanrotolante
Copy link
Contributor Author

stephanrotolante commented Nov 1, 2022

@ashellunts IMO this commit lint should run on the users machine via some pre-commit hook. I think these ci runner take to long for this super simple check

What do you think?

@ashellunts
Copy link
Contributor

ashellunts commented Nov 1, 2022

Personally I prefer not to have them in pre commit hook. When I do temporary, draft commits I don't want linter to block them.

@ashellunts
Copy link
Contributor

@stephanrotolante Have you used scripts from .github folder to run all checks locally?

@stephanrotolante
Copy link
Contributor Author

@ashellunts thank u for being patient with me

@stephanrotolante
Copy link
Contributor Author

@ashellunts I wish these workflow would run without someone having to trigger them

@stephanrotolante
Copy link
Contributor Author

@stephanrotolante Have you used scripts from .github folder to run all checks locally?

yes, now I am dealing with a golang linter error

@ashellunts
Copy link
Contributor

@ashellunts IMO this commit lint should run on the users machine via some pre-commit hook. I think these ci runner take to long for this super simple check

What do you think?

I have found there is a helper script to install linter checks as pre-commit/pre-push
.github/install-hooks.sh

@ashellunts
Copy link
Contributor

@ashellunts I wish these workflow would run without someone having to trigger them

It only happens for a first PR of a contributor, AFAIK.

@ashellunts
Copy link
Contributor

@ashellunts thank u for being patient with me

No worries at all!

@ashellunts ashellunts merged commit 257c9e5 into pion:master Nov 3, 2022
@ashellunts
Copy link
Contributor

ashellunts commented Nov 3, 2022

@Sean-Der I thought AUTHORS should be updated with CI. But that step (generate authors) was skipped for this PR.

@stephanrotolante you can create PR and add yourself to AUTHORS file.

pionbot updated AUTHORS in another PR.

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.

None yet

2 participants