Skip to content

chore(ci): Lint Windows arm64 and 386 sources - #19821

Open
skartikey wants to merge 2 commits into
influxdata:masterfrom
skartikey:chore-ci-lint-windows-arches
Open

skartikey wants to merge 2 commits into
influxdata:masterfrom
skartikey:chore-ci-lint-windows-arches

Conversation

@skartikey

@skartikey skartikey commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The lint-windows job runs with the executor's GOARCH=amd64, so files with an architecture suffix like pdh_arm64.go and pdh_386.go are never linted, even though we ship Windows arm64 and i386 builds. This adds one step per architecture to the same job, linting the packages containing *_arm64.go files for arm64 and *_386.go files for 386. The lists are derived from the file names, so new architecture-specific files are covered automatically, and only that one package is linted today rather than the whole repository.

It also clears the findings that were hiding there: comment spacing in both files, and an unused pdhFmtCountervalueLong type in pdh_386.go whose //nolint sat on the wrong line. The amd64 variant does not have that type, so it is removed rather than suppressed.

Checklist

Related issues

resolves #19773

@telegraf-tiger telegraf-tiger Bot added the chore label Oct 5, 2026
@skartikey skartikey added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Oct 5, 2026
@telegraf-tiger

telegraf-tiger Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

⚠️ This pull request increases the Telegraf binary size by 5.82 % for linux amd64 (new size: 326.2 MB, nightly size 308.2 MB)

📦 Click here to get additional PR build artifacts

Artifact URLs

. DEB . RPM . TAR . GZ . ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz

@srebhan srebhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice. Thanks @skartikey! Just one request...

Comment thread .circleci/config.yml
Comment on lines +160 to +170
- run:
name: "golangci-lint/Windows arm64 and 386"
# Files with an architecture suffix (e.g. pdh_arm64.go) are not part of the amd64 run above,
# so lint the packages containing them for the other shipped Windows architectures
command: |
pkgs=$(git ls-files '*_arm64.go' '*_386.go' | xargs -n1 dirname | sort -u | sed 's|^|./|')
[ -n "$pkgs" ] || exit 0
for arch in arm64 386; do
GOGC=80 GOMEMLIMIT=6144MiB GOOS=windows GOARCH=$arch $GOPATH/bin/golangci-lint run --verbose --timeout=30m --concurrency 4 $pkgs
done
no_output_timeout: 30m

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we please split this into two steps!?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done, one step per architecture now, each deriving its own package list.

@skartikey
skartikey requested a review from srebhan October 7, 2026 07:13

@srebhan srebhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @skartikey! My only concern is that not all files do adhere to the naming convention you use for filtering.

Comment thread .circleci/config.yml
Comment on lines +160 to +168
- run:
name: "golangci-lint/Windows arm64"
# Files with an architecture suffix (e.g. pdh_arm64.go) are not part of the amd64 run above,
# so lint the packages containing them for that architecture
command: |
pkgs=$(git ls-files '*_arm64.go' | xargs -n1 dirname | sort -u | sed 's|^|./|')
[ -n "$pkgs" ] || exit 0
GOGC=80 GOMEMLIMIT=6144MiB GOOS=windows GOARCH=arm64 $GOPATH/bin/golangci-lint run --verbose --timeout=30m --concurrency 4 $pkgs
no_output_timeout: 30m

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The problem I see here is that not all arch-specific files adhere to this convention. Do you think it would make sense to lint the whole project? I guess it will prolong the whole pipeline, won't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows arm64 and 386 sources are never linted by CI

2 participants