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

Fixes and refactors #550

Merged
merged 10 commits into from
Jul 3, 2019
Merged

Fixes and refactors #550

merged 10 commits into from
Jul 3, 2019

Conversation

martincostello
Copy link
Member

Cherry-pick changes from #546 and #549 to:

  • Remove leftover code from previous refactors.
  • Fix integration tests failing if tasks transition so they're already completed.
  • Update various NuGet pacakges to their latest versions.
  • Change timeout constructor parameter on ExactlyOnceHandler to a TimeSpan. This makes the unit clearer and removes the need to create a new TimeSpan for every message invocation.
  • Compute the message lock key suffix in ExactlyOnceHandler once, rather than per message invocation, as it does not change for the lifetime of the handler.
  • Do a reflection call in StopwatchHandler to get the inner handler's type once per instance, rather than once per message.
  • Use a local function for the worker task, rather than explicitly creating a Func<Task>.
  • Make logger field readonly as its value is never reassigned.
  • Reduce the number of calls to message.GetType() in various places.
  • Change logger overloads to not specify an event Id of zero.
  • Include receipt handle in log message.
  • Ensure that the MessageContext is reset to null if an exception is thrown when updating the message visibility timeout.

Remove leftover code from previous refactors.
Try and fix integration tests failing if tasks transition so they're already completed.
Update various NuGet pacakges to their latest versions.
Change timeout constructor parameter to a TimeSpan. This makes the unit clearer and removes the need to create a new TimeSpan for every message invocation.
Compute the message lock key suffix once, rather than per message invocation, as it does not change for the lifetime of the handler.
Do a reflection call to get the inner handler's type once per instance, rather than once per message.
Use a local function for the worker task, rather than explicitly creating a Func<Task>.
Make field readonly as its value is never reassigned.
Reduce the number of calls to message.GetType().
Change logger overloads to not specify an event Id of zero.
Change log overloads used to not specify an event Id of zero.
Reduce calls to message.GetType().
Include receipt handle in log message.
Ensure that the MessageContext is reset to null if an exception is thrown when updating the message visibility timeout.
@martincostello martincostello added this to the v7.0.0 milestone Jun 30, 2019
@martincostello martincostello requested a review from a team as a code owner June 30, 2019 13:49
@codecov
Copy link

codecov bot commented Jun 30, 2019

Codecov Report

Merging #550 into master will increase coverage by 0.48%.
The diff coverage is 64.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #550      +/-   ##
==========================================
+ Coverage   37.64%   38.12%   +0.48%     
==========================================
  Files          78       78              
  Lines        2614     2662      +48     
  Branches      461      465       +4     
==========================================
+ Hits          984     1015      +31     
- Misses       1485     1498      +13     
- Partials      145      149       +4
Impacted Files Coverage Δ
.../Messaging/MessageHandling/ExactlyOnceAttribute.cs 100% <ø> (ø) ⬆️
.../AwsTools/MessageHandling/MessageHandlerWrapper.cs 85.29% <100%> (+0.44%) ⬆️
...wsTools/MessageHandling/SqsNotificationListener.cs 68.45% <54.16%> (-1.68%) ⬇️
...ng/Messaging/MessageHandling/ExactlyOnceHandler.cs 57.14% <57.14%> (ø) ⬆️
...ying/AwsTools/MessageHandling/MessageDispatcher.cs 67.39% <62.85%> (-0.99%) ⬇️
JustSaying/JustSayingBus.cs 81.76% <73.68%> (ø) ⬆️
...ustSaying/Messaging/Monitoring/StopwatchHandler.cs 92.3% <80%> (+0.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88f241c...53aa40b. Read the comment docs.

@martincostello martincostello merged commit 0badfbe into justeattakeaway:master Jul 3, 2019
@martincostello martincostello deleted the Fixes-And-Refactors branch July 3, 2019 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants