Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
The goal of this pull-request is to remove
relay_cabi
,relay_ffi
andrelay_ffi_macros
and replace it with a more modern approach: pyo3. The proposed changes reduce the Python surface area of the implementation and implements most of the functionality in Rust, making maintenance a lot easier to the current approach.Limitations
Missing functionality:
validate_register_response
does not returnuuid
as Uuid type, but returns as a string. This is due to the limitation of pyo3.SecretKey
does not have a function calledpack
. This is due to the limitation of pyo3, since it requiresjson.dumps
to be called on an unknown JSON object. The lack of object signature knowledge results in the requirement of callingjson.dumps
on Python side.relay_store_normalizer_normalize_event
requires an object ofAnnotated<Event>
to be deserialized and serialized. Unfortunately, pyo3 doesn't support structs with generics. Therefore, deserializer/serializer can not be used, andnormalize_event
can not be implemented in a relatively easy way. This applies to several other functions such aspii_strip_event
.Todo
sentry_relay.validate_pii_selector
usage