You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "brbzull0 (via GitHub)" <gi...@apache.org> on 2024/01/31 09:49:01 UTC

[PR] Alan's txn_box: Add it as an experimental plugin. [trafficserver]

brbzull0 opened a new pull request, #11025:
URL: https://github.com/apache/trafficserver/pull/11025

   This PR adds Alan's Transaction Box as an Apache Traffic Server plugin.
   
   Notes:
   Still needs to:
   
   - [ ] Add a readme with txnbox release/changes history
   - [ ] make sure docs are 100% linked into TS docs.
   - [ ] All autests are passing


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] txn_box: Add it as an experimental plugin. [trafficserver]

Posted by "brbzull0 (via GitHub)" <gi...@apache.org>.
brbzull0 commented on PR #11025:
URL: https://github.com/apache/trafficserver/pull/11025#issuecomment-1929381158

   [approve ci]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] txn_box: Add it as an experimental plugin. [trafficserver]

Posted by "brbzull0 (via GitHub)" <gi...@apache.org>.
brbzull0 commented on PR #11025:
URL: https://github.com/apache/trafficserver/pull/11025#issuecomment-1929049773

   [approve ci]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] txn_box: Add it as an experimental plugin. [trafficserver]

Posted by "brbzull0 (via GitHub)" <gi...@apache.org>.
brbzull0 merged PR #11025:
URL: https://github.com/apache/trafficserver/pull/11025


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] txn_box: Add it as an experimental plugin. [trafficserver]

Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on code in PR #11025:
URL: https://github.com/apache/trafficserver/pull/11025#discussion_r1491160672


##########
plugins/experimental/txn_box/plugin/CMakeLists.txt:
##########
@@ -0,0 +1,62 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+#  or implied. See the License for the specific language governing permissions and limitations under
+#  the License.
+#
+#######################
+cmake_minimum_required(VERSION 3.11)
+
+project(txn_box)
+set(CMAKE_CXX_STANDARD 17)
+
+pkg_check_modules(PCRE2 REQUIRED IMPORTED_TARGET libpcre2-8)

Review Comment:
   oh yeah, the check at the top level is not correct.  We can clean this up later.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] txn_box: Add it as an experimental plugin. [trafficserver]

Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on code in PR #11025:
URL: https://github.com/apache/trafficserver/pull/11025#discussion_r1488209859


##########
plugins/experimental/txn_box/plugin/CMakeLists.txt:
##########
@@ -0,0 +1,62 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+#  or implied. See the License for the specific language governing permissions and limitations under
+#  the License.
+#
+#######################
+cmake_minimum_required(VERSION 3.11)
+
+project(txn_box)
+set(CMAKE_CXX_STANDARD 17)
+
+pkg_check_modules(PCRE2 REQUIRED IMPORTED_TARGET libpcre2-8)

Review Comment:
   This is checked at the top level now



##########
plugins/experimental/txn_box/plugin/CMakeLists.txt:
##########
@@ -0,0 +1,62 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+#  or implied. See the License for the specific language governing permissions and limitations under
+#  the License.
+#
+#######################
+cmake_minimum_required(VERSION 3.11)
+
+project(txn_box)
+set(CMAKE_CXX_STANDARD 17)
+
+pkg_check_modules(PCRE2 REQUIRED IMPORTED_TARGET libpcre2-8)
+
+add_atsplugin(
+  txn_box
+  src/0_static.cc
+  src/txn_box.cc
+  src/txn_box_remap.cc
+  src/Accelerator.cc
+  src/Comparison.cc
+  src/Config.cc
+  src/Context.cc
+  src/Directive.cc
+  src/Extractor.cc
+  src/Ex_Base.cc
+  src/Modifier.cc
+  src/Machinery.cc
+  src/Rxp.cc
+  src/ts_util.cc
+  src/util.cc
+  src/yaml_util.cc
+  src/Ex_HTTP.cc
+  src/Ex_Ssn.cc
+  src/ex_tcp_info.cc
+  src/ip_space.cc
+  src/query.cc
+  src/stats.cc
+  src/text_block.cc
+)
+# set_property(TARGET plugin PROPERTY PREFIX "")
+# set_property(TARGET plugin PROPERTY OUTPUT_NAME "txn_box")
+
+target_link_libraries(txn_box PRIVATE libswoc::libswoc PkgConfig::PCRE2 OpenSSL::SSL ts::tsapi yaml-cpp::yaml-cpp
+)#ts::tsapi needed?
+#pcre2-8
+target_include_directories(txn_box PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${YAMLCPP_INCLUDE_DIR})
+# target_include_directories(txn_box PRIVATE ${PLUGIN_SOURCE_DIR}/include ${trafficserver_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}, libswoc)
+if(CMAKE_COMPILER_IS_GNUCXX)

Review Comment:
   This is ok, but typically these flags are controlled top level settings



##########
plugins/experimental/txn_box/plugin/CMakeLists.txt:
##########
@@ -0,0 +1,62 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+#  or implied. See the License for the specific language governing permissions and limitations under
+#  the License.
+#
+#######################
+cmake_minimum_required(VERSION 3.11)
+
+project(txn_box)
+set(CMAKE_CXX_STANDARD 17)
+
+pkg_check_modules(PCRE2 REQUIRED IMPORTED_TARGET libpcre2-8)
+
+add_atsplugin(
+  txn_box
+  src/0_static.cc
+  src/txn_box.cc
+  src/txn_box_remap.cc
+  src/Accelerator.cc
+  src/Comparison.cc
+  src/Config.cc
+  src/Context.cc
+  src/Directive.cc
+  src/Extractor.cc
+  src/Ex_Base.cc
+  src/Modifier.cc
+  src/Machinery.cc
+  src/Rxp.cc
+  src/ts_util.cc
+  src/util.cc
+  src/yaml_util.cc
+  src/Ex_HTTP.cc
+  src/Ex_Ssn.cc
+  src/ex_tcp_info.cc
+  src/ip_space.cc
+  src/query.cc
+  src/stats.cc
+  src/text_block.cc
+)
+# set_property(TARGET plugin PROPERTY PREFIX "")
+# set_property(TARGET plugin PROPERTY OUTPUT_NAME "txn_box")
+
+target_link_libraries(txn_box PRIVATE libswoc::libswoc PkgConfig::PCRE2 OpenSSL::SSL ts::tsapi yaml-cpp::yaml-cpp
+)#ts::tsapi needed?

Review Comment:
   drop ts::tsapi (its included automatically if needed)



##########
plugins/experimental/txn_box/plugin/CMakeLists.txt:
##########
@@ -0,0 +1,62 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+#  or implied. See the License for the specific language governing permissions and limitations under
+#  the License.
+#
+#######################
+cmake_minimum_required(VERSION 3.11)
+
+project(txn_box)
+set(CMAKE_CXX_STANDARD 17)

Review Comment:
   You can drop these lines



##########
plugins/experimental/txn_box/CMakeLists.txt:
##########
@@ -0,0 +1,47 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+#  or implied. See the License for the specific language governing permissions and limitations under
+#  the License.
+#
+#######################
+project(txn_box)
+set(CMAKE_CXX_STANDARD 17)
+include(GNUInstallDirs)

Review Comment:
   This is done in the top level and shouldn't be needed here



##########
plugins/experimental/txn_box/plugin/CMakeLists.txt:
##########
@@ -0,0 +1,62 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+#  or implied. See the License for the specific language governing permissions and limitations under
+#  the License.
+#
+#######################
+cmake_minimum_required(VERSION 3.11)
+
+project(txn_box)
+set(CMAKE_CXX_STANDARD 17)
+
+pkg_check_modules(PCRE2 REQUIRED IMPORTED_TARGET libpcre2-8)
+
+add_atsplugin(
+  txn_box
+  src/0_static.cc
+  src/txn_box.cc
+  src/txn_box_remap.cc
+  src/Accelerator.cc
+  src/Comparison.cc
+  src/Config.cc
+  src/Context.cc
+  src/Directive.cc
+  src/Extractor.cc
+  src/Ex_Base.cc
+  src/Modifier.cc
+  src/Machinery.cc
+  src/Rxp.cc
+  src/ts_util.cc
+  src/util.cc
+  src/yaml_util.cc
+  src/Ex_HTTP.cc
+  src/Ex_Ssn.cc
+  src/ex_tcp_info.cc
+  src/ip_space.cc
+  src/query.cc
+  src/stats.cc
+  src/text_block.cc
+)
+# set_property(TARGET plugin PROPERTY PREFIX "")
+# set_property(TARGET plugin PROPERTY OUTPUT_NAME "txn_box")
+
+target_link_libraries(txn_box PRIVATE libswoc::libswoc PkgConfig::PCRE2 OpenSSL::SSL ts::tsapi yaml-cpp::yaml-cpp
+)#ts::tsapi needed?
+#pcre2-8
+target_include_directories(txn_box PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${YAMLCPP_INCLUDE_DIR})

Review Comment:
   You can drop the YAMLCPP part of this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] txn_box: Add it as an experimental plugin. [trafficserver]

Posted by "brbzull0 (via GitHub)" <gi...@apache.org>.
brbzull0 commented on PR #11025:
URL: https://github.com/apache/trafficserver/pull/11025#issuecomment-1922312944

   [approve ci]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] txn_box: Add it as an experimental plugin. [trafficserver]

Posted by "brbzull0 (via GitHub)" <gi...@apache.org>.
brbzull0 commented on code in PR #11025:
URL: https://github.com/apache/trafficserver/pull/11025#discussion_r1489170058


##########
plugins/experimental/txn_box/plugin/CMakeLists.txt:
##########
@@ -0,0 +1,62 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+#  or implied. See the License for the specific language governing permissions and limitations under
+#  the License.
+#
+#######################
+cmake_minimum_required(VERSION 3.11)
+
+project(txn_box)
+set(CMAKE_CXX_STANDARD 17)
+
+pkg_check_modules(PCRE2 REQUIRED IMPORTED_TARGET libpcre2-8)

Review Comment:
   if I don't use this, then cmake is not able to find pcre:
   ```
   CMake Error at cmake/add_atsplugin.cmake:21 (add_library):
     Target "txn_box" links to target "PkgConfig::PCRE2" but the target was not
     found.  Perhaps a find_package() call is missing for an IMPORTED target, or
     an ALIAS target is missing?
   Call Stack (most recent call first):
     plugins/experimental/txn_box/plugin/CMakeLists.txt:20 (add_atsplugin)
   ```
   Earlier I've got this:
   ```
   CMake Warning at CMakeLists.txt:261 (find_package):
     By not providing "FindPCRE2.cmake" in CMAKE_MODULE_PATH this project has
     asked CMake to find a package configuration file provided by "PCRE2", but
     CMake did not find one.
   
     Could not find a package configuration file provided by "PCRE2" with any of
     the following names:
   
       PCRE2Config.cmake
       pcre2-config.cmake
   
     Add the installation prefix of "PCRE2" to CMAKE_PREFIX_PATH or set
     "PCRE2_DIR" to a directory containing one of the above files.  If "PCRE2"
     provides a separate development package or SDK, be sure it has been
     installed.
   ```
   wondering if I am missing some pcre2 package.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org