(trafficserver) branch master updated (d733ed0eea -> 1c37f7ab7e)

2024-03-11 Thread maskit
This is an automated email from the ASF dual-hosted git repository.

maskit pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


from d733ed0eea [Fuzzing] Add fuzzing harness for `HTTP3Frame` (#11128)
 add 1c37f7ab7e cmake: Link pcre2 to src/api (#11120)

No new revisions were added by this update.

Summary of changes:
 src/api/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



(trafficserver) branch master updated: Fix a couple misspellings (#11137)

2024-03-11 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 5d6f2f6c05 Fix a couple misspellings (#11137)
5d6f2f6c05 is described below

commit 5d6f2f6c05582a0342e1034f9719df3715e9f679
Author: Brian Neradt 
AuthorDate: Mon Mar 11 17:38:43 2024 -0400

Fix a couple misspellings (#11137)
---
 doc/admin-guide/files/records.yaml.en.rst | 2 +-
 plugins/experimental/stale_response/stale_response.cc | 2 +-
 tests/gold_tests/tls/tls_sni_ip_allow.test.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/admin-guide/files/records.yaml.en.rst 
b/doc/admin-guide/files/records.yaml.en.rst
index 93da31b31d..34c6b91448 100644
--- a/doc/admin-guide/files/records.yaml.en.rst
+++ b/doc/admin-guide/files/records.yaml.en.rst
@@ -4596,7 +4596,7 @@ HTTP/2 Configuration
:reloadable:
:units: bytes
 
-   Specifies the high water mark for all HTTP/2 frames on an outoging 
connection.
+   Specifies the high water mark for all HTTP/2 frames on an outgoing 
connection.
Default is -1 to preserve existing water marking behavior.
 
You can override this global setting on a per domain basis in the 
:file:`sni.yaml` file using the :ref:`http2_buffer_water_mark 
` attribute.
diff --git a/plugins/experimental/stale_response/stale_response.cc 
b/plugins/experimental/stale_response/stale_response.cc
index 4ef7626879..a4c81649d4 100644
--- a/plugins/experimental/stale_response/stale_response.cc
+++ b/plugins/experimental/stale_response/stale_response.cc
@@ -340,7 +340,7 @@ get_cached_header_info(StateInfo *state)
   chi->date= 0;
   chi->max_age = 0;
 
-  // -1 is used as a placeholder for teh following two meaning that their
+  // -1 is used as a placeholder for the following two meaning that their
   // respective directives were not in the Cache-Control header.
   chi->stale_while_revalidate = -1;
   chi->stale_if_error = -1;
diff --git a/tests/gold_tests/tls/tls_sni_ip_allow.test.py 
b/tests/gold_tests/tls/tls_sni_ip_allow.test.py
index c567689c25..739bbf00cc 100644
--- a/tests/gold_tests/tls/tls_sni_ip_allow.test.py
+++ b/tests/gold_tests/tls/tls_sni_ip_allow.test.py
@@ -144,7 +144,7 @@ class TestSniIpAllow:
 # non-zero return code.
 p.ReturnCode = 1
 
-p.Streams.All += Testers.ContainsExpression('allowed-response', 'The 
response to teh allowed request should be recieved.')
+p.Streams.All += Testers.ContainsExpression('allowed-response', 'The 
response to the allowed request should be recieved.')
 p.Streams.All += Testers.ExcludesExpression(
 'blocked-response', 'The response to the blocked request should 
not have been recieved.')
 



(trafficserver) branch master updated (5d6f2f6c05 -> d733ed0eea)

2024-03-11 Thread kichan
This is an automated email from the ASF dual-hosted git repository.

kichan pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


from 5d6f2f6c05 Fix a couple misspellings (#11137)
 add d733ed0eea [Fuzzing] Add fuzzing harness for `HTTP3Frame` (#11128)

No new revisions were added by this update.

Summary of changes:
 tests/fuzzing/CMakeLists.txt   |  3 ++
 .../{fuzz_proxy_protocol.cc => fuzz_http3frame.cc} | 35 +++---
 tests/fuzzing/oss-fuzz.sh  | 26 +++-
 3 files changed, 53 insertions(+), 11 deletions(-)
 copy tests/fuzzing/{fuzz_proxy_protocol.cc => fuzz_http3frame.cc} (65%)



(trafficserver-ci) branch main updated: ensure all scripts use bash, make nproc more cross platform (#323)

2024-03-11 Thread bnolsen
This is an automated email from the ASF dual-hosted git repository.

bnolsen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git


The following commit(s) were added to refs/heads/main by this push:
 new c2d78d0  ensure all scripts use bash, make nproc more cross platform 
(#323)
c2d78d0 is described below

commit c2d78d0b02fb0750b45f762ea2bd7b2c866306b2
Author: Brian Olsen 
AuthorDate: Mon Mar 11 06:20:44 2024 -0600

ensure all scripts use bash, make nproc more cross platform (#323)
---
 jenkins/bin/autest.sh |  4 ++--
 jenkins/bin/autotools.sh  |  2 +-
 jenkins/bin/cache-tests.sh|  2 +-
 jenkins/bin/clang-analyzer.sh |  4 ++--
 jenkins/bin/cleanup.sh|  2 +-
 jenkins/bin/cmake.sh  |  4 ++--
 jenkins/bin/cmake_basic.sh|  4 ++--
 jenkins/bin/coverity.sh   |  4 ++--
 jenkins/bin/docs.sh   |  4 ++--
 jenkins/bin/environment.sh|  4 ++--
 jenkins/bin/extract.sh|  2 +-
 jenkins/bin/format.sh |  4 ++--
 jenkins/bin/gh-mirror.sh  |  2 +-
 jenkins/bin/github.sh |  2 +-
 jenkins/bin/in_tree.sh|  2 +-
 jenkins/bin/out_of_tree.sh|  2 +-
 jenkins/bin/quiche.sh |  4 ++--
 jenkins/bin/rat.sh|  2 +-
 jenkins/bin/regression.sh | 10 +-
 jenkins/bin/snapshot.sh   |  2 +-
 20 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/jenkins/bin/autest.sh b/jenkins/bin/autest.sh
index f684a0f..389ecf7 100755
--- a/jenkins/bin/autest.sh
+++ b/jenkins/bin/autest.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
@@ -21,7 +21,7 @@ set +x
 cd src
 #sleep 30
 
-NPROC=$(nproc)
+NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)}
 
 git branch --contains ${ghprbActualCommit} > /dev/null
 if [ $? = 0 -a ! -z "$ghprbActualCommit" ]; then
diff --git a/jenkins/bin/autotools.sh b/jenkins/bin/autotools.sh
index 6f31766..974a5b5 100755
--- a/jenkins/bin/autotools.sh
+++ b/jenkins/bin/autotools.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
diff --git a/jenkins/bin/cache-tests.sh b/jenkins/bin/cache-tests.sh
index 21771f9..3d39b19 100755
--- a/jenkins/bin/cache-tests.sh
+++ b/jenkins/bin/cache-tests.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
diff --git a/jenkins/bin/clang-analyzer.sh b/jenkins/bin/clang-analyzer.sh
index 8827ee0..30bcb9b 100755
--- a/jenkins/bin/clang-analyzer.sh
+++ b/jenkins/bin/clang-analyzer.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
@@ -21,7 +21,7 @@ set -e
 
 grep -q 80010 configure.ac && echo "8.1.x branch detected, stop here!" && exit 0
 
-NPROC=$(nproc)
+NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)}
 
 WORKSPACE="${WORKSPACE:-..}"
 GITHUB_BRANCH="${GITHUB_BRANCH:-master}"
diff --git a/jenkins/bin/cleanup.sh b/jenkins/bin/cleanup.sh
index 39c3de0..4c64334 100755
--- a/jenkins/bin/cleanup.sh
+++ b/jenkins/bin/cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
diff --git a/jenkins/bin/cmake.sh b/jenkins/bin/cmake.sh
index c3f69cc..82f9c49 100755
--- a/jenkins/bin/cmake.sh
+++ b/jenkins/bin/cmake.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
@@ -21,7 +21,7 @@
 set -x
 set -e
 
-NPROC=$(nproc)
+NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)}
 
 if [ ! -d cmake ]
 then
diff --git a/jenkins/bin/cmake_basic.sh b/jenkins/bin/cmake_basic.sh
index 2d9e33b..d8e79b2 100755
--- a/jenkins/bin/cmake_basic.sh
+++ b/jenkins/bin/cmake_basic.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
@@ -20,7 +20,7 @@
 
 set -x
 
-NPROC=$(nproc)
+NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)}
 
 if [ ! -d cmake ]
 then
diff --git a/jenkins/bin/coverity.sh b/jenkins/bin/coverity.sh
index dbfb222..67501e8 100755
--- a/jenkins/bin/coverity.sh
+++ b/jenkins/bin/coverity.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
@@ -18,7 +18,7 @@
 
 cd "${WORKSPACE}/src"
 
-NPROC=$(nproc)
+NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)}
 
 # Get the Coverity tools into our path
 source /opt/rh/devtoolset-7/enable
diff 

(trafficserver) 02/09: Coverity fixes. CID 1534726 , CID 1534745, CID1534723 (#11111)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 22671842ce36b0ced1373742b69b9f3220bca3bd
Author: Damian Meden 
AuthorDate: Thu Mar 7 10:21:36 2024 +0100

Coverity fixes. CID 1534726 ,  CID 1534745, CID1534723 (#1)

- CID 1534726  COPY_INSTEAD_OF_MOVE (COPY_INSTEAD_OF_MOVE)
- CID 1534745  COPY_INSTEAD_OF_MOVE (COPY_INSTEAD_OF_MOVE)
- CID1534723

(cherry picked from commit bfde4098870e1734b749c453aecc2879119fc2fd)
---
 plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h | 2 +-
 plugins/experimental/txn_box/unit_tests/CMakeLists.txt  | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h 
b/plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h
index c45614ce80..14c306e2b0 100644
--- a/plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h
+++ b/plugins/experimental/txn_box/plugin/include/txn_box/accl_util.h
@@ -65,7 +65,7 @@ template  class StringTree
 using self_type = Node;
 using ptr_type  = self_type *;
 
-Node(Key k, Value v, int32_t r = -1) : key{k}, value{v}, rank{r}
+Node(Key k, Value v, int32_t r = -1) : key{std::move(k)}, 
value{std::move(v)}, rank{r}
 {
   left  = this;
   right = this;
diff --git a/plugins/experimental/txn_box/unit_tests/CMakeLists.txt 
b/plugins/experimental/txn_box/unit_tests/CMakeLists.txt
index cc20499658..02665ca8e7 100644
--- a/plugins/experimental/txn_box/unit_tests/CMakeLists.txt
+++ b/plugins/experimental/txn_box/unit_tests/CMakeLists.txt
@@ -28,7 +28,5 @@ target_link_libraries(
 )
 # After fighting with CMake over the include paths, it's just not worth it to 
be correct.
 # target_link_libraries should make this work but it doesn't. I can't figure 
out why.
-# target_include_directories(test_txn_box PRIVATE ../../plugin/include)
 target_include_directories(test_txn_box PUBLIC 
${CMAKE_CURRENT_SOURCE_DIR}/../plugin/include)
-# target_include_directories(test_txn_box PRIVATE ../../plugin/include 
${trafficserver_INCLUDE_DIRS})
 add_test(NAME test_txn_box COMMAND test_txn_box)



(trafficserver) 01/09: NOT_WRITE_AVAIL: schedule event to resend data frames (#11094)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 71787ff1b0b23cdf58ff9dfdc267ba29ea869af1
Author: Brian Neradt 
AuthorDate: Tue Mar 5 11:27:54 2024 -0500

NOT_WRITE_AVAIL: schedule event to resend data frames (#11094)

When sending a DATA frames, we check that we are not exceeding our write
buffer's high water mark. If so, we don't write the frame.
Unfortunately, before this patch, no event was scheduled to come back
and try to resend any unwritten frames. This led to dropped frames at
times. This patch adds a scheduled event to later re-try sending the
unsent frames.

This patch also updates the grpc.test.py to send 100 messages instead of
1 which, at least on my local system, reproduced this issue.

(cherry picked from commit df078fb14745be946b4599fc0d64a397c761763e)
---
 include/proxy/http2/Http2CommonSession.h   | 10 +++--
 include/proxy/http2/Http2ConnectionState.h |  6 ++-
 include/proxy/http2/Http2Stream.h  |  4 +-
 src/proxy/http2/Http2ConnectionState.cc| 42 
 src/proxy/http2/Http2Stream.cc |  2 +-
 tests/gold_tests/h2/grpc/grpc.test.py  | 25 +---
 tests/gold_tests/h2/grpc/grpc_client.py| 61 --
 tests/gold_tests/h2/grpc/grpc_server.py| 54 +++---
 tests/gold_tests/h2/grpc/simple.proto  |  6 ++-
 9 files changed, 162 insertions(+), 48 deletions(-)

diff --git a/include/proxy/http2/Http2CommonSession.h 
b/include/proxy/http2/Http2CommonSession.h
index 9f9b7e53b3..f24ee8b094 100644
--- a/include/proxy/http2/Http2CommonSession.h
+++ b/include/proxy/http2/Http2CommonSession.h
@@ -34,15 +34,17 @@
 // HTTP2_SESSION_EVENT_INIT   Http2CommonSession *  HTTP/2 session is born
 // HTTP2_SESSION_EVENT_FINI   Http2CommonSession *  HTTP/2 session is ended
 // HTTP2_SESSION_EVENT_RECV   Http2Frame *  Received a frame
-// HTTP2_SESSION_EVENT_XMIT   Http2Frame *  Send this frame
+// HTTP2_SESSION_EVENT_PRIO   Http2Frame *  Send this priority frame
+// HTTP2_SESSION_EVENT_DATA   Http2Frame *  Send the data frames in 
the stream
 
 #define HTTP2_SESSION_EVENT_INIT  (HTTP2_SESSION_EVENTS_START + 1)
 #define HTTP2_SESSION_EVENT_FINI  (HTTP2_SESSION_EVENTS_START + 2)
 #define HTTP2_SESSION_EVENT_RECV  (HTTP2_SESSION_EVENTS_START + 3)
 #define HTTP2_SESSION_EVENT_XMIT  (HTTP2_SESSION_EVENTS_START + 4)
-#define HTTP2_SESSION_EVENT_SHUTDOWN_INIT (HTTP2_SESSION_EVENTS_START + 5)
-#define HTTP2_SESSION_EVENT_SHUTDOWN_CONT (HTTP2_SESSION_EVENTS_START + 6)
-#define HTTP2_SESSION_EVENT_REENABLE  (HTTP2_SESSION_EVENTS_START + 7)
+#define HTTP2_SESSION_EVENT_DATA  (HTTP2_SESSION_EVENTS_START + 5)
+#define HTTP2_SESSION_EVENT_SHUTDOWN_INIT (HTTP2_SESSION_EVENTS_START + 6)
+#define HTTP2_SESSION_EVENT_SHUTDOWN_CONT (HTTP2_SESSION_EVENTS_START + 7)
+#define HTTP2_SESSION_EVENT_REENABLE  (HTTP2_SESSION_EVENTS_START + 8)
 
 enum class Http2SessionCod : int {
   NOT_PROVIDED,
diff --git a/include/proxy/http2/Http2ConnectionState.h 
b/include/proxy/http2/Http2ConnectionState.h
index a455105164..83ff405649 100644
--- a/include/proxy/http2/Http2ConnectionState.h
+++ b/include/proxy/http2/Http2ConnectionState.h
@@ -155,8 +155,9 @@ public:
   Http2ErrorCode get_shutdown_reason() const;
 
   // HTTP/2 frame sender
-  void schedule_stream(Http2Stream *stream);
+  void schedule_stream_to_send_priority_frames(Http2Stream *stream);
   void send_data_frames_depends_on_priority();
+  void schedule_stream_to_send_data_frames(Http2Stream *stream);
   void send_data_frames(Http2Stream *stream);
   Http2SendDataFrameResult send_a_data_frame(Http2Stream *stream, size_t 
_length);
   void send_headers_frame(Http2Stream *stream);
@@ -387,7 +388,8 @@ private:
   // "If the END_HEADERS bit is not set, this frame MUST be followed by
   // another CONTINUATION frame."
   Http2StreamId continued_stream_id = 0;
-  bool _scheduled   = false;
+  bool _priority_scheduled  = false;
+  bool _data_scheduled  = false;
   bool fini_received= false;
   bool in_destroy   = false;
   int recursion = 0;
diff --git a/include/proxy/http2/Http2Stream.h 
b/include/proxy/http2/Http2Stream.h
index 72515f1fb6..677cf6d087 100644
--- a/include/proxy/http2/Http2Stream.h
+++ b/include/proxy/http2/Http2Stream.h
@@ -204,8 +204,8 @@ private:
 
   NetTimeout _timeout{};
   HTTPParser http_parser;
-  EThread *_thread = nullptr;
-  Http2StreamId _id;
+  EThread *_thread= nullptr;
+  Http2StreamId _id   = -1;
   Http2StreamState _state = Http2StreamState::HTTP2_STREAM_STATE_IDLE;
   int64_t _http_sm_id = -1;
 
diff --git a/src/proxy/http2/Http2ConnectionState.cc 

(trafficserver) 07/09: http3: Fix a crash on READ_READY event for QPACK (#11136)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 7ae3ac6c76e4def6b2614bd15a2b6dffa31455c3
Author: Masakazu Kitajo 
AuthorDate: Thu Mar 7 09:35:17 2024 -0700

http3: Fix a crash on READ_READY event for QPACK (#11136)

* http3: Fix a crash on READ_READY event for QPACK

* Fix a warning

(cherry picked from commit e0aaf4bc168d1a455bfe2302088a95c6fd6c3614)
---
 src/proxy/http3/QPACK.cc | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/proxy/http3/QPACK.cc b/src/proxy/http3/QPACK.cc
index 00f02e77a6..03e7446ee1 100644
--- a/src/proxy/http3/QPACK.cc
+++ b/src/proxy/http3/QPACK.cc
@@ -188,20 +188,29 @@ QPACK::on_stream_close(QUICStream )
 int
 QPACK::event_handler(int event, Event *data)
 {
-  VIO *vio = reinterpret_cast(data);
+  VIO *vio = reinterpret_cast(data->cookie);
+  QUICStreamVCAdapter *adapter = static_cast(vio->vc_server);
   int ret;
 
   switch (event) {
   case VC_EVENT_READ_READY:
+adapter->clear_read_ready_event(data);
 ret = this->_on_read_ready(vio);
 break;
   case VC_EVENT_READ_COMPLETE:
+adapter->clear_read_complete_event(data);
 ret = EVENT_DONE;
 break;
   case VC_EVENT_WRITE_READY:
+adapter->clear_write_ready_event(data);
 ret = this->_on_write_ready(vio);
 break;
   case VC_EVENT_WRITE_COMPLETE:
+adapter->clear_write_complete_event(data);
+ret = EVENT_DONE;
+break;
+  case VC_EVENT_EOS:
+adapter->clear_eos_event(data);
 ret = EVENT_DONE;
 break;
   default:



(trafficserver) branch 10.0.x updated (6c5e0d84bc -> 8a33ce561d)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a change to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


from 6c5e0d84bc test_ip: add iterator temporary for gcc release builds 
(#11124)
 new 71787ff1b0 NOT_WRITE_AVAIL: schedule event to resend data frames 
(#11094)
 new 22671842ce Coverity fixes. CID 1534726 ,  CID 1534745, CID1534723 
(#1)
 new b9357191d9 CI osx and fedora: -DENABLE_CRIPTS (#11126)
 new 1839ba4807 Fix for issue 11123. (#11127)
 new 87fbb89fd9 cleanup cript example. add missing function (#11129)
 new 9690e2f681 Fixes broken refactoring to new Metrics (#11130)
 new 7ae3ac6c76 http3: Fix a crash on READ_READY event for QPACK (#11136)
 new f4d531a1c2 Fix validation regex for http.connect_ports (#11149)
 new 8a33ce561d Add copying of _templates dir so sphinx can generate the 
version menu (#11151)

The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CMakePresets.json  |  8 ++-
 doc/CMakeLists.txt |  2 +
 example/CMakeLists.txt |  2 +
 example/cripts/CMakeLists.txt  |  1 +
 include/cripts/Metrics.hpp |  4 +-
 include/proxy/http2/Http2CommonSession.h   | 10 ++--
 include/proxy/http2/Http2ConnectionState.h |  6 ++-
 include/proxy/http2/Http2Stream.h  |  4 +-
 .../txn_box/plugin/include/txn_box/accl_util.h |  2 +-
 .../experimental/txn_box/unit_tests/CMakeLists.txt |  2 -
 src/cripts/CMakeLists.txt  |  2 +-
 src/cripts/Lulu.cc |  6 +++
 src/mgmt/rpc/handlers/common/RecordsUtils.cc   | 13 +
 src/proxy/http2/Http2ConnectionState.cc| 42 ---
 src/proxy/http2/Http2Stream.cc |  2 +-
 src/proxy/http3/QPACK.cc   | 11 +++-
 src/records/RecCore.cc | 28 +-
 src/records/RecordsConfig.cc   |  2 +-
 tests/gold_tests/h2/grpc/grpc.test.py  | 25 +++--
 tests/gold_tests/h2/grpc/grpc_client.py| 61 ++
 tests/gold_tests/h2/grpc/grpc_server.py| 54 ++-
 tests/gold_tests/h2/grpc/simple.proto  |  6 ++-
 22 files changed, 223 insertions(+), 70 deletions(-)



(trafficserver) 08/09: Fix validation regex for http.connect_ports (#11149)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit f4d531a1c2814643d2ec852fbcb481fd9088864c
Author: Masaori Koshiba 
AuthorDate: Mon Mar 11 08:27:28 2024 +0900

Fix validation regex for http.connect_ports (#11149)

(cherry picked from commit 9012706b4d4566b03e2bc4f02fb2ff5c8a4048c1)
---
 src/records/RecordsConfig.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/records/RecordsConfig.cc b/src/records/RecordsConfig.cc
index e8a7abc8ff..ca225212f2 100644
--- a/src/records/RecordsConfig.cc
+++ b/src/records/RecordsConfig.cc
@@ -967,7 +967,7 @@ static const RecordElement RecordsConfig[] =
   //###
   //# CONNECT #
   //###
-  {RECT_CONFIG, "proxy.config.http.connect_ports", RECD_STRING, "443", 
RECU_DYNAMIC, RR_NULL, RECC_STR, "^(\\*|[[:digit:][:space:]]+)$", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.connect_ports", RECD_STRING, "443", 
RECU_DYNAMIC, RR_NULL, RECC_STR, "^(\\*|[[:digit:][:space:]-]+)$", RECA_NULL}
   ,
   //##
   //# Various update periods #



(trafficserver) 06/09: Fixes broken refactoring to new Metrics (#11130)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 9690e2f681b7f750289d66643322245f04273ea7
Author: Leif Hedstrom 
AuthorDate: Tue Mar 5 12:35:30 2024 -0700

Fixes broken refactoring to new Metrics (#11130)

(cherry picked from commit bbff993964bc1219f17221eb2f9dc2a6e499fea2)
---
 include/cripts/Metrics.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/cripts/Metrics.hpp b/include/cripts/Metrics.hpp
index 89fe993cb1..76fbcb16cd 100644
--- a/include/cripts/Metrics.hpp
+++ b/include/cripts/Metrics.hpp
@@ -122,7 +122,7 @@ class Counter : public detail::BaseMetrics
   using self_type  = Counter;
 
 public:
-  Counter(const Cript::string_view ) : super_type(name) {}
+  Counter(const Cript::string_view ) : super_type(name) { 
_initialize(ts::Metrics::Counter::create(name)); }
 
   // Counters can only increment, so lets produce some nice compile time 
erorrs too
   void decrement(int64_t) = delete;
@@ -161,7 +161,7 @@ class Gauge : public detail::BaseMetrics
   using self_type  = Gauge;
 
 public:
-  Gauge(const Cript::string_view ) : super_type(name) {}
+  Gauge(const Cript::string_view ) : super_type(name) { 
_initialize(ts::Metrics::Gauge::create(name)); }
 
   static self_type *
   create(const Cript::string_view )



(trafficserver) 05/09: cleanup cript example. add missing function (#11129)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 87fbb89fd92262d2600a72202d1d77b81566f7e4
Author: Chris McFarlen 
AuthorDate: Tue Mar 5 11:24:19 2024 -0600

cleanup cript example. add missing function (#11129)

* cleanup cript example. add missing function

* actually implement Cript::splitter

-

Co-authored-by: Chris McFarlen 
(cherry picked from commit d0996add373aa343ac7967d9d4c6e0269c7f2a41)
---
 example/CMakeLists.txt| 2 ++
 example/cripts/CMakeLists.txt | 1 +
 src/cripts/CMakeLists.txt | 2 +-
 src/cripts/Lulu.cc| 6 ++
 4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
index 6fba928424..2803dbe925 100644
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -17,6 +17,8 @@
 
 # It might be better if this is a subproject
 
+include(add_atsplugin)
+
 add_subdirectory(plugins)
 if(ENABLE_CRIPTS)
   add_subdirectory(cripts)
diff --git a/example/cripts/CMakeLists.txt b/example/cripts/CMakeLists.txt
index ac931626d0..3d578670c9 100644
--- a/example/cripts/CMakeLists.txt
+++ b/example/cripts/CMakeLists.txt
@@ -22,6 +22,7 @@ foreach(EXA ${CRIPTS_EXAMPLES})
   get_filename_component(EXA ${EXA} NAME_WLE)
   add_atsplugin(cripts_${EXA} ${EXA}.cc)
   target_link_libraries(cripts_${EXA} PRIVATE ts::cripts)
+  verify_remap_plugin(cripts_${EXA})
 endforeach()
 
 # This is a hack, but useful to run clang-tidy across all of Cripts
diff --git a/src/cripts/CMakeLists.txt b/src/cripts/CMakeLists.txt
index 55d61fa4f6..52613f017b 100644
--- a/src/cripts/CMakeLists.txt
+++ b/src/cripts/CMakeLists.txt
@@ -52,7 +52,7 @@ set(CRIPTS_PUBLIC_HEADERS
 add_library(cripts SHARED ${CPP_FILES})
 add_library(ts::cripts ALIAS cripts)
 
-target_link_libraries(cripts PUBLIC libswoc::libswoc fmt::fmt PkgConfig::PCRE2 
OpenSSL::Crypto ts::tsapi)
+target_link_libraries(cripts PUBLIC libswoc::libswoc fmt::fmt PkgConfig::PCRE2 
OpenSSL::Crypto)
 set_target_properties(cripts PROPERTIES PUBLIC_HEADER 
"${CRIPTS_PUBLIC_HEADERS}")
 
 set_target_properties(
diff --git a/src/cripts/Lulu.cc b/src/cripts/Lulu.cc
index 83ed1291b3..d961117078 100644
--- a/src/cripts/Lulu.cc
+++ b/src/cripts/Lulu.cc
@@ -166,6 +166,12 @@ Cript::string::split(char delim) const &
   return details::splitter(*this, delim);
 }
 
+std::vector
+Cript::splitter(Cript::string_view input, char delim)
+{
+  return details::splitter(input, delim);
+}
+
 bool
 Control::Base::_get(Cript::Context *context) const
 {



(trafficserver) 04/09: Fix for issue 11123. (#11127)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 1839ba4807f7df7b1ffef225cbac941bfac63815
Author: Damian Meden 
AuthorDate: Thu Mar 7 10:20:53 2024 +0100

Fix for issue 11123. (#11127)

Records - Do not return metrics when a config record is requested.

(cherry picked from commit a6d9c4a5755eadae37d81b50d6edc297e1a2196b)
---
 src/mgmt/rpc/handlers/common/RecordsUtils.cc | 13 +
 src/records/RecCore.cc   | 28 
 2 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/src/mgmt/rpc/handlers/common/RecordsUtils.cc 
b/src/mgmt/rpc/handlers/common/RecordsUtils.cc
index 9a5276ef6a..c285f0e50f 100644
--- a/src/mgmt/rpc/handlers/common/RecordsUtils.cc
+++ b/src/mgmt/rpc/handlers/common/RecordsUtils.cc
@@ -148,6 +148,11 @@ void static get_record_regex_impl(std::string const 
, unsigned recType, Co
   return;
 }
 
+if (!ctx.checkCb(record->rec_type, ctx.ec)) {
+  // error_code in the callback will be set.
+  return;
+}
+
 YAML::Node recordYaml;
 
 try {
@@ -161,6 +166,14 @@ void static get_record_regex_impl(std::string const 
, unsigned recType, Co
 ctx.yaml.push_back(recordYaml);
   };
 
+  ctx.checkCb = [recType](RecT rec_type, std::error_code ) {
+if ((recType & rec_type) == 0) {
+  ec = rpc::handlers::errors::RecordError::REQUESTED_TYPE_MISMATCH;
+  return false;
+}
+return true;
+  };
+
   const auto ret = RecLookupMatchingRecords(recType, regex.c_str(), 
yamlConverter, );
   // if the passed regex didn't match, it will not report any error. We will 
only get errors when converting
   // the record into yaml(so far).
diff --git a/src/records/RecCore.cc b/src/records/RecCore.cc
index 1ba7d25d3e..fe52b9eb84 100644
--- a/src/records/RecCore.cc
+++ b/src/records/RecCore.cc
@@ -560,19 +560,23 @@ RecLookupMatchingRecords(unsigned rec_type, const char 
*match, void (*callback)(
 return REC_ERR_FAIL;
   }
 
-  // First find the new metrics, this is a bit of a hack, beacuse we still use 
the old
-  // librecords callback with a "pseudo" record.
-  RecRecord tmp;
-
-  tmp.rec_type  = RECT_ALL;
-  tmp.data_type = RECD_INT;
-
-  for (auto &&[name, val] : ts::Metrics::instance()) {
-if (regex.match(name.data()) >= 0) {
-  tmp.name = name.data();
-  tmp.data.rec_int = val;
-  callback(, data);
+  if ((rec_type & (RECT_PROCESS | RECT_NODE | RECT_PLUGIN))) {
+// First find the new metrics, this is a bit of a hack, because we still 
use the old
+// librecords callback with a "pseudo" record.
+RecRecord tmp;
+
+tmp.rec_type  = RECT_PROCESS;
+tmp.data_type = RECD_INT;
+
+for (auto &&[name, val] : ts::Metrics::instance()) {
+  if (regex.match(name.data()) >= 0) {
+tmp.name = name.data();
+tmp.data.rec_int = val;
+callback(, data);
+  }
 }
+// all done for metrics
+return REC_ERR_OKAY;
   }
 
   num_records = g_num_records;



(trafficserver) 03/09: CI osx and fedora: -DENABLE_CRIPTS (#11126)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit b9357191d93c3f258995539a1319f19e58a3e1e7
Author: Brian Neradt 
AuthorDate: Tue Mar 5 12:51:44 2024 -0500

CI osx and fedora: -DENABLE_CRIPTS (#11126)

Update the CMakePresets.json to build cripts in CI for fedora:39 and
osx.

(cherry picked from commit 85a4cb96b8c08449403929f35a08ef680901c484)
---
 CMakePresets.json | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/CMakePresets.json b/CMakePresets.json
index fd7ccb39ee..4ea2a27dda 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -136,7 +136,10 @@
   "displayName": "CI OSX",
   "description": "CI Pipeline config for OSX",
   "inherits": ["ci"],
-  "generator": "Unix Makefiles"
+  "generator": "Unix Makefiles",
+  "cacheVariables": {
+"ENABLE_CRIPTS": true
+  }
 },
 {
   "name": "ci-rocky",
@@ -157,7 +160,8 @@
   "inherits": ["ci"],
   "cacheVariables": {
 "OPENSSL_ROOT_DIR": "/opt/openssl-quic",
-"opentelemetry_ROOT": "/opt"
+"opentelemetry_ROOT": "/opt",
+"ENABLE_CRIPTS": true
   }
 },
 {



(trafficserver) 09/09: Add copying of _templates dir so sphinx can generate the version menu (#11151)

2024-03-11 Thread cmcfarlen
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 8a33ce561d8d55addb73c2cee66cb72e4ec41caa
Author: Evan Zelkowitz 
AuthorDate: Fri Mar 8 10:44:02 2024 -0700

Add copying of _templates dir so sphinx can generate the version menu 
(#11151)

Co-authored-by: Evan Zelkowitz 
(cherry picked from commit 1c4825ddbf8c8fa5b2a4b6c7a5df1e8aa5981023)
---
 doc/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 41d2bf549c..c58033b8db 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -35,6 +35,8 @@ add_custom_target(
   generate_docs_setup
   COMMENT "Copy static files to build directory"
   COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_SOURCE_DIR}/static ${CMAKE_CURRENT_BINARY_DIR}/static
+  COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_SOURCE_DIR}/_templates
+  ${CMAKE_CURRENT_BINARY_DIR}/_templates
 )
 
 # generate svg files from uml files