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 Pydantic error mapping #4170

Merged
merged 7 commits into from
Jan 30, 2025
Merged

Fix Pydantic error mapping #4170

merged 7 commits into from
Jan 30, 2025

Conversation

islean
Copy link
Contributor

@islean islean commented Jan 30, 2025

Description

We have a bug in how we map the Pydantic errors to the validate_order response. The "loc" property of the Pydantic error makes lists incompatible with the current handling.

Added

Changed

Fixed

  • Determining the type of order/case/sample/case_sample error is not by length of loc

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b [THIS-BRANCH-NAME] -a

How to test

  • Do ...

Expected test outcome

  • Check that ...
  • Take a screenshot and attach or copy/paste the output.

Review

  • Tests executed by
  • "Merge and deploy" approved by
    Thanks for filling in who performed the code review and the test!

This version is a

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@islean islean requested a review from a team as a code owner January 30, 2025 09:59
@islean islean marked this pull request as draft January 30, 2025 10:19
Copy link
Contributor

@Vince-janv Vince-janv left a comment

Choose a reason for hiding this comment

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

Still not sure I understand it all 💫

Copy link
Contributor

@diitaz93 diitaz93 left a comment

Choose a reason for hiding this comment

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

you comments brought more clarity 🌟

Copy link
Contributor

@Vince-janv Vince-janv left a comment

Choose a reason for hiding this comment

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

👌

@islean islean marked this pull request as ready for review January 30, 2025 15:09
@clingen-sthlm clingen-sthlm temporarily deployed to stage January 30, 2025 15:10 Inactive
@islean islean merged commit f1b1e2b into master Jan 30, 2025
10 checks passed
@islean islean deleted the patch-pydantic-error-mappings branch January 30, 2025 15:26
@islean
Copy link
Contributor Author

islean commented Jan 30, 2025

Deployed to the VMs

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.

4 participants