Skip to content

Commit 4e7db0f

Browse files
authored
feat(cluster): Install copr main NetworkManager RPM on NM_VERSION=latest (#1385)
This commit enhances the development cluster setup to support testing with the latest NetworkManager builds from COPR. Key changes include: - Add NM_VERSION environment variable support to cluster-up workflow - When NM_VERSION=latest, install NetworkManager from COPR networkmanager/NetworkManager-main repository during cluster setup - Rename "future" terminology to "latest" for nmstate periodic testing - Rename automation/nmstate-future-reporter to nmstate-latest-reporter - Update NMSTATE_PIN variable to NMSTATE_VERSION for consistency - Enhance Slack bot to report both nmstate and NetworkManager versions with clickable links to COPR build pages - Add COPR API integration to fetch build IDs for version tracking This allows developers to test kubernetes-nmstate with bleeding-edge NetworkManager builds alongside nmstate-git, helping identify compatibility issues early in the development cycle. Signed-off-by: Enrique Llorente <[email protected]>
1 parent d5e2ab7 commit 4e7db0f

File tree

16 files changed

+543
-310
lines changed

16 files changed

+543
-310
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Future-Job slack bot
1+
name: Latest-Job slack bot
22

33
on:
44
schedule:
@@ -7,11 +7,11 @@ on:
77

88
defaults:
99
run:
10-
working-directory: ./automation/nmstate-future-reporter
10+
working-directory: ./automation/nmstate-latest-reporter
1111

1212
jobs:
1313
build-and-run-slack-bot:
14-
name: Future-job slack bot
14+
name: Latest-job slack bot
1515
if: github.repository == 'nmstate/kubernetes-nmstate'
1616
runs-on: ubuntu-latest
1717
steps:
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Go
2121
uses: actions/setup-go@v5
2222
with:
23-
go-version-file: ./automation/nmstate-future-reporter/go.mod
23+
go-version-file: ./automation/nmstate-latest-reporter/go.mod
2424

2525
- name: Build
2626
run: go build -v .
@@ -29,4 +29,4 @@ jobs:
2929
env:
3030
NMSTATE_SLACK_WEBHOOK_URL: ${{ secrets.NMSTATE_SLACK_WEBHOOK_URL }}
3131
run: |
32-
./nmstate-future-reporter
32+
./nmstate-latest-reporter

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Temporary Build Files
22
build/_output
33
build/_test
4+
*nmstate-future-reporter
45

56
# Cloned kubevirtci
67
_kubevirtci

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ Cluster configuration via environment variables:
181181
- `KUBEVIRT_NUM_NODES`: Number of nodes (default: 3)
182182
- `KUBEVIRT_NUM_SECONDARY_NICS`: Secondary NICs per node (default: 2)
183183
- `KUBECONFIG`: Path to kubeconfig (auto-detected via ./cluster/kubeconfig.sh)
184+
- `NMSTATE_VERSION`: When set to `latest`, uses nmstate-git from copr during `make cluster-up`
185+
- `NM_VERSION`: When set to `latest`, installs NetworkManager from copr networkmanager/NetworkManager-main repository during `make cluster-up`
184186

185187
Network interface names vary by provider:
186188
- k8s providers: eth0, eth1, eth2

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export IMAGE_REGISTRY ?= quay.io
77
IMAGE_REPO ?= nmstate
88
NAMESPACE ?= nmstate
99

10-
ifeq ($(NMSTATE_PIN), future)
10+
ifeq ($(NMSTATE_VERSION), latest)
1111
HANDLER_EXTRA_PARAMS:= "--build-arg NMSTATE_SOURCE=git"
1212
endif
1313

@@ -196,6 +196,12 @@ test/unit/api:
196196
test/unit: test/unit/api
197197
NODE_NAME=node01 $(GINKGO) --junit-report=junit-pkg-controller-unit-test.xml $(unit_test_args) $(WHAT)
198198

199+
test-reporter:
200+
cd automation/nmstate-latest-reporter && \
201+
go run . --dry-run --fake=success && \
202+
go run . --dry-run --fake=failure && \
203+
go run . --dry-run --fake=stale
204+
199205
test-e2e-handler:
200206
KUBECONFIG=$(KUBECONFIG) OPERATOR_NAMESPACE=$(OPERATOR_NAMESPACE) MONITORING_NAMESPACE=$(MONITORING_NAMESPACE) $(GINKGO) $(e2e_test_args) ./test/e2e/handler ...
201207

@@ -277,6 +283,7 @@ olm-push: bundle-push index-push
277283
test-e2e-handler \
278284
test-e2e-operator \
279285
test-e2e \
286+
test-reporter\
280287
cluster-up \
281288
cluster-down \
282289
cluster-sync-operator \

automation/check-patch.unit-test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ main() {
1212
cd ${TMP_PROJECT_PATH}
1313
export ARCHS="amd64 arm64"
1414
make all
15+
make test-reporter
1516
make UNIT_TEST_ARGS="--output-dir=$ARTIFACTS --no-color --compilers=2" test/unit
1617
}
1718

automation/nmstate-future-reporter/main.go

Lines changed: 0 additions & 292 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nmstate-latest-reporter

0 commit comments

Comments
 (0)