Giter Club home page Giter Club logo

badgeit's Introduction

Hi there πŸ‘‹

badgeit's People

Contributors

argonlaser avatar scriptnull avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

argonlaser

badgeit's Issues

Post mortem analysis on remacs repo cloning

Recently @argonlaser tried cloning https://github.com/Wilfred/remacs on the worker. This git repo is 250+ MB in size. ( Good job on doing thisπŸ… πŸŽ– )

After the cloning process starts, the following logs are found and the worker container stops. Also note that, during the cloning process, the CPU usage is very high and even SSH into the machine is being blocked by the absence of CPU availability, I guess.

Suspicion

I have following suspicions:

  1. Currently, worker clones the repo in default temp directory of the container. Does that mean, it's being cloned on the RAM. Maybe we need to use docker volumes and use that volume as a path to clone and see if this fixes the problem.
  2. Even though we might use volumes, the problem might still be unresolved, as we are not having enough RAM. If yes, we need to figure out which part of the cod e( may the external git lib) is using this much RAM and why it's exceeding 1GB.

Logs

2017/07/20 17:40:39 Booting Badgeit worker
2017/07/20 17:40:39 Setting up connection to badgeit queue
2017/07/20 17:40:39 Booted Badgeit Worker. To exit press CTRL+C
2017/07/20 17:40:39 Starting Task for message: {"callback":"https://b04ce0a2.ngrok.io/callback","download":"git","remote":"https://github.com/Wilfred/remacs"}
2017/07/20 17:40:39 Downloading the repository:  https://github.com/Wilfred/remacs
Counting objects: 773877, done.
Compressing objects: 100% (17/17), done.
Total 773877 (delta 4), reused 5 (delta 0), pack-reused 773860
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0x83ad1d, 0x16)
	/usr/local/go/src/runtime/panic.go:596 +0x95
runtime.sysMap(0xc44a380000, 0x100000, 0x456c00, 0xa47bb8)
	/usr/local/go/src/runtime/mem_linux.go:216 +0x1d0
runtime.(*mheap).sysAlloc(0xa2ef20, 0x100000, 0x7fffb5dddc08)
	/usr/local/go/src/runtime/malloc.go:428 +0x374
runtime.(*mheap).grow(0xa2ef20, 0x2f, 0x0)
	/usr/local/go/src/runtime/mheap.go:774 +0x62
runtime.(*mheap).allocSpanLocked(0xa2ef20, 0x2f, 0x7ff2d0d315b0)
	/usr/local/go/src/runtime/mheap.go:678 +0x44f
runtime.(*mheap).alloc_m(0xa2ef20, 0x2f, 0x100000000, 0x0)
	/usr/local/go/src/runtime/mheap.go:562 +0xe2
runtime.(*mheap).alloc.func1()
	/usr/local/go/src/runtime/mheap.go:627 +0x4b
runtime.systemstack(0x7fffb5dddd00)
	/usr/local/go/src/runtime/asm_amd64.s:343 +0xab
runtime.(*mheap).alloc(0xa2ef20, 0x2f, 0x100000000, 0x0)
	/usr/local/go/src/runtime/mheap.go:628 +0xa0
runtime.largeAlloc(0x5e000, 0x451400, 0xc44a322000)
	/usr/local/go/src/runtime/malloc.go:795 +0x93
runtime.mallocgc.func1()
	/usr/local/go/src/runtime/malloc.go:690 +0x3e
runtime.systemstack(0xa2a400)
	/usr/local/go/src/runtime/asm_amd64.s:327 +0x79
runtime.mstart()
	/usr/local/go/src/runtime/proc.go:1132

goroutine 29 [running]:
runtime.systemstack_switch()
	/usr/local/go/src/runtime/asm_amd64.s:281 fp=0xc4384fa0f8 sp=0xc4384fa0f0
runtime.mallocgc(0x5e000, 0x0, 0x2f500, 0xc44a322000)
	/usr/local/go/src/runtime/malloc.go:691 +0x930 fp=0xc4384fa198 sp=0xc4384fa0f8
