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

Bugfix/correct mapper error #6535

Closed
wants to merge 2 commits into from

Conversation

davidporter-id-au
Copy link
Member

@davidporter-id-au davidporter-id-au commented Dec 2, 2024

What changed?
Fixes (hopefully) some mapping bugs I introduced with #6523 due to the version history being passed in being nil sometimes, therefore causing panics.

The mapping code as it's currently written panics (and is changed by this PR) which I think is the correct architectural choice. The mappers, by panicing as they presently are, are confusing validation with mapping. This corrects the mapper to gracefully handle nil input, and a quick survey appears to show that there are no expected areas which should never be nil that don't already have nil-check validation in place.

Why?

How did you test it?

  • Unit tests
  • Staging deploy

How did you test it?

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.39%. Comparing base (eacb093) to head (f4131dd).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
common/persistence/versionHistory.go 71.42% 2 Missing ⚠️
Files with missing lines Coverage Δ
common/persistence/versionHistory.go 76.16% <71.42%> (+0.75%) ⬆️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@davidporter-id-au davidporter-id-au deleted the bugfix/correct-mapper-error branch December 2, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant