diff --git a/.github/infrastructure/docker-compose-solace.yml b/.github/infrastructure/docker-compose-solace.yml index 96cb46abb..7781e37df 100644 --- a/.github/infrastructure/docker-compose-solace.yml +++ b/.github/infrastructure/docker-compose-solace.yml @@ -9,9 +9,13 @@ services: shm_size: 1g ulimits: core: -1 + # Setting nofile to 4096 and hard to 1048576, as recommended by Solace documentation + # Otherwise, the container will have an error and crash with: + # ERROR POST Violation [022]:Required system resource missing, Hard resource limit nofile 1048576 is required, 6592 detected + # https://docs.solace.com/Software-Broker/System-Resource-Requirements.htm#concurrent-open-files-considerations nofile: - soft: 2448 - hard: 6592 + soft: 4096 + hard: 1048576 deploy: restart_policy: condition: on-failure diff --git a/.github/scripts/components-scripts/docker-compose-logs.sh b/.github/scripts/components-scripts/docker-compose-logs.sh new file mode 100755 index 000000000..0e28b1190 --- /dev/null +++ b/.github/scripts/components-scripts/docker-compose-logs.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +FILE="$1" +PROJECT="${2:-$FILE}" + +docker compose -f .github/infrastructure/docker-compose-${FILE}.yml -p ${PROJECT} logs diff --git a/.github/scripts/test-info.mjs b/.github/scripts/test-info.mjs index 4d16848e4..9a659db6f 100644 --- a/.github/scripts/test-info.mjs +++ b/.github/scripts/test-info.mjs @@ -440,6 +440,7 @@ const components = { 'pubsub.solace': { conformance: true, conformanceSetup: 'docker-compose.sh solace', + conformanceLogs: 'docker-compose-logs.sh solace', }, 'secretstores.azure.keyvault': { certification: true, @@ -824,6 +825,7 @@ const components = { * @property {boolean?} requireTerraform If true, requires Terraform * @property {boolean?} requireKind If true, requires KinD * @property {string?} conformanceSetup Setup script for conformance tests + * @property {string?} conformanceLogs Logs script for conformance tests * @property {string?} conformanceDestroy Destroy script for conformance tests * @property {string?} certificationSetup Setup script for certification tests * @property {string?} certificationDestroy Destroy script for certification tests @@ -845,6 +847,7 @@ const components = { * @property {boolean?} require-kind Requires KinD * @property {string?} setup-script Setup script * @property {string?} destroy-script Destroy script + * @property {string?} logs-script Logs script in case of failure * @property {string?} nodejs-version Install the specified Node.js version if set * @property {string?} mongodb-version Install the specified MongoDB version if set * @property {string?} source-pkg Source package @@ -915,6 +918,7 @@ function GenerateMatrix(testKind, enableCloudTests) { 'require-kind': comp.requireKind ? 'true' : undefined, 'setup-script': comp[testKind + 'Setup'] || undefined, 'destroy-script': comp[testKind + 'Destroy'] || undefined, + 'logs-script': comp[testKind + 'Logs'] || undefined, 'nodejs-version': comp.nodeJsVersion || undefined, 'mongodb-version': comp.mongoDbVersion || undefined, 'source-pkg': comp.sourcePkg diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index cd043cfc4..ed98baa84 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -317,6 +317,10 @@ jobs: exit 1 fi + - name: Retrieve infrastructure failure logs + if: failure() && matrix.logs-script != '' + run: .github/scripts/components-scripts/${{ matrix.logs-script }} + - name: Prepare test result info if: always() run: |