Skip to content

Conversation

bneradt
Copy link
Contributor

@bneradt bneradt commented Aug 29, 2025

Note that this builds on top of #12198, so feel free to ignore that commit when reviewing this. I kept the units of work separate to make this specific cripts work easier to review.


This updates our build system to be able to make pre-compiled cripts.
Thus, adding a cript is now as easy as adding a plugin. Simply use
add_cript instead of add_atsplugin in CMakeLists.txt, and it will build
your cript for you.

As a part of this, this adds connection_exempt_list.cript, our first
cript plugin that sets the per client exempt list.

@bneradt bneradt added this to the 10.2.0 milestone Aug 29, 2025
@bneradt bneradt requested review from zwoop and Copilot August 29, 2025 18:19
@bneradt bneradt self-assigned this Aug 29, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for pre-compiled cript plugins and introduces a connection exempt list cript that manages per-client connection limit exemptions. The PR extends the build system to support cripts as first-class plugins and creates infrastructure for managing client connection exemptions through both configuration files and YAML-based plugins.

Key changes include:

  • Build system updates to support pre-compiled cripts via the add_cript CMake function
  • New connection exempt list functionality with API functions and configuration options
  • Comprehensive test coverage for exempt list scenarios with both inline and file-based configurations

Reviewed Changes

Copilot reviewed 30 out of 32 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cmake/add_cript.cmake Adds CMake function to build pre-compiled cript plugins
plugins/experimental/connection_exempt_list/connection_exempt_list.cript New cript plugin for loading exempt lists from YAML files
src/iocore/net/ConnectionTracker.cc Core logic for client connection exempt list management
include/ts/ts.h Public API functions for managing connection exempt lists
tests/gold_tests/client_connection/per_client_connection_max.test.py Expanded test coverage for exempt list functionality
src/records/RecordsConfig.cc New configuration record for exempt list setting
tools/clang-format.sh Formatting support for .cript files
Documentation files API and admin documentation for new features

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@bneradt bneradt force-pushed the per_client_connection_ignore_list_cript branch from ea40a23 to e5413cf Compare August 29, 2025 18:36
This implements
proxy.config.http.per_client.connection.exempt_list, a
configuration for the user to be able to provide a set of IP addresses
that are not counted against
proxy.config.net.per_client.max_connections_in.

This also adds the following TS APIs to modify this list via a plugin:

TSConnectionLimitExemptListSet
TSConnectionLimitExemptListAdd
TSConnectionLimitExemptListClear
This updates our build system to be able to make pre-compiled cripts.
Thus, adding a cript is now as easy as adding a plugin. Simply use
add_cript instead of add_atsplugin in CMakeLists.txt, and it will build
your cript for you.

As a part of this, this adds connection_exempt_list.cript, our first
cript plugin that sets the per client exempt list.
@bneradt bneradt force-pushed the per_client_connection_ignore_list_cript branch from e5413cf to ba8384f Compare September 6, 2025 16:36
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.

1 participant