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

⬆️ Update emqx/emqx to v5.8.5 #135

Merged
merged 1 commit into from
Feb 25, 2025
Merged

⬆️ Update emqx/emqx to v5.8.5 #135

merged 1 commit into from
Feb 25, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 25, 2025

This PR contains the following updates:

Package Update Change
emqx/emqx patch v5.8.4 -> v5.8.5

Release Notes

emqx/emqx (emqx/emqx)

v5.8.5: EMQX v5.8.5

Compare Source

Enhancements

Core MQTT Functionalities
  • #​14454 Introduced max_publish_rate option for the retainer. The option controls the maximum allowed rate of publishing retained messages in each node. Any messages published beyond this limit will still be delivered but will not be stored as retained.

    This option is useful to limit the load on the configured retained message storage.

  • #​14456 Introduced a simple firewall script, bin/emqx_fw, to protect EMQX listeners from SYN flooding attacks. This feature is available for Linux only.

  • #​14496 Added extra validation for the root_keys parameters in POST /data/export API. Now, invalid root keys will result in an error instead of being silently ignored.

Access Control
  • #​14494 Enhanced MongoDB authorization with support for complex queries.

    • Added support for the top-level $orderby operator in selector filter configuration, enabling sorting of query results in authorization checks.
    • Introduced skip and limit options for better pagination and control over query results in MongoDB-based authorization.
  • #​14570 Added support for using placeholders in HTTP Headers for HTTP Authentication and Authorization configurations.

  • #​14665 Added support for client attributes as ACL rule pre-conditions. You can now create ACL rules based on client attributes, allowing more fine-grained control over access.

    For example, the following rule allows clients with a "type" attribute set to "internal" to publish or subscribe to all topics:

    {allow, {client_attr, "type", "internal"}, all, ["#"]}.

    And the rule below denies clients with a "type" attribute prefixed with "external-" from publishi any messages:

    {deny, {client_attr, "type", {re, "external-.*"}}, publish, ["#"]}.

Rule Engine
  • #​14627 Added two new rule engine events: $events/sys/alarm_activated and $events/sys/alarm_deactivated. These are triggered when system alarms are activated and deactivated.
Data Integration
  • #​14404 Added support for specifying static clientids for MQTT Connector.
  • #​14450 Added support for setting no-local flag to MQTT Source. The no-local flag can now be configured in MQTT Source settings to prevent messages published by a client from being received by that same client.
  • #​14507 Added two new lightweight HTTP APIs: GET /actions_summary and GET /sources_summary. These new APIs provide a more concise overview of actions and sources, similar to the existing GET /actions and GET /sources APIs, but without returning the full configurations of the entities, making them faster and less resource-intensive.
Observability
  • #​14437 Added two new gauges to Prometheus output: emqx_vm_mnesia_tm_mailbox_size and emqx_vm_broker_pool_max_mailbox_size. These gauges track the mailbox sizes of internal EMQX processes that can indicate system overload. Additionally, alarms will be raised when mailbox sizes surpass certain high watermarks.
  • #​14645 Added more log messages to help debug fetching Certificate Revocation Lists (CRLs) for the first time (before they are cached and refreshed automatically). Successes and failures are logged at debug and warning levels, respectively.
  • #​14656 Enhanced Prometheus push to support more metrics and allow the cluster name to be used as a variable name for the Job label.
MQTT over QUIC
  • #​14583 The QUIC listener now supports dumping TLS secrets to the SSLKEYLOGFILE environment variable, enabling tools like Wireshark to decrypt live or captured QUIC traffic. This allows for decoding MQTT packets within the QUIC traffic.

    Example configuration:
    EMQX_LISTENERS__QUIC__DEFAULT__SSLKEYLOGFILE=/tmp/EMQX_SSLKEYLOGFILE

    Note: This is a hidden configuration intended for troubleshooting purposes only.

  • #​14597 Asynchronous abort stream read during connection termination.

    In scenarios where a session is "taken over", "discarded", or "kicked", the previous connection termination process involved a graceful stream shutdown. This could result in blocking delays of up to 3 seconds if the old client was unresponsive.

    This issue occurred because graceful shutdown relies on cooperative signaling between both endpoints, ensuring the MQTT.DISCONNECT packet is delivered to the peer before the transport is closed. If the peer was unresponsive, this approach caused unnecessary delays.

    With this improvement, the stream is now half-closed during termination. The read (recv) operation aborted, while the write (send) operation remains open. This adjustment ensures that the MQTT.DISCONNECT packet is still delivered to the peer, properly signaling the shutdown, without unnecessary delays.

    Benefits:

    • Reduces blocking times when the peer is unreachable or unresponsive.
    • Maintains proper notification of the termination process to the peer, improving the overall connection shutdown behavior.
    • Reduces the latency in the session takeover sand the clean-start scenarios (e.g, discard).

Bug Fixes

Core MQTT Functionalities
  • #​14405 Converted 256MB to 268435455 bytes for mqtt.max_packet_size.

    EMQX previously allowed setting 256MB for mqtt.max_packet_size config, which is in fact one byte more than what the protocol specification allows. For backward compatibility, mqtt.max_packet_size=256MB is still allowed from configurations but will be silently converted to 268435455.

  • #​14508 Improved the EMQX performance when large numbers of clients reconnect.

  • #​14608 Enforced First-In-First-Out (FIFO) semantics in MQTT session message queue. The MQTT session message queue now strictly follows FIFO semantics when it reaches its capacity. When the queue is full, the oldest message will be dropped first.

  • #​14609 Corrected high memory threshold for overload protection to use sysmon.os.sysmem_high_watermark. The high memory threshold is now properly updated during the boot process or whenever sysmon.os.sysmem_high_watermark is changed. This ensures the memory overload protection threshold is dynamic and reflects changes to the system memory settings.

  • #​14654 Clients can now reconnect successfully even if the maximum session limit has been reached, as long as their previous sessions remain active (i.e., not expired or cleaned up).

  • #​14588 Improved memory usage reporting when EMQX runs in a containerized environment. In containerized environments like Amazon Elastic Kubernetes Service (AWS EKS), the accuracy of memory usage readings can be influenced by factors such as the host kernel version, cgroup version, and how the container management service mounts cgroupfs. This update improves the accuracy of memory usage reporting when EMQX runs in AWS EKS, specifically addressing discrepancies caused by the container environment.

Authentication
  • #​14585 Fixed an issue where password hash comparisons were case-sensitive, which could lead to authentication failures, especially when integrating with external systems that may store passwords with different case conventions. Now, password hashes will be compared in a case-insensitive manner, improving compatibility and reliability when EMQX authenticates users against external sources.
Gateway
  • #​14484 Fixed an issue where the Exproto gateway did not support using hostname in the server endpoint.

  • #​14489 Fixed issue where accessing the api/v5/gateways endpoint resulted in a 500 error if the gateway was not enabled on the node in the cluster. Now, such requests return a more appropriate response, preventing crashes and improving the stability of the API in these scenarios.

  • #​14501 Fixed issue where the gateway client query HTTP API always returned a keepalive value of 0. The correct keepalive value is now returned by the HTTP API, and the gateway adheres to the configured idle timeout, properly reflecting the client's heartbeat settings.

  • #​14503 Returns an empty list instead of a 404 error if no listener exists at the gateway. Previously, when accessing the listeners page of a gateway (such as LwM2M) through the API, a 404 error would be returned if no listeners were configured. This fix changes the behavior to return an empty list when no listeners exist.

  • #​14511 Eliminated unnecessary log printing by the Stomp gateway when client authentication fails.

  • #​14653 Fixed stomp gateway keepalive behavior. Previously, the STOMP connection's heartbeat mechanism would fail to keep the connection alive if the heartbeat packet was received slightly after the check timer. This update introduces tolerance for minor delays, ensuring that the connection will stay alive. On average, the connection closure now occurs at approximately 1.5 times the heartbeat interval, providing more reliable keepalive functionality.

Data Integration
  • #​14518 This update ensures that Connectors are now started asynchronously when loading from configuration, whether via CLI or HTTP API. Previously, if a connector hung during startup, it could cause the entire configuration import process to time out.

    Additionally, connectors are now started asynchronously when (re)starting a node, resulting in faster boot-up times. This release also fixes a potential issue where a Source could be added to the configuration before its corresponding Connector, ensuring correct initialization order during configuration import.

  • #​14550 Fixed an issue where MQTT clients in the connection pool of an MQTT Connector would fail to reconnect automatically if only a few clients were disconnected. The fix ensures clients are automatically reconnected when disconnected, improving connection reliability.

  • #​14555 Fixed an issue with MQTT Source where shared topics were not properly unsubscribed from when a source was removed or updated.

  • #​14671 Fixed an issue in MQTT Action. Before the fix, messages could fail to be sent or retried due to a rare race condition when the MQTT Connector's connection was closed. This update ensures that TCP connection closures (tcp_closed) and client disconnections are handled as recoverable errors.

  • #​14695 Improved HTTP API error messages when attempting to update a Connector and a validation error occurs.

  • #​14697 Fixed a problem in which, when a Source and an Action shared the same name and used the same connector, one could not delete the Action or Source if there were rule dependencies on the dual Source/Action.

Clustering
  • #​14536 Fixed rare race condition in cluster management operations. Before the fix, the race condition caused certain cluster management operations to hang, making cluster changes impossible until a node restarts. This issue was addressed by tightening the global lock guarding mria:join/1 operations. The stricter locking prevents concurrent joins from interfering with each other.

  • #​14548 Fixed an issue where a node would crash during reboot if a new node joined the cluster while it was down, resulting in a ** FATAL ** Failed to merge schema: {aborted,function_clause} error. This fix ensures that nodes can now restart smoothly without requiring a rejoin to the cluster.

  • #​14662 Fixed an issue where a running replicant node, after rejoining a cluster in which all core nodes had their internal databases wiped, would fail to participate in certain Remote Procedure Call (RPC) call operations.

Administration
  • #​14543 Fixed an internal compatibility issue that caused certain ExHooks to crash when clients were connected through WS, WSS, or Gateway listeners.

Breaking changes

  • #​14703 Introduced a change to the maximum allowed value for force_shutdown.max_heap_size, which is now set to 128GB. If the max_heap_size was previously set to a value exceeding 128GB, this could lead to issues after upgrading, such as during configuration reloading or updates.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added dependencies Upgrade or downgrade of project dependencies. no-stale This issue or PR is exempted from the stable bot. labels Feb 25, 2025
Copy link

coderabbitai bot commented Feb 25, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@frenck frenck merged commit fe78723 into main Feb 25, 2025
21 checks passed
@renovate renovate bot deleted the renovate/emqx-emqx-5.x branch February 25, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Upgrade or downgrade of project dependencies. no-stale This issue or PR is exempted from the stable bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant