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

Parse fixes #12

Merged
merged 8 commits into from
Jan 3, 2025
Merged

Parse fixes #12

merged 8 commits into from
Jan 3, 2025

Conversation

arkavo-com
Copy link
Contributor

@arkavo-com arkavo-com commented Jan 2, 2025

NATS Message Handling Improvements

  • Added a payload size check in the NATS handler to dynamically set the message type, addressing inconsistencies with large messages and aligning processing with expected policies.
  • Renamed handle_nats_event to handle_nats for improved clarity and simplified message type determination logic.

Runtime and Build Optimizations

  • Configured Tokio runtime with worker_threads set to 4 for better control over threading.
  • Increased codegen-units to 16 in the release profile for faster build times.
  • Updated flatbuffers to version 24.12.23 to incorporate the latest features and fixes.

Schema and Code Cleanup

  • Removed unnecessary attributes and redundant imports from generated FlatBuffers schema files, improving maintainability and readability.
  • Added #![allow(clippy::all)] directive to suppress Clippy lints in auto-generated schema files, reducing noise during development.

Debugging and Metadata Enhancements

  • Enabled metadata debugging in embedded policy handling:
    • Logged metadata buffer size, contents, and processed metadata for better visibility and issue tracing.

Miscellaneous

  • Ensured dependency updates maintain compatibility and stability.

Simplified TLS file paths by removing unnecessary relative segments. Improved the README installation guide for clarity and updated instructions for key generation. Bumped Rust version to 1.83.0, updated crate dependencies, and removed unused `zeroize`.
Added a size validation check for event payloads to ensure they do not exceed the maximum allowed size. Introduced improved logging to display the first 20 bytes of the payload in hexadecimal format for debugging purposes. Gracefully handle parsing failures with error messages and early returns.
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Introduce a payload size check to dynamically set the message type, addressing inconsistencies with large messages. This mitigates potential issues with handling message size and aligns processing with expected policies.
Renamed `handle_nats_event` to `handle_nats` for clarity and updated related logic. Simplified message type determination by replacing redundant comments and conditions.
Set `worker_threads` to 4 in the Tokio runtime initialization for better control over thread usage. Removed unnecessary attributes and redundant imports in generated FlatBuffers schema files, improving code maintainability and readability.
Increased `codegen-units` to 16 in release profile for faster builds. Updated `flatbuffers` to version 24.12.23 to include the latest enhancements and fixes. Ensured other dependencies remain consistent for compatibility.
Added print statements to log metadata buffer size, contents, and processed metadata during embedded policy handling. These changes improve visibility and aid in debugging metadata-related issues.
This change adds `#![allow(clippy::all)]` to suppress Clippy lints in files generated by the FlatBuffers compiler. These files are auto-generated, so manual linting is unnecessary and could lead to noise during development.
Copy link

sonarqubecloud bot commented Jan 3, 2025

@arkavo-com arkavo-com marked this pull request as ready for review January 3, 2025 23:29
@arkavo-com arkavo-com changed the title fix/parse Parse fixes Jan 3, 2025
@arkavo-com arkavo-com merged commit 855bd4c into main Jan 3, 2025
6 checks passed
@arkavo-com arkavo-com deleted the fix/parse branch January 3, 2025 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant