diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42ae1c29..5cac8cf2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -388,7 +388,7 @@ jobs: echo "$version is not installed." fi done - + sudo apt-get update sudo apt install libapache2-mod-php${{ matrix.php_version }} sudo a2enmod php${{ matrix.php_version }} php -i @@ -403,6 +403,7 @@ jobs: sudo dpkg -i ${{ env.AIKIDO_DEB }}/${{ env.AIKIDO_DEB }} - name: Run CLI tests + if: matrix.os == 'ubuntu-latest' run: | cd ${{ github.workspace }} php lib/php-extension/run-tests.php ./tests/cli @@ -411,3 +412,12 @@ jobs: run: | cd tools sudo python3 run_server_tests.py ../tests/server ../tests/testlib --server=${{ matrix.server }} + + - name: Archive test artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: test-results-aikido-${{ env.AIKIDO_VERSION }}-${{ matrix.os }}-php-${{ matrix.php_version }} + if-no-files-found: ignore + path: | + ${{ github.workspace }}/tests/cli/**/*.diff diff --git a/lib/agent/cloud/cloud.go b/lib/agent/cloud/cloud.go index f7aa325b..6007d119 100644 --- a/lib/agent/cloud/cloud.go +++ b/lib/agent/cloud/cloud.go @@ -22,5 +22,6 @@ func Init() { } func Uninit() { - utils.StopPollingRouting(HeartbeatRoutineChannel) + utils.StopPollingRoutine(HeartbeatRoutineChannel) + utils.StopPollingRoutine(ConfigPollingRoutineChannel) } diff --git a/lib/agent/globals/constants.go b/lib/agent/globals/constants.go index 95a6619e..4f218b6d 100644 --- a/lib/agent/globals/constants.go +++ b/lib/agent/globals/constants.go @@ -1,7 +1,7 @@ package globals const ( - Version = "1.0.87" + Version = "1.0.88" ConfigUpdatedAtMethod = "GET" ConfigUpdatedAtAPI = "/config" ConfigAPIMethod = "GET" diff --git a/lib/agent/main.go b/lib/agent/main.go index 12da8965..6f5aa89a 100644 --- a/lib/agent/main.go +++ b/lib/agent/main.go @@ -37,7 +37,10 @@ func AgentInit(initJson string) (initOk bool) { //export AgentUninit func AgentUninit() { + rate_limiting.Uninit() + cloud.Uninit() grpc.Uninit() + config.Uninit() log.Infof("Aikido Agent v%s unloaded!", globals.Version) log.Uninit() diff --git a/lib/agent/rate_limiting/rate_limiting.go b/lib/agent/rate_limiting/rate_limiting.go index e0fcfc72..25f35703 100644 --- a/lib/agent/rate_limiting/rate_limiting.go +++ b/lib/agent/rate_limiting/rate_limiting.go @@ -53,5 +53,5 @@ func Init() { } func Uninit() { - utils.StopPollingRouting(RateLimitingChannel) + utils.StopPollingRoutine(RateLimitingChannel) } diff --git a/lib/agent/utils/utils.go b/lib/agent/utils/utils.go index 8e59c008..13d2a8bc 100644 --- a/lib/agent/utils/utils.go +++ b/lib/agent/utils/utils.go @@ -66,7 +66,7 @@ func StartPollingRoutine(stopChan chan struct{}, ticker *time.Ticker, pollingFun }() } -func StopPollingRouting(stopChan chan struct{}) { +func StopPollingRoutine(stopChan chan struct{}) { close(stopChan) } diff --git a/lib/php-extension/include/php_aikido.h b/lib/php-extension/include/php_aikido.h index e60988be..5187bcfa 100644 --- a/lib/php-extension/include/php_aikido.h +++ b/lib/php-extension/include/php_aikido.h @@ -3,7 +3,7 @@ extern zend_module_entry aikido_module_entry; #define phpext_aikido_ptr &aikido_module_entry -#define PHP_AIKIDO_VERSION "1.0.87" +#define PHP_AIKIDO_VERSION "1.0.88" #if defined(ZTS) && defined(COMPILE_DL_AIKIDO) ZEND_TSRMLS_CACHE_EXTERN() diff --git a/lib/request-processor/globals/globals.go b/lib/request-processor/globals/globals.go index 93bf8cd3..a5d0ae09 100644 --- a/lib/request-processor/globals/globals.go +++ b/lib/request-processor/globals/globals.go @@ -11,5 +11,5 @@ var CloudConfig CloudConfigData var CloudConfigMutex sync.Mutex const ( - Version = "1.0.87" + Version = "1.0.88" ) diff --git a/package/rpm/aikido.spec b/package/rpm/aikido.spec index e62ff05d..2075e0f1 100644 --- a/package/rpm/aikido.spec +++ b/package/rpm/aikido.spec @@ -1,5 +1,5 @@ Name: aikido-php-firewall -Version: 1.0.87 +Version: 1.0.88 Release: 1 Summary: Aikido PHP Extension License: GPL