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

CI: Check go.sum is up-to-date #918

Merged
merged 3 commits into from
May 7, 2021
Merged

Conversation

felixge
Copy link
Member

@felixge felixge commented May 5, 2021

go 1.16 made a change causing most go tools to act as if -mod=readonly
was set.

VS Code runs go list by default, so if this file is not up-to-date
contributors using go 1.16 will be greeted with editor errors right
away.

This problem exists for many other go workflows as well, so this patch
adds a CI check to make sure our go.sum stays up-to-date.

image

@felixge felixge added this to the 1.31.0 milestone May 5, 2021
VS Code runs `go list` by default, so if this file is not up-to-date
contributors will be greeted with an editor error right away.
@felixge felixge force-pushed the felix.geisendoerfer/update-go-sum branch from ed9a7c2 to 4fe6c8a Compare May 5, 2021 09:56
@felixge felixge requested review from gbbr and knusbaum May 5, 2021 10:06
@felixge
Copy link
Member Author

felixge commented May 5, 2021

@gbbr @knusbaum this is in the same spirit as #917 but hopefully less controversial as a first step towards creating a better Go 1.16 contributor experience.

@felixge
Copy link
Member Author

felixge commented May 5, 2021

Here is another workflow error I experienced just now that would be fixed by merging this:

# checked out my delta profile branch
$ go test ./profiler
options.go:26:2: missing go.sum entry for module providing package github.com/DataDog/datadog-go/statsd (imported by gopkg.in/DataDog/dd-trace-go.v1/profiler); to add:
        go get gopkg.in/DataDog/dd-trace-go.v1/profiler
../internal/globalconfig/globalconfig.go:14:2: no required module provides package github.com/google/uuid; to add it:
        go get github.com/google/uuid
$ go get gopkg.in/DataDog/dd-trace-go.v1/profiler
$ go test ./profiler
# gopkg.in/DataDog/dd-trace-go.v1/profiler
metrics_test.go:15:2: missing go.sum entry for module providing package github.com/stretchr/testify/assert (imported by gopkg.in/DataDog/dd-trace-go.v1/profiler); to add:
        go get -t gopkg.in/DataDog/dd-trace-go.v1/profiler
FAIL    gopkg.in/DataDog/dd-trace-go.v1/profiler [setup failed]
$ go get -t gopkg.in/DataDog/dd-trace-go.v1/profiler
$ go test ./profiler
PASS
ok      gopkg.in/DataDog/dd-trace-go.v1/profiler        0.923s

@gbbr
Copy link
Contributor

gbbr commented May 5, 2021

This is fine by me, but maybe we can squeeze it into one of the other checks?

Copy link
Contributor

@knusbaum knusbaum left a comment

Choose a reason for hiding this comment

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

+1 I'm good with this.

Eventually we may want to refactor these CI-related programs into the .circleci directory rather than leave them in the root, but there's only 3 right now so it's not a problem.

@gbbr gbbr merged commit c11c5dc into v1 May 7, 2021
@gbbr gbbr deleted the felix.geisendoerfer/update-go-sum branch May 7, 2021 07:01
@felixge
Copy link
Member Author

felixge commented May 7, 2021

@knusbaum @gbbr thanks for review & merging this :)

stlimtat pushed a commit to stlimtat/dd-trace-go that referenced this pull request May 17, 2021
* 'v1' of https://github.com/DataDog/dd-trace-go:
  Implement DD_PROFILING_OUTPUT_DIR for dev/debug (DataDog#924)
  contrib/go-pg/pg.v10: add INTEGRATION flag check for tests (DataDog#921)
  contrib/go-redis/redis.v8: optimize BeforeProcess and BeforeProcessPipeline (DataDog#920)
  CI: check go.sum is up-to-date (DataDog#918)
  README: Fix go get instructions (DataDog#913)
  internal/log: Improve API for testing (DataDog#916)
  ddtrace/tracer: add support for agent discovery endpoint, feature flags, stats & drops (DataDog#859)
  internal/version: bump to v1.31.0 (DataDog#910)
  CONTRIBUTING.md: add link to contrib/README.md (DataDog#802)
  profiler: Disable agentless mode for WithAPIKey (DataDog#906)
  contrib/Shopify/sarama: fix possible deadlock in WrapAsyncProducer (DataDog#907)
  contrib/database/sql.tracedConn implement driver.SessionResetter (DataDog#908)
  ddtrace/opentracer: consider FollowsFrom references as children (DataDog#905)
  ddtrace/opentracer: add support for opentracing.TracerContextWithSpanExtension (DataDog#855)
  ddtrace/tracer: follow noDebugStack setting when using SetTag with an error (DataDog#900)
  contrib/net/http: add a getter to retrieve original round tripper (DataDog#903)
  ddtrace/tracer: ensure Flush call is synchronous (DataDog#901)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants