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

errors: remove ParseError #1054

Merged
merged 30 commits into from
Sep 26, 2024
Merged

Commits on Sep 23, 2024

  1. f_errors: QueryParametersSerializationError

    Introduced an error type returned by QueryParameters::serialize.
    muzarski committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    b3738e0 View commit details
    Browse the repository at this point in the history
  2. f_errors: QuerySerializationError

    Introduced an error type to give more context for errors returned
    by Query::serialize.
    muzarski committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    ff66c0d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7f274de View commit details
    Browse the repository at this point in the history
  4. f_errors: PrepareSerializationError

    Introduced an error type to give more context for errors returned
    by Prepare::serialize.
    muzarski committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    4d0262f View commit details
    Browse the repository at this point in the history
  5. f_errors: BatchSerializationError

    Introduced an error type to give more context for errors returned
    by Batch::serialize.
    muzarski committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    cc6be0f View commit details
    Browse the repository at this point in the history
  6. f_errors: AuthResponseSerializationError

    Introduced an error type to give more context for errors returned
    by AuthResponse::serialize.
    muzarski committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    df703bd View commit details
    Browse the repository at this point in the history
  7. f_errors: RegisterSerializationError

    Introduced an error type to give more context for errors returned
    by Register::serialize.
    muzarski committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    24cefd0 View commit details
    Browse the repository at this point in the history
  8. f_errors: StartupSerializationError

    Introduced an error type to give more context for errors returned
    by Startup::serialize.
    muzarski committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    f597865 View commit details
    Browse the repository at this point in the history
  9. f_errors: CqlRequestSerializationError

    Introduced an error type to be returned by an implementations of
    SerializableRequest trait.
    muzarski committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    33b8472 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. f_errors: encapsulate snap errors

    Replace `FrameError::Frame(De)compression` variants
    which give no additional context with errors returned from
    snap library.
    
    Notice that we do not want to introduce `snap::Error` type to public
    API in case we ever want to bump snap library version in the future.
    This is why we provide additional context with Arc<dyn Error>.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7cb971b View commit details
    Browse the repository at this point in the history
  2. f_errors: remove lz4 compression error variant

    lz4 compression cannot fail in our case, and so we never
    return the error variant with lz4 compression failure.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    87dbcde View commit details
    Browse the repository at this point in the history
  3. f_errors: extract serialization errors from FrameError

    The most important thing is that we narrow the return error type
    of SerializedRequest::make from FrameError to CqlRequestSerializationError.
    
    We remove both `CqlRequestSerializationError` and `SnapCompressError` variants
    from FrameError. `SnapCompressError` variant is now moved to `CqlRequestSerializationError`.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    706b81e View commit details
    Browse the repository at this point in the history
  4. f_errors: remove ParseError from FrameError

    Replaced FrameError::Parse with multiple variants which provide
    more context.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    959b8b1 View commit details
    Browse the repository at this point in the history
  5. f_errors: replace StdIoError with variants

    Added more context to std::io::Errors in FrameDeserializationError.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    a84edb2 View commit details
    Browse the repository at this point in the history
  6. f_errors: FrameHeaderParseError

    This is a new error type returned from frame::read_response_frame.
    We extracted FrameError variants that were originally constructed
    there, and moved them to new error type.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    0af67b8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    21dc0b7 View commit details
    Browse the repository at this point in the history
  8. scylla-cql: remove lz4_flex DecompressError from public API

    lz4_flex crate is unstable - we need to replace the direct
    usage of this type with `Arc<dyn Error>`.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    9a79987 View commit details
    Browse the repository at this point in the history
  9. f_errors: make FrameBodyExtensionsParseError clonable

    We ultimately want to include FrameBodyExtensionsParseError in QueryError, which needs
    to be clonable.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    6039ded View commit details
    Browse the repository at this point in the history
  10. errors: wrap FrameBodyExtensionsParseError in QueryError

    Until now, the FrameErrors were stringified. This commit changes that.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    faa3a93 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    777ccb0 View commit details
    Browse the repository at this point in the history
  12. errors: remove unused CqlTypeError

    This error type is not constructed anywhere. It can be removed.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    9db7eca View commit details
    Browse the repository at this point in the history
  13. f_errors: remove unused ParseError variants

    Because of the previous changes, there were some unused ParseError
    variants which we can get rid of. This cleans up a bit, and helps us
    to see what variants are actually used and need to be removed later.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    e609444 View commit details
    Browse the repository at this point in the history
  14. request: introduce RequestDeserializationError

    ParseError was abused in testing as well. DeserializableRequest is a trait
    mainly used by `scylla-proxy`. Previously, it returned `ParseError`.
    
    This commit introduces a new error type, designed for this specific case.
    It does not provide much context, as it is not intended to be used
    by the users.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    857fc06 View commit details
    Browse the repository at this point in the history
  15. LegacySerValues: remove unused test util function

    This function is not used anywhere. It contains the last usage of
    `std::io::Error` -> `ParseError` mapping. Let's get rid of that.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    e69d9f7 View commit details
    Browse the repository at this point in the history
  16. f_errors: remove io error variant from ParseError

    It is not used anymore. We got rid of yet another variant from ParseError.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    50180d0 View commit details
    Browse the repository at this point in the history
  17. f_errors: remove TryFromInt to ParseError conversion

    We removed last usages of this conversion from scylla-proxy.
    This allows us to remove the From impl.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    4482a24 View commit details
    Browse the repository at this point in the history
  18. f_errors: remove BadIncomingData from ParseError

    We remove last usage (an impl) of this variant.
    
    This variant was the most awful, since it stringified many errors.
    We fortunately can remove it now.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f7585f6 View commit details
    Browse the repository at this point in the history
  19. f_errors: remove LLDeserError from ParseError

    Removed last usages of ParseError from scylla-proxy.
    This allows us to remove LowLevelDeserializationError variant from ParseError.
    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    2ea9b45 View commit details
    Browse the repository at this point in the history
  20. f_errors: remove ParseError

    muzarski committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    418c5ed View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    62c661b View commit details
    Browse the repository at this point in the history