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 deps - Small date time fixes for end of the month UTC issues #1220

Merged
merged 5 commits into from
Aug 1, 2023

Conversation

seeker25
Copy link
Collaborator

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-pay license (Apache 2.0).

@seeker25 seeker25 requested review from Jxio and kialj876 as code owners July 31, 2023 23:41
@seeker25 seeker25 requested a review from ochiu July 31, 2023 23:41
@seeker25 seeker25 added the dependencies Pull requests that update a dependency file label Jul 31, 2023
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #1220 (7de40ff) into main (28ff797) will decrease coverage by 0.71%.
Report is 78 commits behind head on main.
The diff coverage is 91.39%.

@@            Coverage Diff             @@
##             main    #1220      +/-   ##
==========================================
- Coverage   91.54%   90.84%   -0.71%     
==========================================
  Files         153      187      +34     
  Lines        9842    11502    +1660     
==========================================
+ Hits         9010    10449    +1439     
- Misses        832     1053     +221     
Flag Coverage Δ
bcolapi ∅ <ø> (?)
eventlistenerqueue 81.81% <ø> (-0.48%) ⬇️
ftppoller 0.00% <ø> (?)
payadmin ∅ <ø> (?)
payapi 93.78% <89.09%> (-0.12%) ⬇️
paymentjobs 80.83% <92.80%> (+1.87%) ⬆️
paymentreconciliationsqueue 91.44% <95.38%> (?)
reportapi 91.09% <ø> (?)

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

Files Changed Coverage Δ
jobs/payment-jobs/tasks/ejv_payment_task.py 96.46% <ø> (ø)
jobs/payment-jobs/tasks/routing_slip_task.py 89.09% <0.00%> (-0.43%) ⬇️
pay-api/src/pay_api/services/fee_schedule.py 99.53% <ø> (-0.01%) ⬇️
jobs/payment-jobs/tasks/cfs_create_invoice_task.py 72.44% <50.00%> (-0.24%) ⬇️
pay-api/src/pay_api/services/bcol_service.py 86.13% <61.53%> (-2.10%) ⬇️
...ay-api/src/pay_api/services/gcp_queue_publisher.py 64.70% <64.70%> (ø)
...ons/src/reconciliations/payment_reconciliations.py 91.16% <76.92%> (ø)
pay-api/src/pay_api/resources/account.py 92.47% <80.00%> (-0.97%) ⬇️
pay-api/src/pay_api/models/payment.py 95.87% <83.33%> (-0.40%) ⬇️
...ay-api/src/pay_api/services/base_payment_system.py 95.94% <85.71%> (-0.56%) ⬇️
... and 58 more

... and 38 files with indirect coverage changes

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@@ -89,7 +89,7 @@ def get_week_start_and_end_date(target_date: datetime = datetime.now(), index: i

def get_first_and_last_dates_of_month(month: int, year: int):
"""Return first and last dates for a given month and year."""
start_date = datetime.now().replace(day=1, year=year, month=month)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails when running in the github workflow on the last of the month around 5 pm+

FAILED tests/unit/api/test_statement_settings.py::test_post_default_statement_settings_daily - AssertionError: assert '2023-09-01' == '2023-08-01'
  - 2023-08-01
  ?       ^
  + 2023-09-01
  ?  

@@ -85,7 +86,8 @@ def test_payment_with_no_active_invoice(session):
False, 3, None, None),
('week_no_match', {'weekFilter': {'index': 2}}, False, 0, None, None),
('week_match_all', {'weekFilter': {'index': 0}}, False, 3, None, None),
('month', {'monthFilter': {'month': datetime.now().month, 'year': datetime.now().year}},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails at the end of the month at 5 pm:

FAILED tests/unit/services/test_payment.py::test_search_payment_history[month-search_filter11-False-3-None-None] - AssertionError: assert 0 == 3
 +  where 0 = <built-in method get of dict object at 0x7f031a8fdc00>('total')
 +    where <built-in method get of dict object at 0x7f031a8fdc00> = {'items': [], 'limit': 2, 'page': 1, 'total': 0}.get

@seeker25 seeker25 merged commit e62bd32 into bcgov:main Aug 1, 2023
@seeker25 seeker25 changed the title Fix deps Fix deps - Small date time fixes for end of the month UTC issues Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants