Avoid client errors when a new variant of `MultiFilesUri` is added
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- blockchain, cli
Research direction
Start at the MultiFilesUri definition and compare its serialization behavior with the signed entity types’ custom serde approach. Trace how locations are handled in the client library and client CLI, then run or add unit tests for known and unknown variants and the golden test for a message containing an unknown variant. Done means unsupported locations are skipped without deserialization errors while known variants continue to work.
Written by the indexing model from the issue text.
Description
Why
MultiFilesUri only has the Template variant and is deserialized with the derived serde implementation, so adding a new variant on the aggregator side would make already released clients fail to deserialize the Cardano database messages.
What
Make the deserialization of MultiFilesUri tolerant to unknown variants, so that a client ignores the locations it does not support instead of failing.
How
- Add a catch-all variant to
MultiFilesUrifor the unknown variants - Implement a custom serde deserialization that maps any unknown variant to the catch-all (same approach as
SignedEntityTypeMessage, as#[serde(other)]only supports unit variants) - Make
expand_to_file_uriandexpand_for_immutable_file_numberofMultiFilesUrireturn an error for the catch-all variant - Skip the locations with an unknown URI variant in
ImmutablesMessagePart::sanitized_locations, so that the client library and the client CLI ignore them - Add a golden test with a message that holds an unknown varian
- Dominant language
- Rust
- Stars
- 155
- Forks
- 52
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IntersectMBO/mithril
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
IntersectMBO/mithril#1605 · 2 comments ·
Maintainers usually reply within 2 days
-
spike :satellite:
Difficulty 5/5 Over a week Newbie friendliness 10/100
IntersectMBO/mithril#3701 ·
Maintainers usually reply within 2 days
-
Publish a DNSLink record of the immutable archives IPNS name in the Mithril networks DNS zonesPossibly taken @jpraynaud claimed this 2 days ago. Openfeature :rocket:
IntersectMBO/mithril#3700 · 1 assignee ·
Maintainers usually reply within 2 days
-
feature :rocket:
Difficulty 4/5 3-5 days Newbie friendliness 25/100
IntersectMBO/mithril#3699 ·
Maintainers usually reply within 2 days
-
feature :rocket:
Difficulty 4/5 3-5 days Newbie friendliness 35/100
IntersectMBO/mithril#3698 ·
Maintainers usually reply within 2 days
All issues in IntersectMBO/mithril
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
storytold/photocraft#14822 ·
Maintainers usually reply within 1 day
-
bug css
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
dginev/latexml-oxide#853 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
[Bug] export_build_environment admits its output directory only after the export ran in the build computerPossibly taken @viniciusdsandrade claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day