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

[pull] master from erlang:master #211

Merged
merged 37 commits into from
Feb 10, 2025
Merged

[pull] master from erlang:master #211

merged 37 commits into from
Feb 10, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Feb 10, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Tests:

  • Refactor test suties to use common test case try macro.

bmk and others added 30 commits January 13, 2025 17:33
The documentation for intAgentTransports fixed.
Also corrected the file header (including its example) for the
agent config.
Add separate diametyer event logger module.
Improve use of the diameter event logger.
Also added more of same.

Also replaced use of the deprecated code:lib_dir/2 function
with own util function.
More tweaking to the block_unblock test case of the udp suite.
Also, *not* using the node created for the client (just use the
"current" node). The reason for this to get the debug printouts
from the inet driver in the shell.
Fixed a merge bug in the otp_18357 test case.
Make it possible to configure verbose or non-verbose
esock mutex(es) names.

OTP-19472
If an IN event is triggered in the poll thread just
as migration happens to scheduler polling, we should
just ignore that event as the scheduler poll will
get the same event.
Previosly versions was set through env variables, this have been
changed to be supplied via the calls to ssl.

To enable parallel test runs in the future.
Halfs the running time.
To simplify debugging add role in process dictionary.
* lukas/erts/fix-enif_select_scheduler:
  erts: Guard against IN events in poll thread
* lukas/stdlib/fix-zstd-debug-emulator:
  zstd: Fix tests in debug emulator
* isabell/stdlib/eval-doc-fix/OTP-19184:
  Fix since version for `erl_eval:new_bindings/1`
@pull pull bot added the ⤵️ pull label Feb 10, 2025
@pull pull bot merged commit 29138f5 into garazdawi:master Feb 10, 2025
Copy link

sourcery-ai bot commented Feb 10, 2025

Reviewer's Guide by Sourcery

This PR merges a wide range of changes from the erlang master branch. The changes include many updates to copyright dates across modules, significant refactoring in SSL/TLS and Diameter modules to use new transport configuration (shifting from protocol_opts to group_opts) and improved logging and error handling, addition of a new module (tls_socket_tcp.erl) to allow direct socket use for TLS, adjustments to test suites (including new transport_socket test groups, and changes to sleep values and option lists), as well as documentation updates with runtime code snippets for SNMP configuration. The diff also includes improvements in the esock NIF code with verbose mutex naming and helper functions.

Flow Diagram for SNMP Runtime Configuration Generation

flowchart TD
    A[Start SNMP Runtime Configuration] --> B[Generate Agent Config File]
    B --> C[Call snmpa_conf:write_agent_config]
    C --> D[Generate Context Config File]
    D --> E[Call snmpa_conf:write_context_config]
    E --> F[Generate Standard Config File]
    F --> G[Call snmpa_conf:write_standard_config]
    G --> H[Generate Community Config File]
    H --> I[Call snmpa_conf:write_community_config]
    I --> J[Generate VACM Config File]
    J --> K[Call snmpa_conf:write_vacm_config]
    K --> L[Generate USM Config File]
    L --> M[Call snmpa_conf:write_usm_config]
    M --> N[Generate Notify Config File]
    N --> O[Call snmpa_conf:write_notify_config]
    O --> P[Generate Target Address Config File]
    P --> Q[Call snmpa_conf:write_target_addr_config]
    Q --> R[Generate Target Params Config File]
    R --> S[Call snmpa_conf:write_target_params_config]
    S --> T[End SNMP Runtime Configuration]
Loading

File-Level Changes

Change Details Files
Update copyright and version information
  • Updated copyright dates from 2024 to 2025 in multiple files (e.g., snmp_log_SUITE.erl, ssl_api_SUITE.erl, diameter_util.erl, megaco_udp_SUITE.erl, etc.).
  • Adjusted version documentation in erl_anno.erl and references to OTP versions.
lib/snmp/test/snmp_log_SUITE.erl
lib/ssl/test/tls_api_SUITE.erl
lib/diameter/test/diameter_util.erl
lib/megaco/test/megaco_udp_SUITE.erl
lib/ssl/test/openssl_server_cert_SUITE.erl
lib/ssl/test/openssl_session_ticket_SUITE.erl
lib/ssl/test/openssl_client_cert_SUITE.erl
lib/diameter/test/diameter_failover_SUITE.erl
lib/diameter/test/diameter_capx_SUITE.erl
lib/diameter/test/diameter_dpr_SUITE.erl
lib/ssl/test/ssl_app_env_SUITE.erl
lib/ssl/test/ssl_session_SUITE.erl
lib/ssl/test/openssl_tls_1_3_version_SUITE.erl
erts/emulator/nifs/common/socket_util.c
lib/megaco/test/megaco_udp_SUITE.erl
lib/diameter/test/diameter_relay_SUITE.erl
Refactor SSL/TLS and Diameter configuration options
  • Converted configuration option handling from protocol_opts to group_opts in SSL modules and test suites.
  • Adjusted calls in functions for fetching and merging options (e.g., in ssl_session_SUITE.erl and tls_gen_connection modules).
  • Switching test modules to use updated group_opts, with new transport_socket groups introduced in multiple test suite groups (e.g. in ssl_payload_SUITE.erl, ssl_socket_SUITE.erl, openssl_renegotiate_SUITE.erl, etc.).
