Skip to content
Merged
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
9 changes: 9 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,12 @@ The codebase uses explicit error wrapping with `fmt.Errorf` for context. All com
- Different perspectives or approaches are acknowledged where relevant
- The content remains focused on explanation without drifting into tutorial or reference material
- The explanation answers "why" questions, not just "what" or "how"

## Active Technologies

- Go 1.25.0 + kloset v1.0.13 (Plakar core), integration-fs (storage), cobra, logrus, viper (002-plakar-integration)
- Plakar repository (local filesystem or S3 via integration backends) (002-plakar-integration)

## Recent Changes

- 002-plakar-integration: Added kloset (Plakar core library), integration-fs (filesystem storage/exporter), cobra, logrus
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ BUILD_DIR=$(shell pwd)/bin
SRC_ROOT=./src
VERSION?=
LDFLAGS=-ldflags "-X main.version=$(VERSION) -s -w"
# cockroachdb/swiss (transitive dep of pebble cache) needs this tag for Go 1.26+
GO_TAGS=-tags untested_go_version
CGO_ENABLED=0

# Default target
Expand All @@ -20,7 +22,7 @@ build: build-watchdog ## Build all CLI binaries for the current platform
@mkdir -p $(BUILD_DIR)
@for bin in $(BINARIES); do \
echo " $$bin"; \
CGO_ENABLED=$(CGO_ENABLED) go build $(LDFLAGS) -o $(BUILD_DIR)/$$bin $(SRC_ROOT)/cmd/$$bin; \
CGO_ENABLED=$(CGO_ENABLED) go build $(GO_TAGS) $(LDFLAGS) -o $(BUILD_DIR)/$$bin $(SRC_ROOT)/cmd/$$bin; \
done
@echo "Binaries available in $(BUILD_DIR)"

Expand All @@ -39,7 +41,7 @@ build-all: build-watchdog ## Build for multiple platforms
EXT=$$( [ "$$OS" = "windows" ] && echo ".exe" ); \
OUT=$(BUILD_DIR)/$$bin-$$OS-$$ARCH$$EXT; \
echo " $$bin ($$OS/$$ARCH)"; \
CGO_ENABLED=$(CGO_ENABLED) GOOS=$$OS GOARCH=$$ARCH go build $(LDFLAGS) -o "$$OUT" $(SRC_ROOT)/cmd/$$bin; \
CGO_ENABLED=$(CGO_ENABLED) GOOS=$$OS GOARCH=$$ARCH go build $(GO_TAGS) $(LDFLAGS) -o "$$OUT" $(SRC_ROOT)/cmd/$$bin; \
done; \
done
@echo "Built binaries are located in $(BUILD_DIR)"
Expand All @@ -48,7 +50,7 @@ install: ## Install the binaries to $GOPATH/bin
@echo "Installing Infrahub CLI binaries..."
@for bin in $(BINARIES); do \
echo " $$bin"; \
go install $(LDFLAGS) $(SRC_ROOT)/cmd/$$bin; \
go install $(GO_TAGS) $(LDFLAGS) $(SRC_ROOT)/cmd/$$bin; \
done
@echo "Binaries installed to $(shell go env GOPATH)/bin/"

Expand All @@ -59,11 +61,11 @@ clean: ## Clean build artifacts

test: ## Run tests
@echo "Running tests..."
@go test -v ./...
@go test $(GO_TAGS) -v ./...

test-coverage: ## Run tests with coverage
@echo "Running tests with coverage..."
@go test -v -coverprofile=coverage.out ./...
@go test $(GO_TAGS) -v -coverprofile=coverage.out ./...
@go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report generated: coverage.html"

Expand All @@ -77,7 +79,7 @@ fmt: ## Format Go code

vet: ## Run go vet
@echo "Running go vet..."
@go vet ./...
@go vet $(GO_TAGS) ./...

deps: ## Download dependencies
@echo "Downloading dependencies..."
Expand Down
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-X41cj2EiaeSf9yrJdb6yM9kMmngN8OhH4E6JGlXBsH4=";
vendorHash = "sha256-lJAyBku/8mTeqC8u9CsL/+Z+eTwJFM6kAcxywYZtwmo=";

# Don't run preBuild (watchdog compilation) in the go-modules
# derivation — it only needs to fetch/vendor dependencies.
Expand Down
63 changes: 62 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +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/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 @@ -15,6 +18,10 @@ 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/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
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.20 // indirect
Expand All @@ -31,18 +38,72 @@ require (
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.17 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.41.9 // indirect
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/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect
github.com/cockroachdb/pebble/v2 v2.1.2 // 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/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/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-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
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/klauspost/compress v1.18.0 // indirect
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/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/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/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/rogpeppe/go-internal v1.14.1 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spf13/afero v1.15.0 // indirect
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/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/v3 v3.0.4 // indirect
golang.org/x/text v0.29.0 // 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
gopkg.in/warnings.v0 v0.1.2 // indirect
)
Loading
Loading