Skip to content

Commit 4c0bb7e

Browse files
authored
EVG-19926: Upgrade go version to 1.20, and distros to latest. (#145)
1 parent 8b2e395 commit 4c0bb7e

File tree

18 files changed

+100
-88
lines changed

18 files changed

+100
-88
lines changed

docs.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ logging, as well as systemd's journal service, and other logging
55
systems, Grip provides a number of very powerful logging
66
abstractions in one high-level package.
77
8-
Logging Instances
8+
# Logging Instances
99
1010
The central type of the grip package is the Journaler type,
1111
instances of which provide distinct log capturing system. For ease,
@@ -14,15 +14,15 @@ parallel public methods that use an internal "standard" Jouernaler
1414
instance in the grip package, which has some defaults configured
1515
and may be sufficient for many use cases.
1616
17-
Output
17+
# Output
1818
1919
The send.Sender interface provides a way of changing the logging
2020
backend, and the send package provides a number of alternate
2121
implementations of logging systems, including: systemd's journal,
2222
logging to standard output, logging to a file, and generic syslog
2323
support.
2424
25-
Messages
25+
# Messages
2626
2727
The message.Composer interface is the representation of all
2828
messages. They are implemented to provide a raw structured form as

evergreen.yaml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -131,47 +131,35 @@ tasks:
131131
# Buildvariants #
132132
#######################################
133133
buildvariants:
134-
- name: race-detector
135-
display_name: Race Detector (Arch Linux)
136-
expansions:
137-
GOROOT: /opt/golang/go1.16
138-
RACE_DETECTOR: true
139-
run_on:
140-
- archlinux-new-small
141-
- archlinux-new-large
142-
tasks: [ ".test" ]
143-
144134
- name: lint
145135
display_name: Lint
146136
expansions:
147-
GOROOT: /opt/golang/go1.16
137+
GOROOT: /opt/golang/go1.20
148138
run_on:
149-
- archlinux-new-small
150-
- archlinux-new-large
139+
- ubuntu2204-small
151140
tasks: [ ".report" ]
152141

153142
- name: ubuntu
154-
display_name: Ubuntu 18.04
143+
display_name: Ubuntu 22.04
155144
expansions:
156-
GOROOT: /opt/golang/go1.16
145+
GOROOT: /opt/golang/go1.20
146+
RACE_DETECTOR: true
157147
run_on:
158-
- ubuntu1804-small
159-
- ubuntu1804-large
148+
- ubuntu2204-small
160149
tasks: [ ".test" ]
161150

162151
- name: macos
163152
display_name: macOS
164153
expansions:
165-
GOROOT: /opt/golang/go1.16
154+
GOROOT: /opt/golang/go1.20
166155
run_on:
167-
- macos-1014
156+
- macos-1100-arm64
168157
tasks: [ ".test" ]
169158

170159
- name: windows
171160
display_name: Windows
172161
run_on:
173-
- windows-64-vs2019-large
174-
- windows-64-vs2017-large
162+
- windows-vsCurrent-small
175163
expansions:
176-
GOROOT: C:/golang/go1.16
164+
GOROOT: C:/golang/go1.20
177165
tasks: [ ".test" ]

go.mod

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/mongodb/grip
22

3-
go 1.16
3+
go 1.20
44

55
require (
66
github.com/andygrunwald/go-jira v1.14.0
@@ -15,6 +15,29 @@ require (
1515
github.com/trivago/tgo v1.0.7
1616
)
1717

18+
require (
19+
github.com/PuerkitoBio/rehttp v1.1.0 // indirect
20+
github.com/davecgh/go-spew v1.1.1 // indirect
21+
github.com/fatih/structs v1.1.0 // indirect
22+
github.com/go-ole/go-ole v1.2.6 // indirect
23+
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
24+
github.com/golang/protobuf v1.4.2 // indirect
25+
github.com/gorilla/websocket v1.4.2 // indirect
26+
github.com/jpillora/backoff v1.0.0 // indirect
27+
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
28+
github.com/pmezard/go-difflib v1.0.0 // indirect
29+
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
30+
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
31+
github.com/tklauser/go-sysconf v0.3.10 // indirect
32+
github.com/tklauser/numcpus v0.4.0 // indirect
33+
github.com/yusufpapurcu/wmi v1.2.2 // indirect
34+
golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect
35+
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 // indirect
36+
google.golang.org/protobuf v1.25.0 // indirect
37+
gopkg.in/yaml.v2 v2.4.0 // indirect
38+
gopkg.in/yaml.v3 v3.0.1 // indirect
39+
)
40+
1841
require (
1942
github.com/evergreen-ci/utility v0.0.0-20230216205613-b8156d58f1e5
2043
github.com/google/go-cmp v0.5.9 // indirect

loggers.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ Basic Logging
33
44
Loging helpers exist for the following levels:
55
6-
Emergency + (fatal/panic)
7-
Alert + (fatal/panic)
8-
Critical + (fatal/panic)
9-
Error + (fatal/panic)
10-
Warning
11-
Notice
12-
Info
13-
Debug
6+
Emergency + (fatal/panic)
7+
Alert + (fatal/panic)
8+
Critical + (fatal/panic)
9+
Error + (fatal/panic)
10+
Warning
11+
Notice
12+
Info
13+
Debug
1414
1515
These methods accept both strings (message content,) or types that
1616
implement the message.MessageComposer interface. Composer types make
@@ -22,7 +22,7 @@ All levels also have additional methods with `ln` and `f` appended to
2222
the end of the method name which allow Println() and Printf() style
2323
functionality. You must pass printf/println-style arguments to these methods.
2424
25-
Conditional Logging
25+
# Conditional Logging
2626
2727
The Conditional logging methods take two arguments, a Boolean, and a
2828
message argument. Messages can be strings, objects that implement the

logging/general.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ Package logging provides the primary implementation of the Journaler
33
interface (which is cloned in public functions in the grip interface
44
itself.)
55
6-
Basic Logging
6+
# Basic Logging
77
88
Loging helpers exist for the following levels:
99
10-
Emergency + (fatal/panic)
11-
Alert + (fatal/panic)
12-
Critical + (fatal/panic)
13-
Error + (fatal/panic)
14-
Warning
15-
Notice
16-
Info
17-
Debug
10+
Emergency + (fatal/panic)
11+
Alert + (fatal/panic)
12+
Critical + (fatal/panic)
13+
Error + (fatal/panic)
14+
Warning
15+
Notice
16+
Info
17+
Debug
1818
*/
1919
package logging
2020

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ $(shell mkdir -p $(buildDir))
6060

6161
# start lint setup targets
6262
$(buildDir)/golangci-lint:
63-
@curl --retry 10 --retry-max-time 60 -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(buildDir) v1.40.0 >/dev/null 2>&1
63+
@curl --retry 10 --retry-max-time 60 -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(buildDir) v1.51.2 >/dev/null 2>&1
6464
$(buildDir)/run-linter: cmd/run-linter/run-linter.go $(buildDir)/golangci-lint
6565
$(gobin) build -o $@ $<
6666
# end lint setup targets

message/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
package message defines the Composer interface and a handful of
33
implementations which represent the structure for messages produced by grip.
44
5-
Message Composers
5+
# Message Composers
66
77
The Composer interface provides a common way to define messages, with
88
two main goals:

message/fields.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type fieldMessage struct {
2424
// used for attaching structured metadata to a build request. For
2525
// example:
2626
//
27-
// message.Fields{"key0", <value>, "key1", <value>}
27+
// message.Fields{"key0", <value>, "key1", <value>}
2828
type Fields map[string]interface{}
2929

3030
// NewFieldsMessage creates a fully configured Composer instance that

recovery/recovery.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ func LogStackTraceAndExit(opDetails ...string) {
4646
//
4747
// Use in a common defer statement, such as:
4848
//
49-
// defer recovery.LogStackTraceAndContinue("operation")
50-
//
49+
// defer recovery.LogStackTraceAndContinue("operation")
5150
func LogStackTraceAndContinue(opDetails ...string) {
5251
if p := recover(); p != nil {
5352
logAndContinue(p, logging.MakeGrip(grip.GetSender()), message.MakeFields(getMessage(opDetails)))
@@ -62,13 +61,12 @@ func LogStackTraceAndContinue(opDetails ...string) {
6261
//
6362
// You must construct a recovery function as in the following example:
6463
//
65-
// defer func() { err = recovery.HandlePanicWithError(recover(), err, "op") }()
64+
// defer func() { err = recovery.HandlePanicWithError(recover(), err, "op") }()
6665
//
6766
// This defer statement must occur in a function that declares a
6867
// default error return value as in:
6968
//
70-
// func operation() (err error) {}
71-
//
69+
// func operation() (err error) {}
7270
func HandlePanicWithError(p interface{}, err error, opDetails ...string) error {
7371
catcher := grip.NewSimpleCatcher()
7472
catcher.Add(err)

send/buildlogger.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ func (c *BuildloggerConfig) SetCredentials(username, password string) {
116116
// buildlogger terminology. Then, set set the CreateTest attribute,
117117
// and generate additional per-test senders. For example:
118118
//
119-
// conf := GetBuildloggerConfig()
120-
// global := MakeBuildlogger("<name>-global", conf)
121-
// // ... use global
122-
// conf.CreateTest = true
123-
// testOne := MakeBuildlogger("<name>-testOne", conf)
119+
// conf := GetBuildloggerConfig()
120+
// global := MakeBuildlogger("<name>-global", conf)
121+
// // ... use global
122+
// conf.CreateTest = true
123+
// testOne := MakeBuildlogger("<name>-testOne", conf)
124124
func GetBuildloggerConfig() (*BuildloggerConfig, error) {
125125
conf := &BuildloggerConfig{
126126
URL: os.Getenv("BULDLOGGER_URL"),

0 commit comments

Comments
 (0)