Enabling this setting will include a (potentially inaccurate) coverage % with warning messages in status updates for drifted builds.
Adjust setting
Ran
|
Jobs
1
|
Files
12
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
github
fix: Remove excessive recursive variable expansions Modern GNU make (version >= 4.4) has backward-incompatibile feature: > * WARNING: Backward-incompatibility! > Previously makefile variables marked as export were not exported to commands > started by the $(shell ...) function. Now, all exported variables are > exported to $(shell ...). If this leads to recursion during expansion, then > for backward-compatibility the value from the original environment is used. This makes any invocation of `make` command very costly. Compare the performance of make 4.3 vs. 4.4: ``` $ time ~/Sources/make-4.3/make smb ARCH=$(go env GOARCH) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags "-X github.com/kubernetes-csi/csi-driver-smb/pkg/smb.driverVersion=v1.15.0 -X github.com/kubernetes-csi/csi-driver-smb/pkg/smb.gitCommit=<a class=hub.com/kubernetes-csi/csi-driver-smb/commit/f5ced814f628ddee2c9f3e6af505c5a6123e50f4">f5ced814f -X github.com/kubernetes-csi/csi-driver-smb/pkg/smb.buildDate=2024-05-15T00:00:09Z -s -w -extldflags "-static"" -mod vendor -o _output/amd64/smbplugin ./cmd/smbplugin real 0m38.504s user 3m50.580s sys 0m23.502s $ time ~/Sources/make-4.4/make smb ARCH=$(go env GOARCH) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags "-X github.com/kubernetes-csi/csi-driver-smb/pkg/smb.driverVersion=v1.15.0 -X github.com/kubernetes-csi/csi-driver-smb/pkg/smb.gitCommit=f5ced814f628ddee2c9f3e6af505c5a6123e50f4 -X github.com/kubernetes-csi/csi-driver-smb/pkg/smb.buildDate=2024-05-15T00:04:04Z -s -w -extldflags "-static"" -mod vendor -o _output/amd64/smbplugin ./cmd/smbplugin real 16m59.851s user 13m16.490s sys 13m46.418s ``` The same variables are evaluated again and again millions times: ``` $ rpm -qf /usr/bin/make make-4.4.1-6.fc40.x86_64 $ /usr/bin/make -d smb ARCH=$(go env GOARCH) 2>&1 |grep "not recursively expanding.*to export to shell function" |wc -l 2171342 ``` The patch doesn't change user-visible behavior of Makefile, but makes `make` command as performant as it used to be in case of make 4.3.
942 of 1191 relevant lines covered (79.09%)
4.49 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 9215890520.1 | 12 |
79.09 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|