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

Disable C version of cbor2 loading #1356

Merged
merged 7 commits into from
Jan 29, 2024
Merged

Disable C version of cbor2 loading #1356

merged 7 commits into from
Jan 29, 2024

Conversation

itamarst
Copy link
Collaborator

@itamarst itamarst commented Jan 24, 2024

Fixes https://tahoe-lafs.org/trac/tahoe-lafs/ticket/4088

Update: switched to Rust-based deserialization. I'm hoping to make it run faster, too, in an upcoming release (right now it needs to parse CBOR twice, but that's fixable).

@itamarst itamarst requested a review from meejah January 24, 2024 13:14
meejah
meejah previously approved these changes Jan 24, 2024
Copy link
Contributor

@meejah meejah left a comment

Choose a reason for hiding this comment

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

LGTM

@itamarst
Copy link
Collaborator Author

I actually have CBOR deserialization working in Rust, which won't have the downside of being much slower, so maybe I'll update the PR to use that?

@itamarst itamarst requested a review from meejah January 24, 2024 18:57
@coveralls
Copy link
Collaborator

coveralls commented Jan 24, 2024

Coverage Status

coverage: 94.742%. first build
when pulling f2f7c1d on 4088-disable-c-cbor2
into 2cc9cea on master.

@itamarst itamarst dismissed meejah’s stale review January 24, 2024 21:51

Updated the code

@itamarst
Copy link
Collaborator Author

Apparently pycddl isn't working on PyPy 😢

@itamarst
Copy link
Collaborator Author

Going to have to figure out what's up with PyPy, at first glance it seems like a PyO3 bug, will see.

@meejah
Copy link
Contributor

meejah commented Jan 25, 2024

Obviously we don't want to break PyPy for this, but otherwise looks fine

@itamarst
Copy link
Collaborator Author

PyPy will be fixed with pycddl 0.6.1, hopefully will update PR tomorrow.

@itamarst
Copy link
Collaborator Author

enarx/ciborium#97 implies some potential issues with the underlying Rust CBOR library, but...

  1. I can't reproduce any issues with extensive Hypothesis testing (just run 40K examples).
  2. We're relying on it for CDDL schema validation, so if it errors on valid CBOR we'd have issues on schema validation too.

So 🤷

@itamarst
Copy link
Collaborator Author

Errors seem... unrelated? Will rerun when final ones finish.

Copy link
Contributor

@meejah meejah left a comment

Choose a reason for hiding this comment

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

👍

@itamarst itamarst merged commit 684c7bb into master Jan 29, 2024
34 of 36 checks passed
@itamarst itamarst deleted the 4088-disable-c-cbor2 branch January 29, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants