Skip to content

Commit

Permalink
remove more postgresql leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
mjl- committed Aug 31, 2024
1 parent 76a95a9 commit 5273e0f
Show file tree
Hide file tree
Showing 40 changed files with 3 additions and 6,985 deletions.
24 changes: 0 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ export CGO_ENABLED=0
export GOFLAGS=-mod=vendor
export GOPROXY=off

PG=/usr/lib/postgresql/9.5

run: build
./ding -loglevel debug serve local/local.conf

Expand Down Expand Up @@ -39,21 +37,6 @@ install-js:
-mkdir -p node_modules/.bin
npm install --save-dev --save-exact [email protected]

postgres-init:
$(PG)/bin/initdb -D local/postgres95

postgres-makeuser:
$(PG)/bin/createuser -h localhost -p 5437 --no-createdb --pwprompt ding
$(PG)/bin/createdb -h localhost -p 5437 -O ding ding
$(PG)/bin/createuser -h localhost -p 5437 --no-createdb --pwprompt ding_test
$(PG)/bin/createdb -h localhost -p 5437 -O ding_test ding_test

postgres:
$(PG)/bin/postgres -D local/postgres95 -p 5437 -k '' 2>&1 | tee local/postgres95/postgres.log

psql:
$(PG)/bin/psql -h localhost -p 5437 -d ding

# note: running as root (with umask 0022) tests the privsep paths
test:
CGO_ENABLED=0 go test -coverprofile cover.out
Expand All @@ -72,10 +55,3 @@ fmt:

clean:
go clean

setup:
npm ci

setup0:
-mkdir -p node_modules/.bin
npm install --save-dev --save-exact [email protected] [email protected]
4 changes: 1 addition & 3 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ Now run: "make build test"

# Todo

- remove temporary code for migrating from postgresql to bstore
- rewrite ui in typescript
- when doing a concurrent build, check how much memory is available, and how much the build likely needs (based on previous build, need to start keeping track of rusage), and delay execution if there isn't enough memory.
- make some config runtime-configurable. like email address to notify. also allow multiple. and allow configuring per repo.
- allow configuring webhooks per repo.
- authentication on downloadable files.
- authentication on downloadable files? currently very useful to just wget a built binary (with internal endpoints).
- add a quickstart. make it easier to setup, and easier to get a first successful build.
- on reconnect after sse failure, make sure our state is up to date again. it isn't now.
- improve showing the cause of a failed build. 1. show then just last single line of output (make just prints that it failed at the end). 2. create files in output/ earlier? so we don't show errors about missing such files when the vcs clone failes (eg due to no git in path, or no permision to run build.sh (eg because a dir leading to build.sh isn't accessible).
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ module github.com/mjl-/ding
go 1.23

require (
github.com/lib/pq v1.1.1
github.com/mjl-/bstore v0.0.6
github.com/mjl-/goreleases v0.0.4
github.com/mjl-/httpinfo v0.0.2
github.com/mjl-/sconf v0.0.7
github.com/mjl-/sherpa v0.6.7
github.com/mjl-/sherpadoc v0.0.17
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4=
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mjl-/bstore v0.0.6 h1:ntlu9MkfCkpm2XfBY4+Ws4KK9YzXzewr3+lCueFB+9c=
github.com/mjl-/bstore v0.0.6/go.mod h1:/cD25FNBaDfvL/plFRxI3Ba3E+wcB0XVOS8nJDqndg0=
github.com/mjl-/goreleases v0.0.4 h1:Oj84UsebyYNZVD7ql8GS/JZQsnjFazX/MbUIU+sn3Fg=
github.com/mjl-/goreleases v0.0.4/go.mod h1:feMqtPMmNVIJjL2rqsS3pVx8gCvLFvJutbBwjj15rQo=
github.com/mjl-/httpinfo v0.0.2 h1:6lSs4JowAuZeqx3OlTsBaYQjmlPo/5pqQdbFBhMjt/o=
github.com/mjl-/httpinfo v0.0.2/go.mod h1:o/nQc5HN+F0rwF5dFOcU11wqsLUePZuXOMAIsL/HglU=
github.com/mjl-/sconf v0.0.7 h1:bdBcSFZCDFMm/UdBsgNCsjkYmKrSgYwp7rAOoufwHe4=
github.com/mjl-/sconf v0.0.7/go.mod h1:uF8OdWtLT8La3i4ln176i1pB0ps9pXGCaABEU55ZkE0=
github.com/mjl-/sherpa v0.6.7 h1:C5F8XQdV5nCuS4fvB+ye/ziUQrajEhOoj/t2w5T14BY=
Expand Down
2 changes: 0 additions & 2 deletions httpserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"

"github.com/mjl-/bstore"
"github.com/mjl-/httpinfo"
"github.com/mjl-/sherpa"
"github.com/mjl-/sherpadoc"
"github.com/mjl-/sherpaprom"
Expand Down Expand Up @@ -100,7 +99,6 @@ func servehttp(args []string) {
handler, err := sherpa.NewHandler("/ding/", version, Ding{}, &doc, opts)
xcheckf(err, "making sherpa handler")

http.Handle("GET /info", httpinfo.NewHandler(httpinfo.CodeVersion{Full: version}, nil))
http.Handle("GET /metrics", promhttp.Handler())

mux := http.NewServeMux()
Expand Down
8 changes: 0 additions & 8 deletions licenses/github.com/lib/pq/LICENSE.md

This file was deleted.

7 changes: 0 additions & 7 deletions licenses/github.com/mjl-/httpinfo/LICENSE

This file was deleted.

8 changes: 2 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ import (
"github.com/mjl-/sconf"
)

const (
databaseVersion = 18
)

//go:embed ding.html ding.js ding.json INSTALL.txt favicon.ico LICENSE licenses/*
var embedFS embed.FS

Expand Down Expand Up @@ -81,7 +77,7 @@ var config struct {
func init() {
config.DataDir = "data"
config.BaseURL = "http://localhost:6084"
config.Mail.SMTPPort = 25
config.Mail.SMTPPort = 587
config.IsolateBuilds.UIDStart = 10000
config.IsolateBuilds.UIDEnd = 20000
config.IsolateBuilds.DingUID = 1234
Expand Down Expand Up @@ -161,7 +157,7 @@ func main() {
case "kick":
kick(args)
case "version":
fmt.Printf("%s\ndatabase schema version %d\n", version, databaseVersion)
fmt.Printf("%s\n", version)
case "license":
printLicenses()
default:
Expand Down
4 changes: 0 additions & 4 deletions vendor/github.com/lib/pq/.gitignore

This file was deleted.

86 changes: 0 additions & 86 deletions vendor/github.com/lib/pq/.travis.sh

This file was deleted.

50 changes: 0 additions & 50 deletions vendor/github.com/lib/pq/.travis.yml

This file was deleted.

29 changes: 0 additions & 29 deletions vendor/github.com/lib/pq/CONTRIBUTING.md

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/github.com/lib/pq/LICENSE.md

This file was deleted.

Loading

0 comments on commit 5273e0f

Please sign in to comment.