Skip to content

Commit 13fd22d

Browse files
committed
Merge branch 'develop' into dev/BJ/pyproject-toml
2 parents 4d304c0 + 1c2cc7b commit 13fd22d

File tree

110 files changed

+538
-582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+538
-582
lines changed

.github/dependabot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ version: 2
22
updates:
33
- package-ecosystem: "github-actions"
44
directory: "/"
5-
target-branch: "master"
5+
target-branch: "develop"
66
schedule:
77
interval: "weekly"

.github/workflows/fossa.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: Fossa OSS Scan
2+
on: [push]
3+
jobs:
4+
fossa-scan:
5+
uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
6+
secrets: inherit

.github/workflows/release.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,39 @@ on:
1010
default: true
1111

1212
jobs:
13-
release:
14-
runs-on: ${{ matrix.os }}
15-
strategy:
16-
matrix:
17-
os: [ubuntu-latest]
18-
python-version: [3.9]
13+
publish:
14+
name: Deploy Release to PyPI
15+
# Last version with Python 3.7 binaries available
16+
runs-on: ubuntu-22.04
1917
steps:
20-
- name: Checkout repo
21-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
18+
- name: Checkout source
19+
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
20+
- name: Set up Python
21+
uses: actions/setup-python@9322b3ca74000aeb2c01eb777b646334015ddd72
2422
with:
2523
python-version: ${{ matrix.python-version }}
2624
- name: Install dependencies
2725
run: pip install . --group build
2826
- name: Build package
2927
run: python -m build
3028
- name: Publish package to PyPI
31-
if: ${{ inputs.dry-run == 'false' }}
32-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
29+
uses: pypa/gh-action-pypi-publish@d417ba7e7683fa9104c42abe611c1f2c93c0727d
3330
with:
3431
user: __token__
3532
password: ${{ secrets.PYPI_PASSWORD }}
3633
- name: Generate API reference docs
3734
run: |
3835
rm -rf ./docs/_build
39-
python -m tox -e docs
40-
- name: Upload API reference docs
41-
if: ${{ inputs.dry-run == 'false' }}
42-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
36+
tox -e docs
37+
- name: Docs Upload
38+
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
4339
with:
4440
name: python_sdk_docs
4541
path: docs/_build/html
42+
# Test upload
43+
# - name: Publish package to TestPyPI
44+
# uses: pypa/gh-action-pypi-publish@d417ba7e7683fa9104c42abe611c1f2c93c0727d
45+
# with:
46+
# user: __token__
47+
# password: ${{ secrets.test_pypi_password }}
48+
# repository_url: https://test.pypi.org/legacy/

.github/workflows/test.yml

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,35 @@
11
name: Python CI
2-
32
on: [push, workflow_dispatch]
43

54
jobs:
6-
test:
5+
build:
76
runs-on: ${{ matrix.os }}
87
strategy:
98
fail-fast: false
109
matrix:
1110
os: [ubuntu-latest]
12-
python-version: [3.9, 3.13]
13-
splunk-version: [9.3, 9.4, latest]
11+
python-version: [3.9]
12+
splunk-version: [9.4, latest]
1413
include:
15-
# Ubuntu 22.04 is the last version we can get pre-built Python 3.7 binaries for
16-
- os: ubuntu-22.04
17-
python-version: 3.7
18-
splunk-version: 9.3
14+
# Oldest possible configuration
15+
# Last Ubuntu version with Python 3.7 binaries available
1916
- os: ubuntu-22.04
2017
python-version: 3.7
21-
splunk-version: 9.4
18+
splunk-version: 9.1
19+
# Latest possible configuration
20+
- os: ubuntu-latest
21+
python-version: 3.13
22+
splunk-version: latest
2223
steps:
23-
- name: Checkout repo
24-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
25-
- name: Set up environment variables
26-
run: cp ./.env.test ./.env
27-
- name: Launch Splunk ${{ matrix.splunk-version }}
24+
- name: Checkout code
25+
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
26+
- name: Run docker compose
2827
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
29-
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
28+
- name: Setup Python
29+
uses: actions/setup-python@9322b3ca74000aeb2c01eb777b646334015ddd72
3130
with:
3231
python-version: ${{ matrix.python-version }}
33-
- name: Install dependencies
34-
run: python --version && python -m pip --version && python -m pip install tox
35-
- name: Run Docker health check
36-
# Probably solves nothing, worth trying regardless
37-
run: |
38-
timeout 30s make wait_up
39-
if [ $? -eq 124 ]; then
40-
echo "Splunk failed to start within 30 seconds."
41-
docker compose logs
42-
exit 1
43-
fi
44-
- name: Run test suite
45-
run: python -m tox -e py
46-
- name: Print docker logs for optional inspection
47-
run: docker compose logs
48-
fossa-scan:
49-
uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
50-
secrets: inherit
32+
- name: Install tox
33+
run: pip install tox
34+
- name: Test Execution
35+
run: tox -e py

