Repository navigation
PNE-9739: Map the missing ingestion error types - #1070
Conversation
| @@ -1 +1 @@ | |||
| __version__ = "5.2.0" | |||
| __version__ = "5.2.1" | |||
There was a problem hiding this comment.
This is an API break. Given the precedent that's been set previously, we don't need to make it a major version bump, but it should be a minor one. Additionally, please communicate this change to the customer team.
There was a problem hiding this comment.
I just updated the minor as suggested, however this is not an API break change, code wrote with 5.2.0 will work here. This will prevent an ingestion to crash when one of the errors synced here occurs. It could be good for customer to know that now it will not crash under those errors. Btw, this is a PR stack, if you have a few mins and you want to take a look at #1071, that last piece will allow the sdk to be more forgiveness with missing mappings.
There was a problem hiding this comment.
API break was the wrong term. It's a breaking behavior change as they can no longer handle these errors by catching a ValueErrror, and the follow-on PR will mean no unknown types can be caught that way. So someone upgrading may need to change their scripts.
Regardless, yes, I'll take a look at the follow-on, too.
anoto-moniz
left a comment
There was a problem hiding this comment.
Thanks for giving the customer team a heads up!
Citrine Python PR
Description
Ticket: PNE-9739
The SDK raises
ValueErrorwhile deserializing an ingestion status whoseerror_typeit doesn't know, so the server's error message never reaches the user.IngestionErrorTypewas last synced with TblSvc in 2024 and is missing 11 of the server's 32 values. This PR adds them, includingmixed_amount_and_ingredientfrom platform-backend#6689 (merged). The SDK enum now matches the server'sIngestionErrorTypeandingestion-openapi.yaml.Each sync has appended its new members after the existing ones, in the server's declaration order. The new members follow that rule. Version bumped 5.2.0 → 5.2.1.
Testing
A new parametrized test builds an
IngestionStatusfrom each of the 11 wire values. All 11 cases fail withValueErroronmainand pass with this change. The full suite passes at 100% coverage, andflake8is clean.PR Type:
Adherence to team decisions
🤖 Generated with Claude Code