-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: improve polling time merge 1 (#1132)
* # Conflicts: # .github/workflows/agreements.yaml # .github/workflows/cd-pages.yaml # .github/workflows/ci-main.yaml # .github/workflows/ci-release-pr.yaml # .github/workflows/ci-release.yaml # .github/workflows/release-notes.yaml # .gitignore # CHANGELOG.md # charts/splunk-connect-for-snmp/Chart.lock # charts/splunk-connect-for-snmp/Chart.yaml # charts/splunk-connect-for-snmp/templates/worker/_helpers.tpl # create_packages.sh # docker_compose/.env # docker_compose/Corefile # docker_compose/manage_secrets.py # docs/bestpractices.md # docs/dockercompose/2-download-package.md # docs/dockercompose/3-inventory-configuration.md # docs/dockercompose/4-scheduler-configuration.md # docs/dockercompose/5-traps-configuration.md # docs/dockercompose/6-env-file-configuration.md # docs/dockercompose/7-snmpv3-secrets.md # docs/gui/enable-gui.md # mkdocs.yml # poetry.lock # pyproject.toml # rendered/manifests/tests/splunk-connect-for-snmp/templates/worker/poller/deployment.yaml # rendered/manifests/tests/splunk-connect-for-snmp/templates/worker/sender/deployment.yaml # rendered/manifests/tests/splunk-connect-for-snmp/templates/worker/trap/deployment.yaml # rendered/manifests/tests_autoscaling_enabled/splunk-connect-for-snmp/templates/worker/poller/deployment.yaml # rendered/manifests/tests_autoscaling_enabled/splunk-connect-for-snmp/templates/worker/sender/deployment.yaml # rendered/manifests/tests_autoscaling_enabled/splunk-connect-for-snmp/templates/worker/trap/deployment.yaml # rendered/manifests/tests_autoscaling_enabled_deprecated/splunk-connect-for-snmp/templates/worker/poller/deployment.yaml # rendered/manifests/tests_autoscaling_enabled_deprecated/splunk-connect-for-snmp/templates/worker/sender/deployment.yaml # rendered/manifests/tests_autoscaling_enabled_deprecated/splunk-connect-for-snmp/templates/worker/trap/deployment.yaml # rendered/manifests/tests_enable_ui/splunk-connect-for-snmp/templates/worker/poller/deployment.yaml # rendered/manifests/tests_enable_ui/splunk-connect-for-snmp/templates/worker/sender/deployment.yaml # rendered/manifests/tests_enable_ui/splunk-connect-for-snmp/templates/worker/trap/deployment.yaml # rendered/manifests/tests_only_polling/splunk-connect-for-snmp/templates/worker/poller/deployment.yaml # rendered/manifests/tests_only_polling/splunk-connect-for-snmp/templates/worker/sender/deployment.yaml # rendered/manifests/tests_only_traps/splunk-connect-for-snmp/templates/worker/sender/deployment.yaml # rendered/manifests/tests_only_traps/splunk-connect-for-snmp/templates/worker/trap/deployment.yaml # rendered/manifests/tests_probes_enabled/splunk-connect-for-snmp/templates/worker/poller/deployment.yaml # rendered/manifests/tests_probes_enabled/splunk-connect-for-snmp/templates/worker/sender/deployment.yaml # rendered/manifests/tests_probes_enabled/splunk-connect-for-snmp/templates/worker/trap/deployment.yaml # splunk_connect_for_snmp/__init__.py # splunk_connect_for_snmp/enrich/tasks.py # splunk_connect_for_snmp/inventory/loader.py # splunk_connect_for_snmp/snmp/auth.py # splunk_connect_for_snmp/snmp/manager.py # splunk_connect_for_snmp/splunk/tasks.py # splunk_connect_for_snmp/traps.py # test/snmp/test_auth.py * chore: update lock * test: test [run-int-tests]
- Loading branch information
Showing
180 changed files
with
7,334 additions
and
2,066 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: dashboard-release | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
dashboard-release: | ||
name: Dashboard release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Upload dashboard to release assets | ||
run: | | ||
VERSION=$(echo $GITHUB_REF | cut -d / -f 3) | ||
gh release upload $VERSION dashboard/dashboard.xml | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,18 +59,18 @@ jobs: | |
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} | ||
semgrep-scan: | ||
name: semgrep | ||
runs-on: ubuntu-latest | ||
if: (github.actor != 'dependabot[bot]') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: semgrep/semgrep-action@v1 | ||
with: | ||
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
uses: splunk/sast-scanning/.github/workflows/sast-scan.yml@main | ||
secrets: inherit | ||
with: | ||
block_mode: "on" | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- uses: pre-commit/[email protected] | ||
test-unit: | ||
name: Test Unit Python ${{ matrix.python-version }} | ||
|
@@ -128,8 +128,8 @@ jobs: | |
commit_message: | ||
echo "${{ steps.get_commit_message.outputs.commit_message }}" | ||
|
||
test-integration: | ||
name: Run integration tests | ||
test-integration-microk8s: | ||
name: Run integration tests in microk8s deployment | ||
needs: | ||
- integration-tests-check | ||
runs-on: ubuntu-latest | ||
|
@@ -138,17 +138,55 @@ jobs: | |
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v4 | ||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: run install_microk8s.sh | ||
run: | | ||
sudo snap install microk8s --classic --channel=1.30/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 integration | ||
- name: run automatic_setup_microk8s.sh | ||
run: integration_tests/automatic_setup_microk8s.sh integration | ||
- name: run tests | ||
working-directory: integration_tests | ||
run: | | ||
poetry run pytest --splunk_host="localhost" --splunk_password="changeme2" --trap_external_ip="$(hostname -I | cut -d " " -f1)" | ||
poetry run pytest --splunk_host="localhost" --splunk_password="changeme2" --trap_external_ip="$(hostname -I | cut -d " " -f1)" --sc4snmp_deployment="microk8s" | ||
test-integration-compose: | ||
name: Run integration tests in docker compose deployment | ||
needs: | ||
- integration-tests-check | ||
runs-on: ubuntu-latest | ||
if: "contains(needs.integration-tests-check.outputs.commit_message, '[run-int-tests]')" | ||
timeout-minutes: 120 | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v4 | ||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install docker compose | ||
run: | | ||
# Add Docker's official GPG key: | ||
sudo apt-get update | ||
sudo apt-get install ca-certificates curl | ||
sudo install -m 0755 -d /etc/apt/keyrings | ||
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | ||
sudo chmod a+r /etc/apt/keyrings/docker.asc | ||
# Add the repository to Apt sources: | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
sudo apt-get update | ||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | ||
- name: run automatic_setup_compose.sh | ||
run: integration_tests/automatic_setup_compose.sh integration | ||
- name: run tests | ||
working-directory: integration_tests | ||
run: | | ||
poetry run pytest --splunk_host="localhost" --splunk_password="changeme2" --trap_external_ip="$(hostname -I | cut -d " " -f1)" --sc4snmp_deployment="docker-compose" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ jobs: | |
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GitHub Packages Docker Registry | ||
uses: docker/login-action@v3.1.0 | ||
uses: docker/login-action@v3.3.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
|
@@ -64,7 +64,7 @@ jobs: | |
type=ref,event=pr | ||
- name: Build and push action | ||
id: docker_action_build | ||
uses: docker/build-push-action@v5 | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
|
@@ -77,7 +77,7 @@ jobs: | |
node-version: "14" | ||
- name: Semantic Release | ||
id: version | ||
uses: splunk/[email protected].4 | ||
uses: splunk/[email protected].9 | ||
with: | ||
git_committer_name: ${{ secrets.SA_GH_USER_NAME }} | ||
git_committer_email: ${{ secrets.SA_GH_USER_EMAIL }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,6 +104,7 @@ celerybeat.pid | |
# Environments | ||
.env | ||
!docker_compose/.env | ||
!integration_tests/.env | ||
.venv | ||
env/ | ||
venv/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
Dockerfile | ||
integration_tests/ | ||
docs/ | ||
test/ | ||
ui_tests/ | ||
integration_tests/ | ||
rendered/ | ||
examples/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.