.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,14 @@ build/
1313
proxypid
1414
MANIFEST
1515
coverage_report
16-
*.log
17-
tests/searchcommands_data/log/
18-
tests/searchcommands_data/output/
19-
tests/searchcommands/data/app/app.log
20-
tests/searchcommands/apps/app_with_logging_configuration/*.log
2116
Test Results*.html
17+
*.log
2218
splunk_sdk.egg-info/
2319
.splunkrc
2420
dist/
2521
*.observed
2622
venv/
2723
.venv/
28-
.mypy_cache/
2924
.tox
3025
test-reports/
3126
.env

docker-compose.yml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
services:
2-
splunk:
3-
image: "splunk/splunk:${SPLUNK_VERSION}"
4-
container_name: splunk
5-
platform: linux/amd64
6-
environment:
7-
- SPLUNK_START_ARGS=--accept-license
8-
- SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com
9-
- SPLUNK_HEC_TOKEN=11111111-1111-1111-1111-1111111111113
10-
- SPLUNK_PASSWORD=changed!
11-
- SPLUNK_APPS_URL=https://github.com/splunk/sdk-app-collection/releases/latest/download/sdkappcollection.tgz
12-
ports:
13-
- "8000:8000"
14-
- "8088:8088"
15-
- "8089:8089"
16-
healthcheck:
17-
test: ["CMD", "curl", "-f", "http://localhost:8000"]
18-
interval: 5s
19-
timeout: 5s
20-
retries: 20
21-
volumes:
22-
- "./tests/searchcommands/test_apps/eventing_app:/opt/splunk/etc/apps/eventing_app"
23-
- "./tests/searchcommands/test_apps/generating_app:/opt/splunk/etc/apps/generating_app"
24-
- "./tests/searchcommands/test_apps/reporting_app:/opt/splunk/etc/apps/reporting_app"
25-
- "./tests/searchcommands/test_apps/streaming_app:/opt/splunk/etc/apps/streaming_app"
26-
- "./splunklib:/opt/splunk/etc/apps/eventing_app/lib/splunklib"
27-
- "./splunklib:/opt/splunk/etc/apps/generating_app/lib/splunklib"
28-
- "./splunklib:/opt/splunk/etc/apps/reporting_app/lib/splunklib"
29-
- "./splunklib:/opt/splunk/etc/apps/streaming_app/lib/splunklib"
2+
splunk:
3+
image: "splunk/splunk:${SPLUNK_VERSION}"
4+
container_name: splunk
5+
environment:
6+
- SPLUNK_START_ARGS=--accept-license
7+
- SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com
8+
- SPLUNK_HEC_TOKEN=11111111-1111-1111-1111-1111111111113
9+
- SPLUNK_PASSWORD=changed!
10+
- SPLUNK_APPS_URL=https://github.com/splunk/sdk-app-collection/releases/download/v1.1.0/sdkappcollection.tgz
11+
ports:
12+
- 8000:8000
13+
- 8088:8088
14+
- 8089:8089
15+
healthcheck:
16+
test: ['CMD', 'curl', '-f', 'http://localhost:8000']
17+
interval: 5s
18+
timeout: 5s
19+
retries: 20
20+
volumes:
21+
- "./tests/searchcommands/test_apps/eventing_app:/opt/splunk/etc/apps/eventing_app"
22+
- "./tests/searchcommands/test_apps/generating_app:/opt/splunk/etc/apps/generating_app"
23+
- "./tests/searchcommands/test_apps/reporting_app:/opt/splunk/etc/apps/reporting_app"
24+
- "./tests/searchcommands/test_apps/streaming_app:/opt/splunk/etc/apps/streaming_app"
25+
- "./splunklib:/opt/splunk/etc/apps/eventing_app/lib/splunklib"
26+
- "./splunklib:/opt/splunk/etc/apps/generating_app/lib/splunklib"
27+
- "./splunklib:/opt/splunk/etc/apps/reporting_app/lib/splunklib"
28+
- "./splunklib:/opt/splunk/etc/apps/streaming_app/lib/splunklib"
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# License for the specific language governing permissions and limitations
1515
# under the License.
1616

17+
1718
import logging
1819
from tests import testlib
1920
from splunklib import client

0 commit comments

Comments
 (0)