lib/ssl/test/ssl_session_SUITE.erl
lib/ssl/test/ssl_payload_SUITE.erl
lib/ssl/test/ssl_socket_SUITE.erl
lib/ssl/test/openssl_renegotiate_SUITE.erl
lib/ssl/src/ssl_config.erl
lib/ssl/test/openssl_session_ticket_SUITE.erl
lib/ssl/test/openssl_client_cert_SUITE.erl
lib/ssl/test/openssl_server_cert_SUITE.erl
lib/ssl/test/tls_1_3_version_SUITE.erl
lib/ssl/test/openssl_tls_1_3_version_SUITE.erl
lib/ssl/src/tls_record.erl
Add new module tls_socket_tcp.erl for direct socket operations
  • Introduced a new module (tls_socket_tcp.erl) that provides direct socket API wrappers for TLS/DTLS operations replacing some reliance on gen_tcp.
  • Implemented functions for setting options, retrieving statistics, peer and sockname information, connecting, and handling socket data.
  • Integrated new module usage in various TLS functions to pass socket options through direct socket operations.
lib/ssl/src/tls_socket_tcp.erl
Improve logging, error handling, and test logging messages
  • Modified logging macros in several modules from ?DBG/?DBG_LOG to ?IPRINT and ?SSL_LOG with adjusted log levels (e.g., from debug to info) for decryption errors.
  • Added detailed logging in test and connection modules (e.g., tls_sender.erl, tls_client_connection.erl, tls_gen_connection.erl) to capture function entry with ?FUNCTION_NAME and associated parameters.
  • Improved handling of DOWN messages and events in the new diameter_event_logger module.
lib/ssl/src/tls_gen_connection.erl
lib/ssl/src/tls_sender.erl
lib/diameter/test/diameter_event_logger.erl
lib/ssl/src/tls_client_connection.erl
lib/ssl/src/tls_server_connection_1_3.erl
Add and refactor Diameter event logger functionality
  • Added a new module (diameter_event_logger.erl) to manage event logging for Diameter events.
  • Implemented functions for registering and unregistering services with proper client monitoring and handling DOWN events.
  • Improved log formatting and added helper functions for formatting Diameter events.
lib/diameter/test/diameter_event_logger.erl
Enhance esock NIF code with verbose mutex names
  • Modified esock_mutex_create function in erts/emulator/nifs/common/socket_util.c to support verbose mutex names when ESOCK_VERBOSE_MTX_NAMES is enabled.
  • Added corresponding AC_ARG_ENABLE in configure files to support this build option.
erts/emulator/nifs/common/socket_util.c
erts/emulator/nifs/common/socket_int.h
erts/emulator/nifs/common/prim_socket_nif.c
erts/emulator/nifs/common/prim_socket_int.h
erts/configure.ac
Documentation updates with runtime code snippet examples
  • Added new code snippet examples to SNMP agent and manager configuration documentation files to demonstrate runtime generation of config files.
  • Updated formatting of configuration entries in snmp_agent_config_files.md and snmp_manager_config_files.md.
lib/snmp/doc/guides/snmp_agent_config_files.md
lib/snmp/doc/guides/snmp_manager_config_files.md
Miscellaneous test suite adjustments
  • Adjusted sleep durations and active option settings in SSL renegotiation and packet test suites.
  • Updated several test group definitions to include the new transport_socket group and mark many tests as parallel.
  • Minor refactoring and cleanup in test modules like zstd_SUITE.erl, gen_tcp_misc_SUITE.erl, and others.
lib/zstd_SUITE.erl
lib/kernel/test/gen_tcp_misc_SUITE.erl
lib/ssl/test/ssl_alpn_SUITE.erl
lib/ssl/test/ssl_cipher_suite_SUITE.erl
lib/ssl/test/ssl_reject_SUITE.erl
lib/ssl/test/ssl_renegotiate_SUITE.erl
lib/diameter/test/diameter_compiler_SUITE.erl
lib/diameter/test/diameter_relay_SUITE.erl
lib/diameter/test/diameter_dpr_SUITE.erl
lib/ssl/test/openssl_session_ticket_SUITE.erl
lib/ssl/test/openssl_tls_1_3_version_SUITE.erl
lib/ssl/test/ssl_packet_SUITE.erl
lib/ssl/test/ssl_mfl_SUITE.erl
lib/diameter/test/diameter_app_SUITE.erl
lib/diameter/test/diameter_relay_SUITE.erl
lib/ssl/test/ssl_app_env_SUITE.erl
lib/diameter/test/diameter_event_logger.erl

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants