diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a331f04..01b19139 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: Check formatting run: make fmt @@ -30,7 +30,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: Install dependencies run: sudo apt-get install -y genisoimage podman netcat diff --git a/Makefile b/Makefile index 3ccbf5c9..180c3819 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ lint :$(GOPATH)/golangci-lint GOLANGCI_LINT_CACHE=/tmp/golangci-lint-cache/ $(GOPATH)/golangci-lint run ironic $(GOPATH)/golangci-lint: - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH) v1.50.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH) v1.59.1 test: go test -tags "${TAGS}" -v ./ironic diff --git a/hack/local_ironic.sh b/hack/local_ironic.sh index ca8eafd0..95878158 100755 --- a/hack/local_ironic.sh +++ b/hack/local_ironic.sh @@ -8,12 +8,15 @@ else CONTAINER_RUNTIME=docker fi -IMAGE=${IMAGE:-quay.io/metal3-io/ironic:main} +# NOTE(dtantsur): release-24.1 is the last branch to support inspector +IMAGE=${IMAGE:-quay.io/metal3-io/ironic:release-24.1} sudo $CONTAINER_RUNTIME run -d --net host --privileged --name ironic \ - --entrypoint /bin/runironic -e "PROVISIONING_IP=127.0.0.1" $IMAGE + --entrypoint /bin/runironic -e "PROVISIONING_IP=127.0.0.1" \ + -e "USE_IRONIC_INSPECTOR=true" $IMAGE sudo $CONTAINER_RUNTIME run -d --net host --privileged --name ironic-inspector \ - --entrypoint /bin/runironic-inspector -e "PROVISIONING_IP=127.0.0.1" $IMAGE + --entrypoint /bin/runironic-inspector -e "PROVISIONING_IP=127.0.0.1" \ + -e "USE_IRONIC_INSPECTOR=true" $IMAGE for attempt in {1..30}; do sleep 2 diff --git a/ironic/resource_ironic_node_v1.go b/ironic/resource_ironic_node_v1.go index b8172a31..170746e6 100644 --- a/ironic/resource_ironic_node_v1.go +++ b/ironic/resource_ironic_node_v1.go @@ -58,7 +58,7 @@ func resourceNodeV1() *schema.Resource { "driver_info": { Type: schema.TypeMap, Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + DiffSuppressFunc: func(k, old, _ string, _ *schema.ResourceData) bool { /* FIXME: Password updates aren't considered. How can I know if the *local* data changed? */ /* FIXME: Support drivers other than IPMI */ if k == "driver_info.ipmi_password" && old == "******" { @@ -168,7 +168,7 @@ func resourceNodeV1() *schema.Resource { Optional: true, // If power_state is same as target_power_state, we have no changes to apply - DiffSuppressFunc: func(_, old, new string, d *schema.ResourceData) bool { + DiffSuppressFunc: func(_, _, new string, d *schema.ResourceData) bool { return new == d.Get("power_state").(string) }, }, diff --git a/ironic/resource_ironic_port_v1.go b/ironic/resource_ironic_port_v1.go index 4b1c7770..de689901 100644 --- a/ironic/resource_ironic_port_v1.go +++ b/ironic/resource_ironic_port_v1.go @@ -107,12 +107,12 @@ func resourcePortV1Read(d *schema.ResourceData, meta interface{}) error { return d.Set("is_smart_nic", port.IsSmartNIC) } -func resourcePortV1Update(d *schema.ResourceData, meta interface{}) error { +func resourcePortV1Update(_ *schema.ResourceData, _ interface{}) error { return nil } -func resourcePortV1Delete(d *schema.ResourceData, meta interface{}) error { +func resourcePortV1Delete(_ *schema.ResourceData, _ interface{}) error { return nil }