Skip to content

Bump golang k8s bci#267

Merged
Vicente-Cheng merged 2 commits intoharvester:masterfrom
Vicente-Cheng:bump-golang-k8s-bci
Mar 9, 2026
Merged

Bump golang k8s bci#267
Vicente-Cheng merged 2 commits intoharvester:masterfrom
Vicente-Cheng:bump-golang-k8s-bci

Conversation

@Vicente-Cheng
Copy link
Collaborator

Problem:
Bump golang/k8s/bci, also update linter

Solution:
Bump golang/k8s/bci, also update linter

Related Issue:
harvester/harvester#10110

Test plan:
CI should pass

Copilot AI review requested due to automatic review settings March 9, 2026 03:22
@Vicente-Cheng Vicente-Cheng requested review from a team, Yu-Jack and tserong as code owners March 9, 2026 03:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the project’s build/runtime base images and Go/Kubernetes dependencies, along with GolangCI-Lint configuration adjustments.

Changes:

  • Bumped SUSE BCI base images and Go toolchain image tags.
  • Updated Go module dependencies (notably Kubernetes + related libs) and switched to stdlib slices.
  • Refreshed GolangCI-Lint configuration and added targeted gosec suppression in tests.

Reviewed changes

Copilot reviewed 9 out of 1814 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/integration/test_1_disk_hotplug_test.go Normalizes ssh-config path handling and adds gosec nolint annotation for exec helper.
tests/integration/test_0_single_disk_test.go Normalizes ssh-config path handling.
pkg/controller/blockdevice/scanner.go Switches from k8s.io/utils/strings/slices to stdlib slices.
pkg/block/block_device.go Cleans the udev data file path before reading.
package/Dockerfile.webhook Bumps BCI base image version.
package/Dockerfile Bumps BCI base image version and adjusts installed util-linux packages.
go.mod Bumps Go version and updates Kubernetes/related Go dependencies.
Dockerfile.dapper Bumps Go toolchain image tag.
.golangci.yaml Updates GolangCI-Lint v2 config schema and moves gofmt formatter config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

var stdout bytes.Buffer
var stderr bytes.Buffer
cmd := exec.Command("bash", "-c", cmdString)
cmd := exec.Command("bash", "-c", cmdString) //nolint:gosec // G702: intentional test helper for running shell commands
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline justification cites G702, which is not the gosec rule typically emitted for exec.Command (usually G204). Since this comment is used for auditability, please update the referenced rule/code or reword it to describe the actual finding being suppressed (or drop the rule number if you want it to be future-proof).

Suggested change
cmd := exec.Command("bash", "-c", cmdString) //nolint:gosec // G702: intentional test helper for running shell commands
cmd := exec.Command("bash", "-c", cmdString) //nolint:gosec // intentional test helper for running shell commands

Copilot uses AI. Check for mistakes.
FROM registry.suse.com/bci/bci-base:15.7
FROM registry.suse.com/bci/bci-base:16.0

# util-linux-systemd -> for `lsblk` command
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says util-linux-systemd is needed for lsblk, but the Dockerfile now also installs util-linux explicitly. Please update the comment to reflect the current package requirements (e.g., lsblk coming from util-linux) so it stays accurate.

Suggested change
# util-linux-systemd -> for `lsblk` command
# util-linux -> for `lsblk` command

Copilot uses AI. Check for mistakes.
# iproute2 -> for `ip` command
RUN zypper -n rm container-suseconnect && \
zypper -n install util-linux-systemd e2fsprogs iproute2 && \
zypper -n install util-linux util-linux-systemd e2fsprogs iproute2 && \
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says util-linux-systemd is needed for lsblk, but the Dockerfile now also installs util-linux explicitly. Please update the comment to reflect the current package requirements (e.g., lsblk coming from util-linux) so it stays accurate.

Copilot uses AI. Check for mistakes.
    - golang 1.25.7
    - k8s 1.35.0
    - Longhorn v1.11.0
    - wrangler v3.4.0
    - bci 16.0 (added util-linux)

Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
    - align with harvester/harvester repo
    - fix linter warning
    - update vendor/generated code

Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
@Vicente-Cheng
Copy link
Collaborator Author

Please ignore the codefactor warning, we don't need to give the specific version for system tools.

Copy link
Member

@votdev votdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Vicente-Cheng Vicente-Cheng merged commit 1ddb041 into harvester:master Mar 9, 2026
13 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants