Skip to content

fix(contrib/google.golang.org/api): update tests to use ElectionQuery instead of RepresentativeInfoByAddress#3504

Merged
darccio merged 3 commits into
mainfrom
dario.castane/fix-civicinfo-tests
May 7, 2025
Merged

fix(contrib/google.golang.org/api): update tests to use ElectionQuery instead of RepresentativeInfoByAddress#3504
darccio merged 3 commits into
mainfrom
dario.castane/fix-civicinfo-tests

Conversation

@darccio

@darccio darccio commented May 7, 2025

Copy link
Copy Markdown
Member

What does this PR do?

Replaces the deprecated Representatives API from google.golang.org/api/civicinfo/v2 with Election API, which exists in previous versions and the current one.

Motivation

Smoke tests are failing: https://github.com/DataDog/dd-trace-go/actions/runs/14881053781/job/41789069646?pr=3482#step:7:341

=== FAIL: .  (0.00s)
FAIL	github.com/DataDog/dd-trace-go/contrib/google.golang.org/api/v2 [build failed]

=== Errors
Error: ./api_test.go:80:6: svc.Representatives undefined (type *civicinfo.Service has no field or method Representatives)

Error: ./api_test.go:134:6: svc.Representatives undefined (type *civicinfo.Service has no field or method Representatives)

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running golangci-lint run locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@darccio
darccio requested review from a team as code owners May 7, 2025 11:12
@github-actions github-actions Bot added the apm:ecosystem contrib/* related feature requests or bugs label May 7, 2025
@pr-commenter

pr-commenter Bot commented May 7, 2025

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2025-05-07 14:20:26

Comparing candidate commit 963ac9e in PR branch dario.castane/fix-civicinfo-tests with baseline commit 281ec7d in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 0 unstable metrics.

@darccio
darccio enabled auto-merge (squash) May 7, 2025 13:49
@darccio
darccio merged commit 549276c into main May 7, 2025
@darccio
darccio deleted the dario.castane/fix-civicinfo-tests branch May 7, 2025 14:39
darccio added a commit that referenced this pull request May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants