FMG-2: upgrade Go to 1.27.1, refresh dependencies and drop gotoolkit #8
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
fmartingr/smtp2shoutrrr!8
Loading…
Reference in a new issue
No description provided.
Delete branch "butterrobot/fmg-2-dependency-upgrade"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes FMG-2
Upgrades Go and every dependency to their latest revisions, and removes the
gotoolkitdependency in favour of the standard library and the libraries it was wrapping.Supersedes #7 — identical tree, recreated under the
butterrobotaccount.gotoolkit removal
encoding.NewTOMLEncoding()— a thin wrapper overpelletier/go-toml/v2. Now used directly, behind a newsmtp2shoutrrr.LoadConfig(path)shared by both commands. Previously bothcmd/smtp2shoutrrrandcmd/sendmailduplicated the open/decode/SetDefaultssequence, and neither closed the config file.model.Server— a three-method interface with a single implementation.NewSMTPServernow returns a concrete*Server, and the unusedIsEnabled()is gone.service.NewService(...).Start()/WaitStop()— replaced bysignal.NotifyContextinmain.Server.Start(ctx)now owns its own lifecycle: it serves until the context is cancelled, then callsShutdownwith a 10s deadline. Behaviour matches the old service, without the indirection.Version bumps
emersion/go-smtpstretchr/testifypelletier/go-toml/v2x/crypto/x509roots/fallbackactions/checkout,actions/setup-goIndirects also refreshed (
x/net0.25.0 → 0.58.0,x/sys,x/tools,fatih/color,go-cmp,logr).containrrr/shoutrrrandemersion/go-saslwere already at their latest published revisions.Dropping
goreleaser-actionBumping
actions/goreleaser-actionv6.4.0 → v7.2.3 broke thegoreleaser-lintjob: v7.1.0 made cosign signature verification of the action's own goreleaser download mandatory, andci-baseships no cosign.Rather than pin the action back, this drops it.
ci-basealready installs goreleaser from the upstream apt repo — that is whatmake buildhas always used — so the action was downloading a second copy of a tool the image already had. Both workflows now invoke it directly, andgoreleaser checkmoves behind amake checktarget, so every CI job runs a make target like the rest of the pipeline.Tests
Coverage 63.1% → 75.9%. New tests cover
LoadConfig(parsing, defaults, missing file, invalid TOML) and the replacement lifecycle — that a cancelled context shuts the server down and releases the listener, and that a bind failure propagates out ofStart.On this exact tree (as PR #7) CI passed
format,lint,testandgoreleaser-lint. Locally, against Go 1.27.1:make format(clean diff),make check,make ci-lint(0 issues),make test,make build(6 targets). The release binary was also smoke-tested end to end: mail accepted, forwarded to a shoutrrr generic target, andSIGTERMshut it down cleanly with exit 0.Note:
release.ymlonly runs on tags, so its goreleaser step is not exercised by this PR. The env vars it depends on (GITEA_TOKEN,GORELEASER_FORCE_TOKEN) are read by goreleaser itself rather than by the action, so invoking the binary directly is equivalent.Also
Removed the unused
ANONYMOUSSASL client fromcmd/sendmail— its only caller was a commented-out line, and it was the last thing pullinggo-saslinto that command.Let's merge this.