Skip to content
Merged
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
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:
- main
jobs:
go:
runs-on: ubuntu-latest
runs-on: gha-rtg-adikteev-runners-large-amd64
strategy:
matrix:
go-version: [1.18.x, 1.19.x]
go-version: [1.18.x, 1.19.x, 1.25.x]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Organization-specific CI runner accidentally committed in unrelated PR

The PR description indicates this change adds the Consent field to OpenRTB, but the CI workflow was modified to use gha-rtg-adikteev-runners (an organization-specific self-hosted runner) and includes 1.25.x in the Go version matrix. These changes appear unintentionally included since they're unrelated to the stated PR purpose and would cause CI failures for contributors without access to the custom runner infrastructure.

Fix in Cursor Fix in Web

Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Go version matrix jumps from 1.19.x directly to 1.25.x, skipping versions 1.20.x through 1.24.x. This creates a testing gap for intermediate Go versions. Consider including 1.20.x through 1.24.x in the matrix, or at minimum testing with the latest stable version to ensure compatibility across the version range.

Suggested change
go-version: [1.18.x, 1.19.x, 1.25.x]
go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x, 1.24.x, 1.25.x]

Copilot uses AI. Check for mistakes.
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand All @@ -25,8 +25,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.x
cache: true
- uses: golangci/golangci-lint-action@v3
go-version: 1.19.x
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The golangci-lint job's Go version was changed from 1.x (which always uses the latest stable Go version) to a pinned version 1.19.x. This is inconsistent with adding Go 1.25.x to the test matrix. If the project now supports Go 1.25.x, the linter should run on a compatible or newer version. Consider using 1.x to always use the latest Go version, or update to at least 1.25.x to match the highest version being tested.

Suggested change
go-version: 1.19.x
go-version: 1.25.x

Copilot uses AI. Check for mistakes.
- uses: golangci/golangci-lint-action@v6
with:
version: latest
2 changes: 1 addition & 1 deletion audio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestAudio_Validate(t *testing.T) {
},
CompanionTypes: []CompanionType{CompanionTypeStatic, CompanionTypeHTML},
}
if exp, got := ErrInvalidAudioNoMIMEs, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidAudioNoMIMEs, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
}
4 changes: 2 additions & 2 deletions bid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ func TestBid(t *testing.T) {

func TestBid_Validate(t *testing.T) {
subject := &Bid{}
if exp, got := ErrInvalidBidNoID, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidBidNoID, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
subject = &Bid{ID: "BIDID"}
if exp, got := ErrInvalidBidNoImpID, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidBidNoImpID, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
}
6 changes: 3 additions & 3 deletions bidrequest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ func TestBidRequest_complex(t *testing.T) {

func TestBidRequest_Validate(t *testing.T) {
subject := &BidRequest{}
if exp, got := ErrInvalidReqNoID, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidReqNoID, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
subject = &BidRequest{ID: "RID"}
if exp, got := ErrInvalidReqNoImps, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidReqNoImps, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
subject = &BidRequest{ID: "A", Impressions: []Impression{{ID: "1"}}, Site: &Site{}, App: &App{}}
if exp, got := ErrInvalidReqMultiInv, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidReqMultiInv, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
}
4 changes: 2 additions & 2 deletions bidresponse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ func TestBidResponse_complex(t *testing.T) {

func TestBidResponse_Validate(t *testing.T) {
subject := &BidResponse{}
if exp, got := ErrInvalidRespNoID, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidRespNoID, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
subject = &BidResponse{ID: "RID"}
if exp, got := ErrInvalidRespNoSeatBids, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidRespNoSeatBids, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
}
4 changes: 2 additions & 2 deletions impression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ func TestImpression(t *testing.T) {

func TestImpression_Validate(t *testing.T) {
subject := &Impression{}
if exp, got := ErrInvalidImpNoID, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidImpNoID, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
subject = &Impression{ID: "IMPID", Banner: &Banner{}, Video: &Video{}}
if exp, got := ErrInvalidImpMultiAssets, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidImpMultiAssets, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
}
1 change: 1 addition & 0 deletions openrtb.go
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,7 @@ type User struct {
CustomData string `json:"customdata,omitempty"` // Optional feature to pass bidder data that was set in the exchange's cookie. The string must be in base85 cookie safe characters and be in any format. Proper JSON encoding must be used to include "escaped" quotation marks.
Geo *Geo `json:"geo,omitempty"`
Data []Data `json:"data,omitempty"`
Consent string `json:"consent,omitempty"` // When GDPR regulations are in effect this attribute contains the Transparency and Consent Framework's Consent String data structure.
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new Consent field lacks test coverage. Consider adding a test case that includes the consent field in one of the existing JSON fixtures (e.g., testdata/breq.banner.json or testdata/breq.exp.json) and verify it's correctly serialized/deserialized. This is particularly important for GDPR compliance features to ensure the field is properly handled.

Copilot uses AI. Check for mistakes.
Ext json.RawMessage `json:"ext,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion seatbid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestSeatBid_Validate(t *testing.T) {
subject := &SeatBid{}
if exp, got := ErrInvalidSeatBidBid, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidSeatBidBid, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
}
6 changes: 3 additions & 3 deletions video_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ func TestVideo(t *testing.T) {

func TestVideo_Validate(t *testing.T) {
subject := &Video{}
if exp, got := ErrInvalidVideoNoMIMEs, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidVideoNoMIMEs, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
subject = &Video{MIMEs: []string{"video/mp4"}}
if exp, got := ErrInvalidVideoNoLinearity, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidVideoNoLinearity, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
subject = &Video{
Expand All @@ -65,7 +65,7 @@ func TestVideo_Validate(t *testing.T) {
Linearity: VideoLinearityNonLinear,
MIMEs: []string{"video/mp4"},
}
if exp, got := ErrInvalidVideoNoProtocols, subject.Validate(); !errors.Is(exp, got) {
if exp, got := ErrInvalidVideoNoProtocols, subject.Validate(); !errors.Is(got, exp) {
t.Fatalf("expected %v, got %v", exp, got)
}
}
Loading