Code Monkey home page Code Monkey logo

gochecker's Introduction

gochecker

Checking build/test of Go packages

What is this?

This is code to help answer the question "how is the testability and buildability of Go code in the wild". It is implemented as a multi-pronged thing, using Athens as a Go proxy, the server (in cmd/server) as a validator for Athens, and the code in the python/ subdirectory as a docker image in which builds happen.

Data extraction tool

There's also a tool in cmd/tabulate that extracts various numbers from the data.

If you want to run it yourself

You will need to:

  • Have docker installed
  • Make sure you spin up the athens container, configured to point at the validation server and with a port exposed (otherwise the build wrapper can't reach athens).
  • Have a Docker environment file suitable to point the build wrapper at Athens
  • Start the server with the relevant arguments (it is hard-coded to ruin on port 8080, if your host's IP is not 192.168.1.2, make sure to pass a URL for the report endpoint with --endpoint).
  • Build the docker image containing the Python build-wrapper (if you don't call the resulting image gobuilder:manual, pass whatever you built and tagged it as with --image)

With all of that set up, you can trigger one or more manual seed packages by eiter asking the Athens instance to download them, fake up a validation requiest, or start a build using the gobuilder image.

gochecker's People

Contributors

vatine avatar

Watchers

 avatar  avatar

Forkers

owenthomas17

gochecker's Issues

Introspect downloaded modules/packages/things for `go.mod` files

At the moment, there's no stats on "is a thing go-module enabled or not", it would probably be interesting to see how that evolves over time. It should be relatively simple to locate the downloaded source from the name and just do a file probe to see if there's a go.mod file (and/or investigate if we can convince either go list or go mod do that for us).

Tighter definition of "download failed"

Examples that definitely work downloading, but gets flagged as "download failed" include:

go: downloading cloud.google.com/go v0.23.0
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/googleapis/gax-go v1.0.3
go: downloading go.opencensus.io v0.23.0
go: downloading golang.org/x/net v0.0.0-20210521195947-fe42d452be8f
go: downloading golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c
go: downloading golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
go: downloading google.golang.org/api v0.47.0
go: downloading google.golang.org/genproto v0.0.0-20210521181308-5ccab8a35a9a
go: downloading google.golang.org/grpc v1.38.0
go: downloading google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf
go: downloading github.com/googleapis/gax-go v1.0.0
go: downloading google.golang.org/genproto v0.0.0-20180831171423-11092d34479b
go: downloading google.golang.org/grpc v1.14.0
go: downloading go.opencensus.io v0.18.0
go: downloading google.golang.org/appengine v1.6.7
go: downloading google.golang.org/protobuf v1.26.0
go: downloading golang.org/x/sys v0.0.0-20210514084401-e8d321eab015
go: downloading golang.org/x/sys v0.0.0-20210521203332-0cec03c779c1
go: downloading golang.org/x/text v0.3.6
go: downloading contrib.go.opencensus.io/exporter/stackdriver v0.13.6
go: downloading contrib.go.opencensus.io/exporter/stackdriver v0.6.0
cloud.google.com/go tested by
	cloud.google.com/go.test imports
	golang.org/x/oauth2/google: cannot find module providing package golang.org/x/oauth2/google
cloud.google.com/go tested by
	cloud.google.com/go.test imports
	google.golang.org/api/option imports
	golang.org/x/oauth2: cannot find module providing package golang.org/x/oauth2
cloud.google.com/go tested by
	cloud.google.com/go.test imports
	cloud.google.com/go/datastore imports
	google.golang.org/api/transport/grpc imports
	google.golang.org/grpc/credentials/oauth imports
	golang.org/x/oauth2/jwt: cannot find module providing package golang.org/x/oauth2/jwt

Add "go fmt" compliance checks

It would be nice to see (in addition to all the other code checks) how many files (possibly tests excluded?) would be untouched by gofmt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.