Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
99 changes: 99 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,105 @@ jobs:
- name: Run tests
run: make test

e2e-tests-docker:
if: needs.files-changed.outputs.go == 'true'
needs: ["files-changed", "test"]
runs-on:
group: huge-runners
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
edition: [community, enterprise]
steps:
- uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.25"

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Set up Python and uv
uses: astral-sh/setup-uv@v7

- name: Install tini
run: apt-get update && apt-get install -y tini

- name: Build infrahub-backup binary
run: make build

- name: Install Python dependencies
run: uv sync --all-packages

- name: "Set environment variables"
run: |
RUNNER_NAME=$(echo "${{ runner.name }}" | grep -o 'ghrunner[0-9]\+' | sed 's/ghrunner\([0-9]\+\)/ghrunner_\1/')
echo "PYTEST_DEBUG_TEMPROOT=/var/lib/github/${RUNNER_NAME}/_temp" >> $GITHUB_ENV

- name: Run e2e tests (Docker Compose)
env:
INFRAHUB_TESTING_ENTERPRISE: ${{ matrix.edition == 'enterprise' && 'true' || '' }}
run: exec tini -s -g -- uv run pytest -v -m docker tests/e2e

e2e-tests-k8s:
if: needs.files-changed.outputs.go == 'true'
needs: ["files-changed", "test"]
runs-on:
group: huge-runners
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
edition: [community, enterprise]
env:
INFRAHUB_HELM_CHART: ${{ matrix.edition == 'enterprise' && 'oci://registry.opsmill.io/opsmill/chart/infrahub-enterprise' || 'oci://registry.opsmill.io/opsmill/chart/infrahub' }}
steps:
- uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.25"

- name: Set up vCluster
uses: loft-sh/setup-vcluster@68e17a8c3618e3c47d635842b803d4f560f694e8

- name: Set up Helm
uses: azure/setup-helm@v4

- name: Set up kubectl
uses: azure/setup-kubectl@v4

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Set up Python and uv
uses: astral-sh/setup-uv@v7

- name: Install tini
run: apt-get update && apt-get install -y tini

- name: Build infrahub-backup binary
run: make build

- name: Install Python dependencies
run: uv sync --all-packages

- name: "Set environment variables"
run: |
RUNNER_NAME=$(echo "${{ runner.name }}" | grep -o 'ghrunner[0-9]\+' | sed 's/ghrunner\([0-9]\+\)/ghrunner_\1/')
echo "VCLUSTER_DIR=/var/lib/github/${RUNNER_NAME}/_temp/.vcluster/config.json" >> $GITHUB_ENV

- name: Run e2e tests (Kubernetes)
run: exec tini -s -g -- uv run pytest -v -m k8s tests/e2e

nix-build:
if: needs.files-changed.outputs.nix == 'true'
needs: ["files-changed"]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.pyc
bin/
infrahub_backups/
src/internal/app/embedded/neo4jwatchdog/*watchdog*
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
inherit version;
src = ./.;

vendorHash = "sha256-lJAyBku/8mTeqC8u9CsL/+Z+eTwJFM6kAcxywYZtwmo=";
vendorHash = "sha256-W7KHeb9vue1Z9pCi00q174yHi0RtbVLjYlSGdVSRo7s=";

# Don't run preBuild (watchdog compilation) in the go-modules
# derivation — it only needs to fetch/vendor dependencies.
Expand Down
61 changes: 34 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module infrahub-ops
go 1.25.0

require (
github.com/PlakarKorp/integration-fs v1.0.14
github.com/PlakarKorp/integration-s3 v1.0.8
github.com/PlakarKorp/kloset v1.0.13
github.com/PlakarKorp/integration-fs v1.1.0-beta.5
github.com/PlakarKorp/integration-s3 v1.1.0-beta.5
github.com/PlakarKorp/kloset v1.1.0-beta.6
github.com/aws/aws-sdk-go-v2 v1.41.4
github.com/aws/aws-sdk-go-v2/config v1.32.12
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.1.10
Expand All @@ -19,8 +19,8 @@ require (

require (
github.com/DataDog/zstd v1.5.7 // indirect
github.com/PlakarKorp/go-cdc-chunkers v1.0.2 // indirect
github.com/RaduBerinde/axisds v0.0.0-20250419182453-5135a0650657 // indirect
github.com/PlakarKorp/go-cdc-chunkers v1.0.3 // indirect
github.com/RaduBerinde/axisds v0.1.0 // indirect
github.com/RaduBerinde/btreemap v0.0.0-20250419174037-3d62b7205d54 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.7 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.19.12 // indirect
Expand All @@ -40,20 +40,20 @@ require (
github.com/aws/smithy-go v1.24.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/crlib v0.0.0-20250110162118-b7c9be99e911 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/crlib v0.0.0-20250718215705-7ff5051265b9 // indirect
github.com/cockroachdb/errors v1.12.0 // indirect
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect
github.com/cockroachdb/pebble/v2 v2.1.2 // indirect
github.com/cockroachdb/pebble/v2 v2.1.4 // indirect
github.com/cockroachdb/redact v1.1.6 // indirect
github.com/cockroachdb/swiss v0.0.0-20251224182025-b0f6560f979b // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.11 // indirect
github.com/getsentry/sentry-go v0.31.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
github.com/getsentry/sentry-go v0.35.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.6.2 // indirect
github.com/go-git/go-git/v5 v5.16.4 // indirect
github.com/go-git/go-billy/v5 v5.8.0 // indirect
github.com/go-git/go-git/v5 v5.17.0 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/goccy/go-json v0.10.5 // indirect
Expand All @@ -68,22 +68,24 @@ require (
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-sqlite3 v1.14.32 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/minio/crc64nvme v1.0.2 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/minio-go/v7 v7.0.95 // indirect
github.com/minio/minlz v1.0.1-0.20250507153514-87eb42fe8882 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/nickball/go-aes-key-wrap v0.0.0-20170929221519-1c3aa3e4dfc5 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/philhofer/fwd v1.2.0 // indirect
github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/pierrec/lz4/v4 v4.1.26 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/xattr v0.4.12 // indirect
github.com/prometheus/client_golang v1.21.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.63.0 // indirect
github.com/prometheus/procfs v0.16.0 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.66.1 // indirect
github.com/prometheus/procfs v0.17.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
Expand All @@ -92,18 +94,23 @@ require (
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tink-crypto/tink-go/v2 v2.5.0 // indirect
github.com/tink-crypto/tink-go/v2 v2.6.0 // indirect
github.com/tinylib/msgp v1.3.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zeebo/blake3 v0.2.4 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
golang.org/x/mod v0.30.0 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/text v0.31.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
golang.org/x/crypto v0.49.0 // indirect
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect
golang.org/x/mod v0.34.0 // indirect
golang.org/x/net v0.51.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/text v0.35.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
modernc.org/libc v1.67.6 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect
modernc.org/sqlite v1.46.1 // indirect
)
Loading
Loading