From 3bce54e4679b9b1c1ef3698a0ae9fd670ee28b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20J=C4=99drecki?= Date: Thu, 18 Jun 2026 15:30:38 +0200 Subject: [PATCH 1/3] Test AppInspect with --ci flag --- .github/actions/run-appinspect/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run-appinspect/action.yml b/.github/actions/run-appinspect/action.yml index 15f7c052..ccbb64be 100644 --- a/.github/actions/run-appinspect/action.yml +++ b/.github/actions/run-appinspect/action.yml @@ -19,4 +19,4 @@ runs: tar -czf mock_app.tgz --exclude="__pycache__" bin default metadata - name: Validate the mock app with AppInspect shell: bash - run: uvx splunk-appinspect inspect ./tests/system/test_apps/generating_app/mock_app.tgz --included-tags cloud + run: uvx splunk-appinspect inspect ./tests/system/test_apps/generating_app/mock_app.tgz --included-tags cloud --ci From b26b2be8518f052aa4e7698990efc704fd65522b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20J=C4=99drecki?= Date: Thu, 18 Jun 2026 17:40:22 +0200 Subject: [PATCH 2/3] Swallow every non-zero exit code other than 101 as AppInspect doesn't follow UNIX conventions --- .github/actions/run-appinspect/action.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/run-appinspect/action.yml b/.github/actions/run-appinspect/action.yml index ccbb64be..ccb5c067 100644 --- a/.github/actions/run-appinspect/action.yml +++ b/.github/actions/run-appinspect/action.yml @@ -19,4 +19,11 @@ runs: tar -czf mock_app.tgz --exclude="__pycache__" bin default metadata - name: Validate the mock app with AppInspect shell: bash - run: uvx splunk-appinspect inspect ./tests/system/test_apps/generating_app/mock_app.tgz --included-tags cloud --ci + run: | + # AppInspect doesn't follow UNIX conventions so we swallow all non-zero + # exit codes unless its 101, the de facto error code + # https://dev.splunk.com/enterprise/reference/appinspect/appinspectcliref#inspect + uvx splunk-appinspect inspect \ + ./tests/system/test_apps/generating_app/mock_app.tgz \ + --included-tags cloud --ci || exit_code=$? + [ "${exit_code:-0}" -ne 101 ] || exit 1 From 20cf0a1612a9d12ec507e6a89193d0aaf668a92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20J=C4=99drecki?= Date: Fri, 19 Jun 2026 13:43:53 +0200 Subject: [PATCH 3/3] =?UTF-8?q?Redo=20the=20=C4=99xit=20code=20handling=20?= =?UTF-8?q?in=20appinspect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/run-appinspect/action.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/actions/run-appinspect/action.yml b/.github/actions/run-appinspect/action.yml index ccb5c067..1895dc4c 100644 --- a/.github/actions/run-appinspect/action.yml +++ b/.github/actions/run-appinspect/action.yml @@ -20,10 +20,14 @@ runs: - name: Validate the mock app with AppInspect shell: bash run: | - # AppInspect doesn't follow UNIX conventions so we swallow all non-zero - # exit codes unless its 101, the de facto error code + # AppInspect doesn't follow UNIX conventions, gotta handle their exit codes explicitly # https://dev.splunk.com/enterprise/reference/appinspect/appinspectcliref#inspect uvx splunk-appinspect inspect \ ./tests/system/test_apps/generating_app/mock_app.tgz \ --included-tags cloud --ci || exit_code=$? - [ "${exit_code:-0}" -ne 101 ] || exit 1 + case "${exit_code:-0}" in + 0) ;; # all checks passed + 103) ;; # warnings (--ci) + 104) ;; # future-tag warnings (--ci) + *) exit "${exit_code}" ;; # 101=failures, 1=packaging, 2=exception, 3=error, etc. + esac