Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
outputs:
matrix_supportedSplunk: ${{ steps.matrix.outputs.latestSplunk }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- id: matrix
uses: splunk/addonfactory-test-matrix-action@v3.1.2
uses: splunk/addonfactory-test-matrix-action@v3.3.0

fossa-scan:
continue-on-error: true
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: run fossa anlyze and create report
run: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
Expand All @@ -36,7 +36,7 @@ jobs:
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
- name: upload THIRDPARTY file
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: THIRDPARTY
path: /tmp/THIRDPARTY
Expand All @@ -49,16 +49,16 @@ jobs:
compliance-copyrights:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: apache/skywalking-eyes@v0.6.0
- uses: actions/checkout@v7
- uses: apache/skywalking-eyes@v0.8.0

pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
python-version: "3.13"
- uses: pre-commit/action@v3.0.1

semgrep:
Expand All @@ -69,12 +69,12 @@ jobs:
test-splunk-unit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v3
uses: actions/create-github-app-token@v3.2.0
with:
client-id: ${{ secrets.GH_APP_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
Expand All @@ -83,7 +83,7 @@ jobs:
run: |
git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf https://github.com
git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf ssh://git@github.com
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1
poetry install
poetry run pytest -v tests/unit

Expand All @@ -101,12 +101,12 @@ jobs:
matrix:
splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v3
uses: actions/create-github-app-token@v3.2.0
with:
client-id: ${{ secrets.GH_APP_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
-v pytest-splunk-addon_results:/work/test-results \
registry.access.redhat.com/ubi7/ubi
docker cp dummy:/work/test-results/test.xml test-results-${{ matrix.splunk.version }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
if: always()
with:
name: splunk ${{ matrix.splunk.version }} external test artifacts
Expand Down Expand Up @@ -170,23 +170,23 @@ jobs:
"splunk_app_req_with_ep",
]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v3
uses: actions/create-github-app-token@v3.2.0
with:
client-id: ${{ secrets.GH_APP_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/setup-python@v5
- uses: actions/setup-python@v7
with:
python-version: 3.7
python-version: "3.13"
- run: |
git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf https://github.com
git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf ssh://git@github.com
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1
poetry install
poetry run pytest -v --splunk-version=${{ matrix.splunk.version }} -m docker -m ${{ matrix.test-marker }} tests/e2e
env:
Expand Down Expand Up @@ -232,26 +232,26 @@ jobs:
# label: "7.x"
name: "CIM models ${{ matrix.cim-models.label }} / Splunk ${{ matrix.splunk.version }}"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v3
uses: actions/create-github-app-token@v3.2.0
with:
client-id: ${{ secrets.GH_APP_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/setup-python@v5
- uses: actions/setup-python@v7
with:
python-version: "3.7"
python-version: "3.13"
- name: Install PSA with CIM models ${{ matrix.cim-models.label }}
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf https://github.com
git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf ssh://git@github.com
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1
poetry install
# Override the dev-dependency CIM models with the matrix version.
# Using pip inside the Poetry venv so the pytester subprocess sees
Expand Down Expand Up @@ -292,32 +292,32 @@ jobs:
- test-cim-models-versions
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
# Very Important semantic-release won't trigger a tagged
# build if this is not set false
submodules: false
persist-credentials: false
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v3
uses: actions/create-github-app-token@v3.2.0
with:
client-id: ${{ secrets.GH_APP_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/setup-python@v5
- uses: actions/setup-python@v7
with:
python-version: "3.7"
- uses: actions/download-artifact@v4
python-version: "3.13"
- uses: actions/download-artifact@v8
with:
name: THIRDPARTY
- name: Update Notices
run: cp -f THIRDPARTY NOTICE
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1
- id: semantic
uses: splunk/semantic-release-action@v1.3
uses: splunk/semantic-release-action@v1.3.10
with:
git_committer_name: ${{ secrets.SA_GH_USER_NAME }}
git_committer_email: ${{ secrets.SA_GH_USER_EMAIL }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
contents: write
pages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: 3.8
python-version: "3.13"
- run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1
pip install mkdocs mkdocs-material mkdocstrings-python
- name: Deploy to GitHub Pages
if: github.ref_name == 'main'
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/psf/black
rev: 22.8.0
rev: 26.5.1
hooks:
- id: black
1 change: 0 additions & 1 deletion deps/apps/Splunk_SA_CIM/bin/modaction_queue_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
ModularActionQutils,
)


logger = setup_logger("modaction_queue_handler")


Expand Down
1 change: 1 addition & 0 deletions deps/apps/Splunk_SA_CIM/lib/cim_models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Copyright (C) 2005 - 2019 Splunk Inc. All Rights Reserved.
"""

import json
import splunk.rest as rest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Copyright (C) 2005 - 2019 Splunk Inc. All Rights Reserved.
"""

from .base_modinput import logger
from .xml_modinput import XmlModularInput
from .json_modinput import JsonModularInput
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Copyright (C) 2005 - 2020 Splunk Inc. All Rights Reserved.
"""

import argparse
import getpass
import hashlib
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Copyright (C) 2005 - 2019 Splunk Inc. All Rights Reserved.
"""

import json
import re

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Copyright (C) 2005 - 2019 Splunk Inc. All Rights Reserved.
"""

import sys
import json
from .base_modinput import BaseModularInput, ModularInputConfig
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Copyright (C) 2005 - 2017 Splunk Inc. All Rights Reserved.
"""

import sys
import xml.dom
from xml.dom.minidom import Document
Expand Down
5 changes: 0 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ plugins:
- mkdocstrings:
handlers:
python:
setup_commands:
- import sys
- sys.path.append('../')
selection:
new_path_syntax: true
options:
inherited_members: false

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ classifiers = [
"Topic :: Software Development :: Testing",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.13",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use a Python 3.13-compatible pytest dependency

With this classifier, Python 3.13 users and the new 3.13 CI jobs that run poetry install are told this package is supported on 3.13, but pyproject.toml still constrains pytest to >5.4.0,<8 and the lock resolves pytest 7.4.4. pytest 7.4.x only advertises support through Python 3.12; Python 3.13 support starts in the 8.x line, so 3.13 installs are stuck on an unsupported test runner. Please update the pytest constraint/lock, likely with version markers if 3.7 support must remain, before advertising 3.13.

Useful? React with 👍 / 👎.

"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
]
Expand Down
1 change: 1 addition & 0 deletions pytest_splunk_addon/addon_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

Supports: fields from props & transforms, tags, eventtypes, savedsearches
"""

import os
import re
import logging
Expand Down
1 change: 1 addition & 0 deletions pytest_splunk_addon/addon_parser/eventtype_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""
Provides eventtypes.conf parsing mechanism
"""

from typing import Dict
from typing import Generator
from typing import Optional
Expand Down
2 changes: 1 addition & 1 deletion pytest_splunk_addon/addon_parser/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# -*- coding: utf-8 -*-
"""
Provides the Field class containing all the field properties and a decorator
Provides the Field class containing all the field properties and a decorator
to convert a list to field list
"""

Expand Down
1 change: 1 addition & 0 deletions pytest_splunk_addon/addon_parser/parser_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- Atomic writes with integrity hash to prevent corruption
- Automatic cleanup on process exit
"""

import atexit
import hashlib
import logging
Expand Down
1 change: 1 addition & 0 deletions pytest_splunk_addon/addon_parser/props_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""
Provides props.conf parsing mechanism
"""

from typing import Dict
from typing import Generator
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions pytest_splunk_addon/addon_parser/savedsearches_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""
Provides savedsearches.conf parsing mechanism
"""

from typing import Dict
from typing import Generator
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions pytest_splunk_addon/addon_parser/tags_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""
Provides tags.conf parsing mechanism
"""

import os
from typing import Optional, Dict, Generator
from urllib.parse import unquote
Expand Down
1 change: 1 addition & 0 deletions pytest_splunk_addon/addon_parser/transforms_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""
Provides transforms.conf parsing mechanism
"""

from typing import Dict
from typing import Generator
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions pytest_splunk_addon/app_test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
When running with pytest-xdist, generated test parameters are cached
to avoid redundant generation across workers.
"""

import logging
import os
from .fields_tests import FieldTestGenerator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""
Calculates the statistics of test cases and Creates a MarkDown Report
"""

from .markdown_report import MarkDownReport
from .markdown_table import MarkdownTable
from itertools import groupby
Expand Down
1 change: 1 addition & 0 deletions pytest_splunk_addon/cim_compliance/markdown_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""
Markdown generator
"""

from .base_report import CIMReport


Expand Down
Loading
Loading