Skip to content

Commit 0ef82cb

Browse files
karwaankit32karwaankanishb-ms
authored
Upgrade Go version from 1.24 to 1.26 (prebid#4737)
Co-authored-by: Ankit Karwa <ankitkarwa@microsoft.com> Co-authored-by: Anish B <anishb@microsoft.com>
1 parent f5f6439 commit 0ef82cb

11 files changed

Lines changed: 16 additions & 15 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dockerfile": "Dockerfile",
77
"args": {
88
// Update the VARIANT arg to pick a version of Go
9-
"VARIANT": "1.24",
9+
"VARIANT": "1.26",
1010
// Options
1111
"INSTALL_NODE": "false",
1212
"NODE_VERSION": "lts/*"

.github/workflows/adapter-code-coverage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
- name: Run Coverage Tests
4545
id: run_coverage
4646
if: steps.get_directories.outputs.result != ''
47+
env:
48+
GOTOOLCHAIN: local
4749
run: |
4850
directories=$(echo '${{ steps.get_directories.outputs.result }}' | jq -r '.[]')
4951
go mod download

.github/workflows/validate-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Install Go
1313
uses: actions/setup-go@v5
1414
with:
15-
go-version: 1.24.0
15+
go-version: 1.26.2
1616

1717
- name: Checkout Merged Branch
1818
uses: actions/checkout@v4

.github/workflows/validate.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
validate:
1111
strategy:
1212
matrix:
13-
go-version: [1.23.x, 1.24.x]
13+
go-version: [1.25.x, 1.26.x]
1414
os: [ubuntu-latest]
1515
runs-on: ${{ matrix.os }}
1616

@@ -31,3 +31,4 @@ jobs:
3131
./validate.sh --nofmt --cov --race 10
3232
env:
3333
GO111MODULE: "on"
34+
GOTOOLCHAIN: local

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ RUN apt-get update && \
66
apt-get -y upgrade && \
77
apt-get install -y --no-install-recommends wget ca-certificates
88
WORKDIR /tmp
9-
RUN wget https://dl.google.com/go/go1.24.0.linux-amd64.tar.gz && \
10-
tar -xf go1.24.0.linux-amd64.tar.gz && \
9+
RUN wget https://dl.google.com/go/go1.26.2.linux-amd64.tar.gz && \
10+
tar -xf go1.26.2.linux-amd64.tar.gz && \
1111
mv go /usr/local
1212
RUN mkdir -p /app/prebid-server/
1313
WORKDIR /app/prebid-server/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Ensure that you deploy the `/static` directory, as Prebid Server requires those
4444

4545
## Developing
4646

47-
Prebid Server requires [Go](https://go.dev) version 1.23 or newer. You can develop on any operating system that Go supports; however, please note that our helper scripts are written in bash.
47+
Prebid Server requires [Go](https://go.dev) version 1.26.2 or newer. You can develop on any operating system that Go supports; however, please note that our helper scripts are written in bash.
4848

4949
1. Clone The Repository
5050
``` bash

adapters/adapterstest/adapter_test_util.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ func SampleBid(width *int64, height *int64, impId string, index int) openrtb2.Bi
4545
// VerifyStringValue Helper function to assert string equals.
4646
func VerifyStringValue(value string, expected string, t *testing.T) {
4747
if value != expected {
48-
t.Fatalf(fmt.Sprintf("%s expected, got %s", expected, value))
48+
t.Fatalf("%s expected, got %s", expected, value)
4949
}
5050
}
5151

5252
// VerifyIntValue Helper function to assert Int equals.
5353
func VerifyIntValue(value int, expected int, t *testing.T) {
5454
if value != expected {
55-
t.Fatalf(fmt.Sprintf("%d expected, got %d", expected, value))
55+
t.Fatalf("%d expected, got %d", expected, value)
5656
}
5757
}
5858

5959
// VerifyBoolValue Helper function to assert bool equals.
6060
func VerifyBoolValue(value bool, expected bool, t *testing.T) {
6161
if value != expected {
62-
t.Fatalf(fmt.Sprintf("%v expected, got %v", expected, value))
62+
t.Fatalf("%v expected, got %v", expected, value)
6363
}
6464
}
6565

endpoints/openrtb2/amp_auction_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2491,7 +2491,7 @@ func TestAmpAuctionDebugWarningsOnly(t *testing.T) {
24912491
)
24922492

24932493
for _, test := range testCases {
2494-
httpReq := httptest.NewRequest("GET", fmt.Sprintf("/openrtb2/auction/amp"+test.requestURLArguments), nil)
2494+
httpReq := httptest.NewRequest("GET", "/openrtb2/auction/amp"+test.requestURLArguments, nil)
24952495
test.addRequestHeaders(httpReq)
24962496
recorder := httptest.NewRecorder()
24972497

exchange/bidder.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ func (bidder *BidderAdapter) doRequestImpl(ctx context.Context, req *adapters.Re
616616
httpResp, err := ctxhttp.Do(ctx, bidder.Client, httpReq)
617617
if err != nil {
618618
bidder.logHealthCheck(false)
619-
if err == context.DeadlineExceeded {
619+
if errors.Is(err, context.DeadlineExceeded) {
620620
err = &errortypes.Timeout{Message: err.Error()}
621621
var corebidder adapters.Bidder = bidder.Bidder
622622
// The bidder adapter normally stores an info-aware bidder (a bidder wrapper)
@@ -631,7 +631,6 @@ func (bidder *BidderAdapter) doRequestImpl(ctx context.Context, req *adapters.Re
631631
// a loop of trying to report timeouts to the timeout notifications.
632632
go bidder.doTimeoutNotification(tb, req, logger)
633633
}
634-
635634
}
636635
return &httpCallInfo{
637636
request: req,

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/prebid/prebid-server/v4
22

3-
go 1.23.0
3+
go 1.25
44

55
require (
66
github.com/51Degrees/device-detection-go/v4 v4.4.35

0 commit comments

Comments
 (0)