Skip to content

Conversation

tonglil
Copy link

@tonglil tonglil commented May 2, 2017

This updates the go-sql-driver/mysql vendored dependency.

We were running into an out of range issue with the current driver as there are about ~2500 repos, and as args they blow it up. See go-sql-driver/mysql#210.

There does not seem to be any breaking changes from the version 1.1 to the latest 1.3 (https://github.com/go-sql-driver/mysql/blob/master/CHANGELOG.md).

The error from Drone that was rendering it unusable:

2017/05/02 15:31:02 [Recovery] panic recovered:
GET /api/user/repos?all=true HTTP/1.1
Host: REDACTED
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.5
Connection: Keep-Alive
Cookie: _ga=GA1.2.1681741832.1465236831; user_sess=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTM5MzA0NjgsInRleHQiOiJ0b25nbGlsIiwidHlwZSI6InNlc3MifQ.Tja2XSfLvT0_QLucaj6LsWzmOPXVBMtBr3TdO3hnySg
Dnt: 1
Referer: https://REDACTED/account
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:53.0) Gecko/20100101 Firefox/53.0
Via: 1.1 google
X-Cloud-Trace-Context: 19a0e7932c2debb6f86cf25cfb7dedac/13010700181619962218
X-Forwarded-For: REDACTED
X-Forwarded-Proto: https


runtime error: slice bounds out of range
/usr/local/go/src/runtime/panic.go:443 (0x44e479)
/usr/local/go/src/runtime/panic.go:34 (0x44c975)
/drone/src/github.com/drone/drone/vendor/github.com/go-sql-driver/mysql/packets.go:861 (0x996ab5)
/drone/src/github.com/drone/drone/vendor/github.com/go-sql-driver/mysql/statement.go:83 (0x99a83f)
/usr/local/go/src/database/sql/sql.go:1654 (0x9e84ea)
/usr/local/go/src/database/sql/sql.go:1118 (0x9e401b)
/usr/local/go/src/database/sql/sql.go:1078 (0x9e3b36)
/usr/local/go/src/database/sql/sql.go:1061 (0x9e3883)
/drone/src/github.com/drone/drone/vendor/github.com/russross/meddler/loadsave.go:216 (0x97e17e)
/drone/src/github.com/drone/drone/vendor/github.com/russross/meddler/loadsave.go:227 (0x97e2b5)
/drone/src/github.com/drone/drone/store/datastore/repos.go:38 (0x80ddbc)
/drone/src/github.com/drone/drone/store/store.go:204 (0x806ccd)
/drone/src/github.com/drone/drone/server/user.go:62 (0x7ca389)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x79c1ba)
/drone/src/github.com/drone/drone/router/middleware/session/user.go:113 (0x7b3d91)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x79c1ba)
/drone/src/github.com/drone/drone/router/middleware/token/token.go:26 (0x7b415d)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x79c1ba)
/drone/src/github.com/drone/drone/router/middleware/session/user.go:68 (0x7b3705)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x79c1ba)
/drone/src/github.com/drone/drone/router/middleware/store.go:17 (0x5d8a63)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x79c1ba)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus/ginrus.go:26 (0x5e122c)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x79c1ba)
/drone/src/github.com/drone/drone/router/middleware/header/header.go:25 (0x7b0634)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x79c1ba)
/drone/src/github.com/drone/drone/router/middleware/header/header.go:17 (0x7b0470)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x79c1ba)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/recovery.go:45 (0x7ad7d1)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x79c1ba)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:284 (0x7a2e12)
/drone/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:265 (0x7a2a47)
/usr/local/go/src/net/http/server.go:2081 (0x5a579e)
/usr/local/go/src/net/http/server.go:1472 (0x5a1fee)
/usr/local/go/src/runtime/asm_amd64.s:1998 (0x480d81)

@CLAassistant
Copy link

CLAassistant commented May 2, 2017

CLA assistant check
All committers have signed the CLA.

@bradrydzewski
Copy link

Wow, thanks for the pull request and for tracing it to the sql driver!

@bradrydzewski bradrydzewski merged commit 3940205 into harness:master May 2, 2017
@tonglil tonglil deleted the fix-sql-bounds branch May 3, 2017 17:54
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