-
Notifications
You must be signed in to change notification settings - Fork 15
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
[COST-4175] Fix AWS first of the month issue #487
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #487 +/- ##
=======================================
+ Coverage 93.5% 93.5% +0.1%
=======================================
Files 60 60
Lines 4633 4638 +5
Branches 666 666
=======================================
+ Hits 4330 4337 +7
+ Misses 158 157 -1
+ Partials 145 144 -1 |
Do not both returning and then disccarding the keys view.
- Use nested .get() calls instead of conditionals - Store the value instead of doing repeated attribute lookups - Default to today()
It’s expensive in CPython to keep looking up attributes, plus it hurts legibility greatly here. Lookup up the attributes once and store the values to make the conditionals much easier to read and improve performance. Compare both the month and day of month_end and end_date in order to determine if they are the same. It may be sufficient to compare only day, but it seems more accurate to compare both month and day.
samdoran
force-pushed
the
esebesto/COST-4714_fix_aws
branch
from
March 5, 2024 02:21
5e16168
to
60107cb
Compare
samdoran
changed the title
DRAFT: COST-4175 - Fix AWS first of the month issue
[COST-4175] Fix AWS first of the month issue
Mar 5, 2024
samdoran
force-pushed
the
esebesto/COST-4714_fix_aws
branch
from
March 5, 2024 04:15
1d300e2
to
70a1a06
Compare
esebesto
commented
Mar 5, 2024
esebesto
commented
Mar 5, 2024
esebesto
commented
Mar 5, 2024
esebesto
commented
Mar 5, 2024
esebesto
force-pushed
the
esebesto/COST-4714_fix_aws
branch
from
March 22, 2024 08:26
bf589dd
to
51ef810
Compare
esebesto
force-pushed
the
esebesto/COST-4714_fix_aws
branch
from
March 25, 2024 14:36
5a425b3
to
10550b7
Compare
lcouzens
approved these changes
Mar 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On the first of the month, the AWS previous month report generated by Nise contains also data for current month (COST-4175). This PR aims to fix this bug.
There is a very good chance that this PR actually breaks generation of data for other providers - thus it can't be merged until it's properly tested with all providers and methods of date specification