Skip to content

Commit

Permalink
Merge branch 'main' into locatev2-plus
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Sep 11, 2024
2 parents a496794 + ee9b0a0 commit 0e1aba0
Show file tree
Hide file tree
Showing 12 changed files with 506 additions and 167 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
# Run tests and compute code coverage
name: coverage
on:
pull_request:
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v1
- uses: actions/setup-go@v5
with:
go-version: "1.20"
- uses: actions/checkout@v2
go-version: "1.23"

- uses: actions/checkout@v4

- run: go test -race -v -coverprofile=dash.cov -coverpkg=./... ./...

- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: dash.cov
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Make sure we can build the docker container
name: docker
on:
pull_request:
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- run: make buildcontainer
11 changes: 8 additions & 3 deletions .github/workflows/privacy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Make sure the client doesn't run successfully without the -y flag
name: privacy
on:
pull_request:
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v1
- uses: actions/setup-go@v5
with:
go-version: "1.20"
- uses: actions/checkout@v2
go-version: "1.23"

- uses: actions/checkout@v4

- run: go build -v ./cmd/dash-client

- run: |
if ./dash-client; then
echo "expected this command to fail"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20 as build
FROM golang:1.23 as build
ADD . /go/src/github.com/neubot/dash
WORKDIR /go/src/github.com/neubot/dash
RUN CGO_ENABLED=0 go build -v -tags netgo -ldflags "-s -w -extldflags \"-static\"" ./cmd/dash-server
Expand Down
3 changes: 1 addition & 2 deletions cmd/dash-client/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ func testhelper(t *testing.T, f func(int, testconfig)) {
t.Skip("Skipping this test in short mode")
}
mux := http.NewServeMux()
handler := server.NewHandler("../../testdata")
handler := server.NewHandler("../../testdata", log.Log)
ctx, cancel := context.WithCancel(context.Background())
handler.Logger = log.Log
handler.StartReaper(ctx)
handler.RegisterHandlers(mux)
server := httptest.NewServer(mux)
Expand Down
15 changes: 7 additions & 8 deletions cmd/dash-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
//
// Usage:
//
// dash-server [-datadir <dirpath>]
// [-http-listen-address <endpoint>]
// [-https-listen-address <endpoint>]
// [-prometheusx.listen-address <endpoint>]
// [-tls-cert <filepath>]
// [-tls-key <filepath>]
// dash-server [-datadir <dirpath>]
// [-http-listen-address <endpoint>]
// [-https-listen-address <endpoint>]
// [-prometheusx.listen-address <endpoint>]
// [-tls-cert <filepath>]
// [-tls-key <filepath>]
//
// The server will listen for incoming DASH experiment requests and
// will keep serving them until it is interrupted.
Expand Down Expand Up @@ -78,10 +78,9 @@ func main() {
promServer := prometheusx.MustServeMetrics()
defer promServer.Close()
mux := http.NewServeMux()
handler := server.NewHandler(*flagDatadir)
handler := server.NewHandler(*flagDatadir, log.Log)
handler.StartReaper(context.Background())
handler.RegisterHandlers(mux)
handler.Logger = log.Log
rootHandler := handlers.LoggingHandler(os.Stdout, mux)
go func() {
rtx.Must(http.ListenAndServeTLS(
Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
module github.com/neubot/dash

go 1.21
go 1.23.1

require (
github.com/apex/log v1.9.0
github.com/google/uuid v1.4.0
github.com/gorilla/handlers v1.5.1
github.com/m-lab/go v0.1.69
github.com/google/uuid v1.6.0
github.com/gorilla/handlers v1.5.2
github.com/m-lab/go v0.1.73
github.com/m-lab/ndt5-client-go v0.1.0
)

require (
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/m-lab/locate v0.14.43
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.15.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
golang.org/x/sys v0.13.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
github.com/prometheus/client_golang v1.20.3 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.59.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
golang.org/x/sys v0.25.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
)
Loading

0 comments on commit 0e1aba0

Please sign in to comment.