Add weekly Dependabot updates for Go modules - #98
Open
vasukinjfrog wants to merge 3 commits into
Open
Conversation
Keep go.mod and go.sum current by opening PRs from dependabot/go_modules branches each week. Co-authored-by: Cursor <cursoragent@cursor.com>
Three calls concatenated err.Error() onto the format string instead of passing it as an argument, leaving a %v verb with no arguments. The dangling verb rendered as %!v(MISSING), and because the error text landed in format-string position the URL-encoded characters in the Azure token endpoint (%3A, %2F) were reparsed as verbs and mangled, making the endpoint unreadable in operator logs. Pass the error as an argument and wrap with %w so errors.Is / errors.As can unwrap it. Co-authored-by: Cursor <cursoragent@cursor.com>
Dependabot proposes a new module graph but does not prove the upgrades work together. Run go mod verify, a go mod tidy diff, go test ./... and the linux amd64/arm64 release build on every pull request so reviewers have a single go-mod-test-build check to trust before approving. Co-authored-by: Cursor <cursoragent@cursor.com>
vasukinjfrog
force-pushed
the
chore-add-weekly-dependabot-gomod
branch
from
August 25, 2026 13:19
e79b270 to
2c504fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two things, and the second one explains why an Azure file is touched in a Dependabot PR.
1. Weekly Dependabot updates for Go modules — adds
.github/dependabot.yml:gomodecosystem at/, opening PRs fromdependabot/go_modules/*branches againstmainwithgo.mod/go.sumchanges.jfrog-cliandjfrog-client-go.2. A PR gate so a dependency bump can't silently break the build — adds
.github/workflows/go.yml, ago-mod-test-buildcheck that runs on every PR:go mod verifygo.sumgo mod tidy+git diff --exit-codego.mod/go.sumdrifted from the real import graphgo test ./...make -C build build-allGo's own guarantees stop short of "these upgrades work together".
go.sumproves integrity (same bytes) and MVS makes resolution deterministic (same versions every time), but neither proves two semver-compatible bumps are compatible in practice. Compiling and testing the resolved graph is what proves that, which is what this check does.Why
internal/handlers/azure.gois in this PRAdding the gate made
go test ./...fail immediately onmain. Since Go 1.10go testruns a subset of vet (includingprintf), so this isgo testitself failing, not an extra lint step:These were not style findings. The three lines looked like this:
The
+binds before the call, soerr.Error()was concatenated onto the format string rather than passed as an argument — leavingfmt.Errorfwith a%vverb and zero arguments. Running the old and new forms side by side against a realistic Azure transport error:Two separate defects in the old output:
%!v(MISSING).%3A,%2F) are themselves parsed as format verbs and mangled into%!A(MISSING)/%!F(MISSING).So on a node where Azure token acquisition is failing, the log line an operator has to debug from had an unreadable endpoint. That is exactly the bug class the "non-constant format string" check exists to catch: remote-influenced text reaching format-string position.
The fix passes the error as an argument and uses
%winstead of%v, which also restores unwrapping (errors.Is/errors.As) — the old form unwrapped tonil, the new form unwraps to the original error. Two of the three messages were also lowercased to match Go's convention that wrapped error strings aren't capitalized; that part is cosmetic and can be dropped if reviewers prefer a strictly minimal diff.Leaving these unfixed would have meant either a permanently red
go-mod-test-buildon every future Dependabot PR, or turning the check off withgo test -vet=off— both of which defeat the point of the gate.Test plan
main— Dependabot only readsdependabot.ymlfrom the default branch.gomodversion-updates config.dependabot/go_modules/*branch and that go-mod-test-build runs on it.main, mark go-mod-test-build as a required status check, otherwise a red Dependabot PR can still be merged.