Skip to content

Commit 0174a41

Browse files
authored
fix(slimctl): improve startup error reporting (#1248)
## Summary - improve slimctl startup error reporting and formatting - add coverage for formatted start errors - adjust bindings config used by slimctl ## Testing - task -d control-plane control-plane:test --------- Signed-off-by: Luca Muscariello <muscariello@ieee.org>
1 parent a40dce3 commit 0174a41

File tree

14 files changed

+1127
-55
lines changed

14 files changed

+1127
-55
lines changed

.github/workflows/control-plane.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
with:
2727
go-version: 1.25.5
2828
working-directory: ./control-plane
29+
use-local-bindings: true
30+
cgo-enabled: '1'
2931

3032
control-plane-docker-build:
3133
name: Build control plane docker image

.github/workflows/coverage.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ jobs:
3737
- name: Generate data plane coverage report (Rust + Python)
3838
run: task data-plane:coverage-full
3939

40+
- name: Setup SLIM Go bindings
41+
working-directory: ${{ github.workspace }}
42+
run: |
43+
CGO_ENABLED=1 task -d control-plane control-plane:go-bindings:setup \
44+
TARGETOS=$(go env GOOS) \
45+
TARGETARCH=$(go env GOARCH) \
46+
USE_LOCAL_BINDINGS=true
47+
4048
- name: Generate control-plane coverage reports
4149
run: task control-plane:coverage
4250
working-directory: control-plane

.github/workflows/integration-tests.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,29 @@ jobs:
4242
with:
4343
workspace: ./data-plane
4444

45+
- name: Setup SLIM Go bindings
46+
run: |
47+
task -d ./control-plane control-plane:go-bindings:setup \
48+
TARGETOS=$(go env GOOS) \
49+
TARGETARCH=$(go env GOARCH) \
50+
USE_LOCAL_BINDINGS=true
51+
52+
- name: Mirror bindings cache for CGO
53+
run: |
54+
CACHE_DIR="$(go env GOPATH)/.cgo-cache"
55+
REPO_ROOT="$(git rev-parse --show-toplevel)"
56+
REPO_CACHE="$REPO_ROOT/.cgo-cache"
57+
if [ -d "$CACHE_DIR/slim-bindings" ]; then
58+
mkdir -p "$REPO_CACHE"
59+
cp -a "$CACHE_DIR/slim-bindings" "$REPO_CACHE/"
60+
fi
61+
62+
- name: Generate Go bindings from cache
63+
run: |
64+
task -d ./data-plane/bindings/go generate-from-cache \
65+
TARGETOS=$(go env GOOS) \
66+
TARGETARCH=$(go env GOARCH)
67+
4568
- name: Run integration test suite
4669
working-directory: ./tests
4770
run: task tests:integration

0 commit comments

Comments
 (0)