-
Notifications
You must be signed in to change notification settings - Fork 807
2165 lambda decoupling #2188
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
2165 lambda decoupling #2188
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2188 +/- ##
===========================================
+ Coverage 56.96% 57.11% +0.14%
===========================================
Files 498 499 +1
Lines 13379 13401 +22
===========================================
+ Hits 7622 7654 +32
+ Misses 5757 5747 -10
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
) | ||
|
||
|
||
class Analytics: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make sense as a class. It doesn't maintain any state and nothing uses any object instances of this class. the constructor calls _send_analytics()
to do some work and how it actually gets called is triggered when it gets added to the DI container. Very mysterious.
This can just be a function and you pass the Version and Deployment into it. In the long run, the version and deployment will be constructed at an earlier phase of the boot process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, the "when" part is not evident. After taking a second look at the DI container I found a way to use it directly instead of creating a class
Island now performs 2 queries instead of 1(1 for analytics and 1 for update information)
789ae00
to
5ffec0e
Compare
This change makes the logic more evident, because sending the analytics is not done during the initialization of an object
After some further discussion, the root problem is that this probably shouldn't be a back-end responsibility at all. There will be a follow-up issue. |
This reverts commit 737070f.
Unit tests should not be exposed to the internals of what they are testing. Furthermore, the `latest_version` and `download` properties wait for the event to be set, making the extra `wait()` redundant.
What does this PR do?
Fixes #2165
Add any further explanations here.
PR Checklist
Testing Checklist