Skip to content

Commit

Permalink
feat: release 1.10.0 (#972)
Browse files Browse the repository at this point in the history
* feat: Add SC4SNMP UI (#904)

* feat: Add SC4SNMP UI

fix: fix tests and apply make render

* chore(release): 1.10.0-beta.1

# [1.10.0-beta.1](v1.9.3...v1.10.0-beta.1) (2023-10-26)

### Features

* Add SC4SNMP UI ([#904](#904)) ([3fce93a](3fce93a))

* chore: update mike poetry (#905)

* chore: update semgrep (#917)

* chore: update dockerfile (#916)

* fix: add reverse dns lookup in traps (#920)

fix: fix test service

* chore(release): 1.10.0-beta.2

# [1.10.0-beta.2](v1.10.0-beta.1...v1.10.0-beta.2) (2023-11-27)

### Bug Fixes

* add reverse dns lookup in traps ([#920](#920)) ([7812d0c](7812d0c))

* chore: sc4snmp UI tests (#914)

* SC4SNMP UI tests

* chore: fix ui test (#926)

* chore(deps): update dependency ruamel.yaml to ^0.18.0 (#901)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/setup-python action to v5 (#924)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/checkout action to v4 (#922)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency requests-cache to v1.1.1 (#921)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/setup-node action to v4 (#902)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency opentelemetry-exporter-jaeger-thrift to v1.21.0 (#912)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency opentelemetry-api to v1.21.0 (#911)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency mike to v2 (#910)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency pytest to v7.4.3 (#903)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency pymongo to v4.6.1 (#909)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency mkdocs-material to v9.5.2 (#906)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update helm release redis to ~18.5.0 (#907)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency celery to v5.3.6 (#915)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/upload-artifact action to v4 (#927)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency opentelemetry-sdk to v1.21.0 (#913)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: note about docker compose POC (#940)

fix: change the text

* chore(release): 1.10.0-beta.3

# [1.10.0-beta.3](v1.10.0-beta.2...v1.10.0-beta.3) (2024-01-09)

### Bug Fixes

* note about docker compose POC ([#940](#940)) ([73af53b](73af53b))

* chore: update pysnmplib to 5.0.24 (#948)

* chore: update fossa exclude paths (#945)

* chore(deps): update dependency pytest to v8 (#947)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: add logs in traps server for situations when incoming traps have wrong credentials (#953)

fix: delete unwanted files

fix: add logging of source device ip

fix: log only necessary info

fix: run pre-commit

fix: update the troubleshooting documentation

fix: add comment in code

fix: fixes from pr review

fix: fix typos in documentation

* chore(release): 1.10.0-beta.4

# [1.10.0-beta.4](v1.10.0-beta.3...v1.10.0-beta.4) (2024-02-08)

### Bug Fixes

* add logs in traps server for situations when incoming traps have wrong credentials ([#953](#953)) ([0cdd7ec](0cdd7ec))

* doc: troubleshooting of polling authentication errors (#957)

doc: changes after PR

* fix: fix error handling issues from sonarqube (#956)

fix: fix error handling issues from sonarqube

fix: fix other exceptions

fix: fix more exception handling issues

* chore(release): 1.10.0-beta.5

# [1.10.0-beta.5](v1.10.0-beta.4...v1.10.0-beta.5) (2024-02-15)

### Bug Fixes

* fix error handling issues from sonarqube ([#956](#956)) ([4684a4d](4684a4d))

* chore(deps): update dependency python-dotenv to v1.0.1 (#944)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: dotenv error (#962)

* chore(release): 1.10.0-beta.6

# [1.10.0-beta.6](v1.10.0-beta.5...v1.10.0-beta.6) (2024-02-20)

### Bug Fixes

* dotenv error ([#962](#962)) ([5aedaa9](5aedaa9))

* chore: fix workflows with ui tests (#961)

* Docs update (#950)

docs: Update sc4snmp documentation

* chore: update CHANGELOG.md (#971)

---------

Co-authored-by: wojtekzyla <[email protected]>
Co-authored-by: srv-rr-github-token <[email protected]>
Co-authored-by: pszkamruk-splunk <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mmsplunker <[email protected]>
  • Loading branch information
6 people authored Mar 5, 2024
1 parent f6494a5 commit 1be3947
Show file tree
Hide file tree
Showing 162 changed files with 7,449 additions and 797 deletions.
8 changes: 7 additions & 1 deletion .fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ version: 3
server: https://app.fossa.com
project:
id: "splunk-connect-for-snmp"
team: "TA-Automation"
team: "TA-Automation"

paths:
exclude:
- ui_tests
- test
- integration_tests
16 changes: 8 additions & 8 deletions .github/workflows/ci-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: run fossa anlyze and create report
- name: run fossa analyze and create report
run: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
fossa analyze --debug
fossa report attribution --format text > /tmp/THIRDPARTY
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
- name: upload THIRDPARTY file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: THIRDPARTY
path: /tmp/THIRDPARTY
Expand All @@ -63,26 +63,26 @@ jobs:
if: (github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v4
- uses: returntocorp/semgrep-action@v1
- uses: semgrep/semgrep-action@v1
with:
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
test-unit:
name: Test Unit Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.9
- "3.10"
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
Expand All @@ -102,7 +102,7 @@ jobs:
fail_ci_if_error: true
path_to_write_report: ./coverage/codecov_report.txt
verbose: true
- uses: actions/upload-artifact@v3 # upload test results
- uses: actions/upload-artifact@v4 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results-unit-python_${{ matrix.python-version }}
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
sudo apt-get install snmp -y
sudo apt-get install python3-dev -y
- name: run automatic_setup.sh
run: integration_tests/automatic_setup.sh
run: integration_tests/automatic_setup.sh integration
- name: run tests
working-directory: integration_tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-to: type=inline
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "14"

2 changes: 1 addition & 1 deletion .github/workflows/ci-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-to: type=inline
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "14"
- name: Semantic Release
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/ci-ui-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: ui-tests
on:
push:
branches:
- "main"
- "develop"
- "next"
- "sc4snmp-ui-tests"
pull_request:
branches:
- "main"
- "develop"
- "next"
jobs:
ui-tests-check:
name: Check if run ui tests
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get commit message
id: get_commit_message
run: |
if [[ '${{ github.event_name }}' == 'push' ]]; then
echo ::set-output name=commit_message::$(git log --format=%B -n 1 HEAD)
elif [[ '${{ github.event_name }}' == 'pull_request' ]]; then
echo ::set-output name=commit_message::$(git log --format=%B -n 1 HEAD^2)
fi
outputs:
commit_message:
echo "${{ steps.get_commit_message.outputs.commit_message }}"

run-ui-e2e-tests:
name: run UI e2e tests
needs:
- ui-tests-check
runs-on: ubuntu-latest
if: "contains(needs.ui-tests-check.outputs.commit_message, '[run-ui-tests]')"
timeout-minutes: 120
env:
CI_EXECUTION_TYPE: ci

strategy:
matrix:
execution-type: ["basic", "extended"]

steps:
- name: Checkout Project
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: remove not used docker images
run: |
echo "docker rmi"
docker rmi $(docker images -q) || true
docker images
echo "check disk free space"
df -h
- name: prepare values.yaml for configuration storing
working-directory: integration_tests
run: |
cp ./../ui_tests/config/ui_values.yaml ./values.yaml
sed -i "s|/home/splunker|$(pwd)|g" values.yaml
- name: install microk8s
run: |
sudo snap install microk8s --classic --channel=1.25/stable
sudo apt-get install snmp -y
sudo apt-get install python3-dev -y
- name: run automatic_setup.sh
run: integration_tests/automatic_setup.sh

- name: install dependencies
working-directory: ui_tests
run: |
pip install -r requirements.txt
export PATH="/home/ubuntu/.local/bin:$PATH"
- name: run tests
working-directory: ui_tests
run: |
sudo microk8s kubectl get pod -n sc4snmp
echo "check if UI is available - curl"
curl http://localhost:30001
echo "run tests"
pytest -vvv --splunk-user=admin --splunk-password="changeme2" --splunk-host="localhost" --device-simulator="$(hostname -I | cut -d " " -f1)" -k ${{ matrix.execution-type }}
2 changes: 1 addition & 1 deletion .github/workflows/mike.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
sudo apt install gnome-keyring
BRANCH=$(echo $GITHUB_REF | cut -d / -f 3)
echo $BRANCH
pip3 install poetry=="1.2.2"
pip3 install poetry=="1.5.1"
poetry install
poetry run pip install 'setuptools==65.6.3'
poetry run mike deploy -p $BRANCH
4 changes: 2 additions & 2 deletions .github/workflows/offline-installation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install ruamel.yaml
Expand All @@ -36,7 +36,7 @@ jobs:
GET_YAML_FIELD_SCRIPT: get_yaml_fields.py
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: /tmp/package/packages
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

## Unreleased

## [1.10.0]

### Changed
- add sc4snmp ui
- add reverse dns lookup in traps
- upgrade chart dependencies: redis to ~18.5.0, mibserver to 1.15.7
- add beta support for docker-compose deployment
- add log messages for invalid traps configuration
- review and update of documentation

### Fixed
- error handling to be more precise

## [1.9.3]

### Changed
Expand Down
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.10.0-bullseye as base
FROM python:3.10.0-bullseye AS base

ENV PYTHONFAULTHANDLER=1 \
PYTHONHASHSEED=random \
PYTHONUNBUFFERED=1
RUN mkdir /app
WORKDIR /app

FROM base as builder
FROM base AS builder
RUN pip install --upgrade pip ;\
pip install poetry

Expand All @@ -18,10 +18,7 @@ RUN poetry config virtualenvs.in-project true ;\
. /app/.venv/bin/activate ;\
pip install dist/*.whl




FROM base as final
FROM base AS final

COPY --from=builder /app/.venv /app/.venv
COPY entrypoint.sh ./
Expand Down
8 changes: 4 additions & 4 deletions charts/splunk-connect-for-snmp/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ dependencies:
version: 13.18.5
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 18.1.6
version: 18.5.0
- name: mibserver
repository: https://pysnmp.github.io/mibs/charts/
version: 1.15.5
digest: sha256:a3b073e1425f293d0df10b58f5c4ea599a6ac8b550affc6be45c6dcd01478720
generated: "2023-10-23T01:58:29.993501241Z"
version: 1.15.7
digest: sha256:692c53672741f1c2f75c021c3f75ae45290195e5efaeffc9a06b5cb5b0d6ac12
generated: "2023-12-11T13:21:44.273403415Z"
6 changes: 3 additions & 3 deletions charts/splunk-connect-for-snmp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 1.9.3
version: 1.10.0-beta.6
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.9.3"
appVersion: "1.10.0-beta.6"
#
dependencies:
- name: mongodb
version: ~13.18.0
repository: https://charts.bitnami.com/bitnami
- name: redis
version: ~18.1.0
version: ~18.5.0
repository: https://charts.bitnami.com/bitnami
- name: mibserver
version: ~1.15
Expand Down
2 changes: 2 additions & 0 deletions charts/splunk-connect-for-snmp/templates/inventory/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
value: {{ .Values.scheduler.logLevel | default "INFO" }}
- name: CHAIN_OF_TASKS_EXPIRY_TIME
value: {{ .Values.scheduler.tasksExpiryTime | quote }}
- name: CONFIG_FROM_MONGO
value: {{ quote .Values.UI.enable | default "false" }}
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
Loading

0 comments on commit 1be3947

Please sign in to comment.