runtime.growslice(0x797b40, 0xc44a322000, 0x3f5b4, 0x4a000, 0x4f5b4, 0xc44733bc32, 0x12, 0x1ce)
	/usr/local/go/src/runtime/slice.go:140 +0x23e fp=0xc4384fa220 sp=0xc4384fa198
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.PatchDelta(0xc44a224000, 0x6ff02, 0x7fe00, 0xc44733bc2f, 0x15, 0x1d1, 0x0, 0x9f6fa0, 0xc4202b9200)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/patch_delta.go:70 +0x50f fp=0xc4384fa2e0 sp=0xc4384fa220
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.ApplyDelta(0x9f6fa0, 0xc4202b9000, 0x9f6fa0, 0xc4202b9200, 0xc44733bc00, 0x44, 0x200, 0xa46390, 0x7fefc0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/patch_delta.go:33 +0x149 fp=0xc4384fa370 sp=0xc4384fa2e0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4202b9000, 0x7f05a4b, 0xc420190ac0, 0xc4384fa480, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:382 +0x202 fp=0xc4384fa420 sp=0xc4384fa370
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4202b8f40, 0x0, 0x0, 0xc4384fa558, 0xc420126870)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384fa518 sp=0xc4384fa420
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x8490c0, 0xc4384fbf60, 0x7f7199c, 0xc4384fa580)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384fa558 sp=0xc4384fa518
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObjectAt(0xc4384fbf60, 0x7f7191a, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:325 +0xd1 fp=0xc4384fa5a0 sp=0xc4384fa558
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByOffset(0xc4384fbf60, 0x7f7191a, 0x306c6190138d76e5, 0xc476230eb6, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:399 +0x124 fp=0xc4384fa608 sp=0xc4384fa5a0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4202b8e80, 0x7f7191a, 0xc420190ac0, 0xc4384fa728, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:375 +0x2aa fp=0xc4384fa6b8 sp=0xc4384fa608
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4202b8dc0, 0x0, 0x0, 0xc4384fa7f0, 0xc420126b90)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384fa7b0 sp=0xc4384fa6b8
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x8490c0, 0xc4384fbf60, 0x7f719c4, 0xc4384fa818)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384fa7f0 sp=0xc4384fa7b0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObjectAt(0xc4384fbf60, 0x7f71967, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:325 +0xd1 fp=0xc4384fa838 sp=0xc4384fa7f0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByOffset(0xc4384fbf60, 0x7f71967, 0x2dc2d03fdb7ab6b7, 0xc4e9bdb259, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:399 +0x124 fp=0xc4384fa8a0 sp=0xc4384fa838
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4202b8d00, 0x7f71967, 0xc420190ac0, 0xc4384fa9c0, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:375 +0x2aa fp=0xc4384fa950 sp=0xc4384fa8a0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4202b8c40, 0x0, 0x0, 0xc4384faa88, 0xc420126a50)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384faa48 sp=0xc4384fa950
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x8490c0, 0xc4384fbf60, 0x7f719f0, 0xc4384faab0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384faa88 sp=0xc4384faa48
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObjectAt(0xc4384fbf60, 0x7f7199c, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:325 +0xd1 fp=0xc4384faad0 sp=0xc4384faa88
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByOffset(0xc4384fbf60, 0x7f7199c, 0x76db9c29499f3e0, 0xc45e4e5dd0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:399 +0x124 fp=0xc4384fab38 sp=0xc4384faad0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4202b8b40, 0x7f7199c, 0xc420190ac0, 0xc4384fac58, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:375 +0x2aa fp=0xc4384fabe8 sp=0xc4384fab38
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4202b8ac0, 0x0, 0x0, 0xc4384fad20, 0xc420126aa0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384face0 sp=0xc4384fabe8
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x8490c0, 0xc4384fbf60, 0x80037f5, 0xc4384fad48)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384fad20 sp=0xc4384face0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObjectAt(0xc4384fbf60, 0x7f719c4, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:325 +0xd1 fp=0xc4384fad68 sp=0xc4384fad20
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByOffset(0xc4384fbf60, 0x7f719c4, 0x5a56886535fd5853, 0xc42483c7c4, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:399 +0x124 fp=0xc4384fadd0 sp=0xc4384fad68
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4202b8a40, 0x7f719c4, 0xc420190ac0, 0xc4384faee0, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:375 +0x2aa fp=0xc4384fae80 sp=0xc4384fadd0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4202b8840, 0x0, 0x0, 0xc4384fafb8, 0xc420126af0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384faf78 sp=0xc4384fae80
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x8490c0, 0xc4384fbf60, 0x806d500, 0xc4384fafe0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384fafb8 sp=0xc4384faf78
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObjectAt(0xc4384fbf60, 0x80037ca, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:325 +0xd1 fp=0xc4384fb000 sp=0xc4384fafb8
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByOffset(0xc4384fbf60, 0x80037ca, 0xad7501e8e37a3158, 0xc45b4fa3a9, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:399 +0x124 fp=0xc4384fb068 sp=0xc4384fb000
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4202b8780, 0x80037ca, 0xc420190ac0, 0xc4384fb178, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:375 +0x2aa fp=0xc4384fb118 sp=0xc4384fb068
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4202b8680, 0x0, 0x0, 0xc4384fb250, 0xc420126190)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384fb210 sp=0xc4384fb118
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x8490c0, 0xc4384fbf60, 0x806dd43, 0xc4384fb278)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384fb250 sp=0xc4384fb210
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObjectAt(0xc4384fbf60, 0x806d4d5, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:325 +0xd1 fp=0xc4384fb298 sp=0xc4384fb250
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByOffset(0xc4384fbf60, 0x806d4d5, 0xafbafd7427892609, 0xc4ff3d2619, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:399 +0x124 fp=0xc4384fb300 sp=0xc4384fb298
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4202b84c0, 0x806d4d5, 0xc420190ac0, 0xc4384fb410, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:375 +0x2aa fp=0xc4384fb3b0 sp=0xc4384fb300
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4202b83c0, 0x0, 0x0, 0xc4384fb4e8, 0xc4201261e0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384fb4a8 sp=0xc4384fb3b0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x8490c0, 0xc4384fbf60, 0x80d0591, 0xc4384fb510)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384fb4e8 sp=0xc4384fb4a8
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObjectAt(0xc4384fbf60, 0x806dd1a, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:325 +0xd1 fp=0xc4384fb530 sp=0xc4384fb4e8
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByOffset(0xc4384fbf60, 0x806dd1a, 0x67fe71335b6f91d6, 0xc47251badf, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:399 +0x124 fp=0xc4384fb598 sp=0xc4384fb530
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4202b81c0, 0x806dd1a, 0xc420190ac0, 0xc4384fb6a8, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:375 +0x2aa fp=0xc4384fb648 sp=0xc4384fb598
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4202b8000, 0x0, 0x0, 0xc4384fb780, 0xc420126140)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384fb740 sp=0xc4384fb648
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x8490c0, 0xc4384fbf60, 0x80d40f9, 0xc4384fb7a8)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384fb780 sp=0xc4384fb740
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObjectAt(0xc4384fbf60, 0x80d0560, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:325 +0xd1 fp=0xc4384fb7c8 sp=0xc4384fb780
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByOffset(0xc4384fbf60, 0x80d0560, 0xaf5dff5c42595ce0, 0xc422270ab6, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:399 +0x124 fp=0xc4384fb830 sp=0xc4384fb7c8
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4377e9fc0, 0x80d0560, 0xc420190ac0, 0xc4384fb940, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:375 +0x2aa fp=0xc4384fb8e0 sp=0xc4384fb830
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4377e9f80, 0x0, 0x0, 0xc4384fba18, 0xc42004dc20)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384fb9d8 sp=0xc4384fb8e0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x8490c0, 0xc4384fbf60, 0x81277ed, 0xc4384fba40)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384fba18 sp=0xc4384fb9d8
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObjectAt(0xc4384fbf60, 0x80d40d0, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:325 +0xd1 fp=0xc4384fba60 sp=0xc4384fba18
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).recallByOffset(0xc4384fbf60, 0x80d40d0, 0x9b992ea285473a50, 0xc45255b413, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:399 +0x124 fp=0xc4384fbac8 sp=0xc4384fba60
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).fillOFSDeltaObjectContent(0xc4384fbf60, 0x9f6fa0, 0xc4377e9f40, 0x80d40d0, 0xc420190ac0, 0xc4384fbbd8, 0x1)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:375 +0x2aa fp=0xc4384fbb78 sp=0xc4384fbac8
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeByHeader(0xc4384fbf60, 0xc4377e9f00, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:279 +0x3d6 fp=0xc4384fbc70 sp=0xc4384fbb78
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).DecodeObject(0xc4384fbf60, 0x9f6fa0, 0xc4377e9e80, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:214 +0x66 fp=0xc4384fbcb0 sp=0xc4384fbc70
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).decodeObjects(0xc4384fbf60, 0xbcef5, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:155 +0x40 fp=0xc4384fbcf0 sp=0xc4384fbcb0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).doDecode(0xc420033f60, 0x8490b8, 0xc420033f60)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:145 +0x103 fp=0xc4384fbd38 sp=0xc4384fbcf0
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Decoder).Decode(0xc4384fbf60, 0x0, 0x0, 0xc400000000, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/decoder.go:129 +0xa1 fp=0xc4384fbd90 sp=0xc4384fbd38
gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit.(*PackWriter).buildIndex(0xc4200eca00)
	/go/src/gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit/writers.go:64 +0xc5 fp=0xc4384fbfd8 sp=0xc4384fbd90
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc4384fbfe0 sp=0xc4384fbfd8
created by gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit.newPackWrite
	/go/src/gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit/writers.go:52 +0x3b5

goroutine 1 [chan receive, 18 minutes]:
main.main()
	/go/src/github.com/scriptnull/badgeit/worker/main.go:75 +0x62a

goroutine 17 [syscall, 18 minutes, locked to thread]:
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2197 +0x1

goroutine 10 [chan receive, 18 minutes]:
gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit.(*PackWriter).Close(0xc4200eca00, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit/writers.go:113 +0xbf
gopkg.in/src-d/go-git.v4/plumbing/format/packfile.UpdateObjectStorage(0x7ff2d0db7fc8, 0xc42004d720, 0x9ee420, 0xc42004cf50, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/common.go:34 +0x173
gopkg.in/src-d/go-git%2ev4.(*Remote).fetchPack(0xc420106940, 0xc4200457a8, 0x9f3420, 0xc42000e1a0, 0xc4203e0840, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/remote.go:249 +0x2d3
gopkg.in/src-d/go-git%2ev4.(*Remote).fetch(0xc420106940, 0xc4200457a8, 0x0, 0x0, 0x0, 0x0)
	/go/src/gopkg.in/src-d/go-git.v4/remote.go:184 +0x585
gopkg.in/src-d/go-git%2ev4.(*Repository).clone(0xc4200f6de0, 0xc420045890, 0x4e9500, 0xc4200f6de0)
	/go/src/gopkg.in/src-d/go-git.v4/repository.go:395 +0x1b8
gopkg.in/src-d/go-git%2ev4.PlainClone(0xc420106160, 0x12, 0xbc4cc7f004b6500, 0xc420045890, 0xc4200ba180, 0x3f, 0x53)
	/go/src/gopkg.in/src-d/go-git.v4/repository.go:289 +0x8b
github.com/scriptnull/badgeit/worker/downloader.(*GitDownloader).Download(0xc4200f67b0, 0x2, 0x2)
	/go/src/github.com/scriptnull/badgeit/worker/downloader/download_git.go:17 +0xb4
main.executeTask(0xc42004bb90, 0x6f, 0x70)
	/go/src/github.com/scriptnull/badgeit/worker/main.go:127 +0x51a
main.main.func1(0xc420016b40)
	/go/src/github.com/scriptnull/badgeit/worker/main.go:68 +0x1cc
created by main.main
	/go/src/github.com/scriptnull/badgeit/worker/main.go:72 +0x5d0

goroutine 19 [select, 18 minutes]:
net/http.(*persistConn).readLoop(0xc420071d40)
	/usr/local/go/src/net/http/transport.go:1599 +0x9ec
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1117 +0xa35

goroutine 20 [select, 18 minutes]:
net/http.(*persistConn).writeLoop(0xc420071d40)
	/usr/local/go/src/net/http/transport.go:1704 +0x43a
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1118 +0xa5a
exit status 2

Add cat formatter

This formatter will give out badges arranged below a category like npm, github etc.

Worker should return the repo link along with the badges.

As per our discussion, the HTTP request https://badgeit-front.com/callback sent to the front service requires repo link along the array of possible badges something like this:

{
    "repoLink": "https://github.com/argonlaser/badgeit-front",
     "badges": [<array of badges>]
}

This info shall be used to send the badges to all the clients listening to the room(repoLink).

badges for travis

if .travis.yml is present && can fetch github repo url of the current git repo, the following details can be generated from the repo information.

Use https://github.com/scriptnull/badgeit/blob/master/contracts/contract_github.go#L23 to get the github repo information and generate the below badges.

It would be good to have a cache implemented in common.GetGithubRepos. So that, the .git parsing is done only once and all the contracts can get data from the cache in subsequent accesses.

Allow badge styles and refine Badge type

Badge type should not have Markdown field like this https://github.com/scriptnull/badgeit/blob/master/contracts/contract_github.go#L46

It should have Name, ImageURL, LinkURL, Style etc. and it should expose a method called String() or MarkDown() that will generate the markdown of the badge.

One of the lessons learnt here is, we should always make types represent data and use methods for getting an extracted data that is available from the base data present in this type fields. In this way the API can scale.

screen shot 2017-06-18 at 11 39 11 am

badges for appveyor projects

Image: https://img.shields.io/appveyor/ci/gruntjs/grunt.svg
LinkUrl: https://ci.appveyor.com/project/gruntjs/grunt

Add Outputer interface

We will start to support multiple types of outputs like stdout, file output, http output, etc.

We need an interface called Outputer that satisfies Output() error function.

Add health check route to API

We need this to check if API is alive

Just create a new route GET / and return the following payload

{
   "app": "badgeit-api",
   "version": "experimental"
}

Add all-json formatter

Right now, we have all formatter. But we need the json formatter that can output badges as json

Remove RabbitMq and introduce Redis

RabbitMq is a pure queue. But redis can act as cache + queue. And I suspect redis to be have much lower memory footprint.

Currently, we allocate 150MB RAM for rabbitMq, which in my opinion is a huge deal. If we make redis to work in the same memory limit, we have both queue and a key pair storage for us ready.

Add min formatter

min formatter gives 7 most favourable badges as per the documentation. So, we should have a field called priority to maintain the priority and get the top most 7 badges.

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.