Skip to content
This repository has been archived by the owner on May 8, 2023. It is now read-only.

Fix: Charge History Persister to cope with EndDateTime being null #1911

Merged
merged 7 commits into from
Dec 16, 2022

Conversation

prtandrup
Copy link
Contributor

@prtandrup prtandrup commented Dec 16, 2022

Description

When the ChargeInformationOperationsAcceptedEvent contains a brand new charge, the EndDateTime is null.
This was not anticipated and the ChargeHistoryPersisterEndpoint threw an ArgumentNullException.
This PR now handles this scenario, by setting EndDefault when null through a new ChargeHistoryFactory.cs.

Also, the service bus subscription failing has been fixed. Kudos @HenrikSommer for your great 👀

Also, I spotted an incorrect document type used in a builder, and changed it (unrelated to the bug).

References

@cla-bot cla-bot bot added the cla-signed label Dec 16, 2022
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:27 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:27 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:27 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:27 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:27 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Merging #1911 (b141800) into main (f0115c3) will increase coverage by 52.13%.
The diff coverage is 91.66%.

@@             Coverage Diff             @@
##             main    #1911       +/-   ##
===========================================
+ Coverage   32.22%   84.36%   +52.13%     
===========================================
  Files          24      461      +437     
  Lines         512     8198     +7686     
  Branches       23       23               
===========================================
+ Hits          165     6916     +6751     
- Misses        332     1138      +806     
- Partials       15      144      +129     
Flag Coverage Δ
business 87.83% <91.66%> (?)
clientlibraries 32.22% <ø> (ø)

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

Impacted Files Coverage Δ
...s.FunctionHost/ChargeLinks/ChargeLinksIngestion.cs 0.00% <ø> (ø)
...ub.Charges.FunctionHost/Charges/ChargeIngestion.cs 0.00% <ø> (ø)
...nHost/Configuration/ServiceCollectionExtensions.cs 47.91% <ø> (ø)
...nEnergyHub.Charges.Infrastructure/ActorProvider.cs 100.00% <ø> (ø)
...nEnergyHub.Charges.QueryApi/Model/ChargeHistory.cs 0.00% <0.00%> (ø)
...nEnergyHub.Charges.QueryApi/Model/ChargeMessage.cs 0.00% <ø> (ø)
...tionHost/Configuration/HealthCheckConfiguration.cs 51.06% <40.00%> (ø)
...nEnergyHub.Charges.Domain/Charges/ChargeHistory.cs 95.18% <95.18%> (ø)
...lication/Charges/Factories/ChargeHistoryFactory.cs 100.00% <100.00%> (ø)
...ndlers/ChargeInformation/ChargeHistoryPersister.cs 100.00% <100.00%> (ø)
... and 442 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:51 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:52 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:52 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:52 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 08:52 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 10:19 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 10:19 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 10:19 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 10:19 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 10:19 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 11:10 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 11:10 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 11:10 — with GitHub Actions Inactive
@prtandrup prtandrup temporarily deployed to AzureAuth December 16, 2022 11:10 — with GitHub Actions Inactive
@sonarqubecloud
Copy link

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@prtandrup prtandrup merged commit 81b053b into main Dec 16, 2022
@prtandrup prtandrup deleted the 1846/pta/fix_endDateTime_null_issue branch December 16, 2022 12:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants