Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(stencil): upgrade modules (2025-01-09) #609

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# syntax, such as anchors, will be fixed automatically.
version: 2.1
orbs:
shared: getoutreach/shared@2.28.1
shared: getoutreach/shared@2.29.0
queue: eddiewebb/[email protected]
## <<Stencil::Block(CircleCIExtraOrbs)>>

Expand All @@ -22,6 +22,7 @@ contexts: &contexts
- ghaccesstoken
- docker-registry
- npm-credentials
- box
- vault-dev
- confluence
- circleci-credentials
Expand All @@ -45,6 +46,10 @@ test: &test
release_branches: &release_branches
- "main"

## <<Stencil::Block(circleAnchorExtra)>>

## <</Stencil::Block>>

jobs:
{}
## <<Stencil::Block(circleJobs)>>
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ updates:
ignore:
- dependency-name: github.com/getoutreach/gobox
- dependency-name: github.com/getoutreach/stencil-golang/pkg
- dependency-name: github.com/getoutreach/mint
- dependency-name: github.com/getoutreach/services
- dependency-name: github.com/getoutreach/datastores/v2
- dependency-name: github.com/getoutreach/mint
- dependency-name: github.com/getoutreach/httpx

# Ignore semantic-release, this code is only executed in CI.
Expand Down
3 changes: 1 addition & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
# you are reducing compatibility guarantees.
## <<Stencil::Block(toolverOverride)>>
## <</Stencil::Block>>
golang 1.22.6
protoc 21.5
nodejs 20.16.0
terraform 1.5.7
golang 1.23.4
# Note: Versions in this block do not override the default versions above
# but sometimes you have to declare additional versions of the same tool
# while leaving the 'default' version intact for the infra.
# The most common case is nodejs.
## <<Stencil::Block(toolver)>>
golangci-lint 1.55.1
## <</Stencil::Block>>
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
// Maps the go module cache on the host to the persistent volume used by devspaces.
// These should be the respective values of `go env GOMODCACHE`.
{
"from": "${env:HOME}/.asdf/installs/golang/1.22.6/packages/pkg/mod",
"to": "/home/dev/.asdf/installs/golang/1.22.6/packages/pkg/mod"
"from": "${env:HOME}/.asdf/installs/golang/1.23.4/packages/pkg/mod",
"to": "/home/dev/.asdf/installs/golang/1.23.4/packages/pkg/mod"
},
{
// Maps the standard library location on the host to the location in the devspace.
// This enables debugging standard library code.
"from": "${env:HOME}/.asdf/installs/golang/1.22.6/go/src",
"to": "/home/dev/.asdf/installs/golang/1.22.6/go/src"
"from": "${env:HOME}/.asdf/installs/golang/1.23.4/go/src",
"to": "/home/dev/.asdf/installs/golang/1.23.4/go/src"
}
]
},
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
"go.alternateTools": {
"golangci-lint": "${workspaceFolder}/.bootstrap/shell/vscode/golang-linters.sh"
},
// This is disabled because it causes version mismatches between the
// tools used/installed by asdf / stencil, and the ones updated by VSCode.
// In particular, this is a problem with newer versions of golangci-lint
// incompatible with older versions of Go.
"go.toolsManagement.autoUpdate": false,
"go.buildTags": "or_dev",
"go.testTags": "or_test,or_int,or_e2e",
"files.trimTrailingWhitespace": true,
Expand Down
4 changes: 2 additions & 2 deletions cortex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ info:
repo: https://github.com/getoutreach/gobox
framework: stencil
language: Golang
stencil_version: v1.40.0-rc.1
golang_version: 1.22.6
stencil_version: v1.40.1
golang_version: 1.23.4
cli: false
service: false
product: Outreach
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/getoutreach/gobox

go 1.22
go 1.23.0

toolchain go1.22.6
toolchain go1.23.4

require (
github.com/AlecAivazis/survey/v2 v2.3.7
Expand All @@ -12,7 +12,7 @@ require (
github.com/charmbracelet/lipgloss v0.13.0
github.com/charmbracelet/log v0.4.0
github.com/creack/pty v1.1.23
github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/fatih/color v1.17.0
github.com/fynelabs/selfupdate v0.2.0
github.com/go-git/go-billy/v5 v5.6.0
Expand Down Expand Up @@ -62,7 +62,7 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/skeema/knownhosts v1.3.0 // indirect
github.com/tdewolff/parse/v2 v2.7.15 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
Expand All @@ -88,7 +88,7 @@ require (
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
Expand Down
14 changes: 6 additions & 8 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go.work
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
go 1.22
go 1.23.0

toolchain go1.22.6
toolchain go1.23.4

use .

Expand Down
5 changes: 5 additions & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ github.com/beevik/etree v1.3.0/go.mod h1:aiPf89g/1k3AShMVAzriilpcE4R/Vuor90y83zV
github.com/beevik/etree v1.4.0/go.mod h1:cyWiXwGoasx60gHvtnEh5x8+uIjUVnjWqBvEnhnqKDA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
Expand Down Expand Up @@ -735,6 +736,7 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tdewolff/argp v0.0.0-20240126212256-acdb2fb50090/go.mod h1:fF+gnKbmf3iMG+ErLiF+orMU/InyZIEnKVVigUjfriw=
github.com/tdewolff/argp v0.0.0-20240307141015-960de61a6aa8/go.mod h1:e1dkYfBKpwfFhwXWrQpEU2ClFgxYOT4SrHd6fKD7nIE=
github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
Expand Down Expand Up @@ -916,6 +918,7 @@ golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -947,6 +950,7 @@ golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -1019,6 +1023,7 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
3 changes: 2 additions & 1 deletion pkg/callerinfo/callerinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ func GetCallerInfo(skipFrames uint16) (CallerInfo, error) {
Package: parsePackageName(frame.Function),
Function: frame.Function,
File: frame.File,
LineNum: uint(frame.Line),
// nolint:gosec // Why: frame data is internal, line number is always > 0
LineNum: uint(frame.Line),
}

// Attempt to back-calc module name by searching through deps
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/updater/resolver/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func TestNewVersionFromVersionString(t *testing.T) {
if diff := cmp.Diff(*tt.want, *got, cmp.FilterPath(func(p cmp.Path) bool {
return p.String() == "sv" // ignore semver
}, cmp.Ignore())); diff != "" {
t.Fatalf(diff)
t.Fatal(diff)
}

if got.String() != tt.want.String() {
Expand Down
1 change: 1 addition & 0 deletions pkg/olog/default_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func init() {
// type. This must be called before any loggers are created to have an
// effect on all loggers.
func SetDefaultHandler(ht DefaultHandlerType) {
// nolint: gosec // Why: We probably don't care that we're possibly truncating.
defaultHandler.Store(int32(ht))
}

Expand Down
1 change: 1 addition & 0 deletions pkg/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ type PriorityQueue struct {
func (q *PriorityQueue) Push(data interface{}, priority int64) (*PriorityQueueItem, error) {
q.lock.Lock()
defer q.lock.Unlock()
// nolint: gosec // Why: The length of a queue should never be negative.
if uint(q.queue.Len()) >= q.capacity {
return nil, errors.New("queue is full")
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/tester/tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,6 @@ func (t *tester) complete() {

defer close(t.completed)
for _, cleanup := range cleanups {
cleanup := cleanup

//nolint:gocritic // Why: Will refactor
defer cleanup()
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/trace/sampling.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func (s *honeycombDeterministicSampler) ShouldSample(p sdktrace.SamplingParamete
Decision: sdktrace.RecordAndSample,
Tracestate: SetTraceStateSampleRate(psc.TraceState(), s.sampleRate),
Attributes: []attribute.KeyValue{
// nolint: gosec // Why: sample rate is guaranteed not to be < 0
sampleRateAttribute.Int(int(s.sampleRate)),
},
}
Expand Down Expand Up @@ -225,6 +226,7 @@ func (s *sampleRateTaggingSampler) ShouldSample(p sdktrace.SamplingParameters) s
Decision: sdktrace.RecordAndSample,
Tracestate: ts,
Attributes: []attribute.KeyValue{
// nolint: gosec // Why: sample rate is guaranteed not to be < 0
sampleRateAttribute.Int(int(sampleRate)),
},
}
Expand All @@ -235,6 +237,7 @@ func (s *sampleRateTaggingSampler) ShouldSample(p sdktrace.SamplingParameters) s
Decision: sdktrace.RecordAndSample,
Tracestate: ts,
Attributes: []attribute.KeyValue{
// nolint: gosec // Why: sample rate is guaranteed not to be < 0
sampleRateAttribute.Int(int(s.defaultSampleRate)),
},
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/devbase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
libDir="$DIR/../.bootstrap"
lockfile="$DIR/../stencil.lock"
serviceYaml="$DIR/../service.yaml"
gojqVersion="v0.12.14"
gojqVersion="v0.12.16"

# get_absolute_path returns the absolute path of a file
get_absolute_path() {
Expand Down
14 changes: 7 additions & 7 deletions scripts/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ linters-settings:
errcheck:
check-blank: true
govet:
check-shadowing: true
enable:
- shadow
revive:
rules:
# Enable the default golint rules. We must include these because
Expand Down Expand Up @@ -56,10 +57,6 @@ linters-settings:
- style
disabled-checks:
- whyNoLint # Doesn't seem to work properly
# Suggests bad simplifications (After is not identical to !Before).
# TODO(jkinkead): Remove when we have a version of go-critic with
# https://github.com/go-critic/go-critic/pull/1281 merged.
- timeCmpSimplify
funlen:
lines: 500
statements: 50
Expand All @@ -69,11 +66,11 @@ linters:
disable-all: true
enable:
- bodyclose
- copyloopvar # Detects places where loop variables are copied.
- dogsled
- errcheck
- errorlint
- exhaustive # Checks exhaustiveness of enum switch statements.
- exportloopref # Checks for pointers to enclosing loop variables.
- funlen
- gochecknoinits
- goconst
Expand All @@ -97,6 +94,7 @@ linters:
- whitespace

issues:
max-same-issues: 10
exclude:
# We allow error shadowing
- 'declaration of "err" shadows declaration at'
Expand Down Expand Up @@ -126,6 +124,8 @@ issues:
source: "^//go:generate "

output:
format: colored-line-number
formats:
- format: colored-line-number
path: stdout
sort-results: true
print-severity: true
18 changes: 9 additions & 9 deletions stencil.lock
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
version: v1.40.0-rc.1
version: v1.40.1
modules:
- name: github.com/getoutreach/devbase
url: https://github.com/getoutreach/devbase
version: v2.28.1
version: v2.29.0
- name: github.com/getoutreach/stencil-actions
url: https://github.com/getoutreach/stencil-actions
version: v0.4.2
version: v0.4.4
- name: github.com/getoutreach/stencil-base
url: https://github.com/getoutreach/stencil-base
version: v0.16.1
version: v0.16.3
- name: github.com/getoutreach/stencil-circleci
url: https://github.com/getoutreach/stencil-circleci
version: v1.14.0
version: v1.15.0
- name: github.com/getoutreach/stencil-discovery
url: https://github.com/getoutreach/stencil-discovery
version: v1.8.5
version: v1.8.7
- name: github.com/getoutreach/stencil-golang
url: https://github.com/getoutreach/stencil-golang
version: v1.24.0
version: v1.25.0
- name: github.com/getoutreach/stencil-outreach
url: https://github.com/getoutreach/stencil-outreach
version: v0.22.2
version: v0.24.0
- name: github.com/getoutreach/stencil-pipeline
url: https://github.com/getoutreach/stencil-pipeline
version: v1.2.2
version: v1.2.4
files:
- name: .circleci/config.yml
template: .circleci/config.yml.tpl
Expand Down
Loading