fix(golang-github-task-slim-sprig): stabilize arm64 rounding - #18481
fix(golang-github-task-slim-sprig): stabilize arm64 rounding#18481Mitch Zhu (miz060) wants to merge 1 commit into
Conversation
|
/azp run |
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. |
There was a problem hiding this comment.
Pull request overview
Stabilizes arm64 rounding tests for golang-github-task-slim-sprig under Go 1.26.
Changes:
- Forces
float64rounding beforemath.Modf. - Moves the component into a dedicated overlay configuration.
- Refreshes the lock and rendered spec.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
base/comps/golang-github-task-slim-sprig/golang-github-task-slim-sprig.comp.toml |
Defines the source workaround overlay. |
base/comps/components.toml |
Removes the former inline component entry. |
locks/golang-github-task-slim-sprig.lock |
Refreshes the input fingerprint. |
specs/g/golang-github-task-slim-sprig/golang-github-task-slim-sprig.spec |
Contains the rendered workaround and release bump. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
3f0aa35 to
a3b628d
Compare
|
/azp run |
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. |
|
/azp run |
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. |
| description = "Force float64 rounding before math.Modf to prevent fused arithmetic from changing round results" | ||
| type = "spec-append-lines" | ||
| section = "%prep" | ||
| lines = [ |
There was a problem hiding this comment.
issue(blocking): Are we changing the source code of the package? If so--and if we stick with this--can we please go with a regular .patch? That would also be something that could be more directly contributed upstream.
There was a problem hiding this comment.
Good point! Fixed. I replaced the %prep source rewrite with a regular patch containing the same explicit float64 conversion.
| @@ -0,0 +1,16 @@ | |||
| [components.golang-github-task-slim-sprig] | |||
There was a problem hiding this comment.
question(blocking): Fedora upstream has orphaned this package entirely: https://src.fedoraproject.org/rpms/golang-github-task-slim-sprig
What in our distro is still requiring it?
There was a problem hiding this comment.
I checked the Azure Linux 4 SDK dependency graph. Ginkgo v1 and v2 require slim-sprig. Ginkgo v1 is required by golevedb, which feeds httpcache -> k8s-client, so slim-sprig is not currently a removable leaf and needs to remain packaged. (I did find some other orphaned golang pkgs we should remove, will follow up in another PR).
a3b628d to
a410bd3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
specs/g/golang-github-task-slim-sprig/golang-github-task-slim-sprig.spec:66
- This generated output still contains a synthetic uncommitted entry and bumps the release to
-12above the actual-11commit.AGENTS.md:39requires re-rendering and amending after committing component changes; otherwiseCheck Rendered Specswill regenerate a different changelog. Commit the remaining component inputs, refresh/render, and amend so this entry is replaced by committed history.
* Tue Aug 18 2026 azldev <azldev@local> - 3.2.0-12
- Local changes (uncommitted)
a410bd3 to
dd06a08
Compare
|
/azp run |
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. |
Go 1.26 may fuse the multiplication passed to math.Modf on arm64, changing the fractional result and failing TestRound. Force an explicit float64 rounding step before math.Modf, as recommended in golang/go#77657, while keeping the original test intact. Signed-off-by: Mitch Zhu <mitchzhu@microsoft.com>
dd06a08 to
ffb40f9
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
base/comps/golang-github-task-slim-sprig/golang-github-task-slim-sprig.comp.toml:6
- The metadata table below is attached only to the second
overlaysarray element, so the source-changingpatch-addhas no provenance or upstream-status metadata. Add the issue metadata to this overlay as well (or move the pair to a per-file overlay with shared metadata).
source = "0001-numeric-force-float64-rounding-before-modf.patch"
|
/azp run |
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. |
golang-github-task-slim-sprigfailsTestRoundon aarch64 with Go 1.26 because the compiler may fuse the multiplication passed tomath.Modf, changing the observed fractional value. The Go specification permits this behavior, and aGo maintainer recommends an explicit
float64conversion in golang/go#77657 to force rounding beforeModf.Apply that conversion to
numeric.goduring%prep, guarded by an exact source match. The original rounding test remains unchanged.Validation:
%checkpass on x86_64 and aarch64.rpm -V, contains the converted source, and passes its installed-source test suite in an Azure Linux 4 mock chroot.