crest icon indicating copy to clipboard operation
crest copied to clipboard

Crest v0.10.0 is buggy (?)

Open mamantoha opened this issue 7 years ago • 11 comments

shards-info with crest v0.10.1 randomly crash on Heroku about 1-2 times per hour :shit:

mamantoha avatar May 18 '18 08:05 mamantoha

https://github.com/mamantoha/crest/commit/dc846c37a671f0f409cc95429e57362dfd7cb8d6?diff=unified#diff-3994e7f5f940813c595702c024b0e5f7R49

mamantoha avatar May 18 '18 09:05 mamantoha

Crystal code to reproduce the issue:

require "http/client"
require "uri"

url = "https://api.github.com"
uri = URI.parse(url)
path = "/repos/crystal-lang/crystal"

headers = HTTP::Headers.new
headers.add("Accept", "application/vnd.github.mercy-preview+json")

client = HTTP::Client.new(uri)

resp = client.exec("GET", path, headers: headers)
puts resp.body

puts "Wait 2 minutes..."
sleep 2.minutes

resp = client.exec("GET", path, headers: headers)
puts resp.body

mamantoha avatar May 18 '18 18:05 mamantoha

Adding this line fixes this issue:

client.compress = false

:tada:

mamantoha avatar May 18 '18 19:05 mamantoha

Still exists in Crystal 0.25 :crying_cat_face:

mamantoha avatar Jun 15 '18 08:06 mamantoha

Still exists in Crystal 0.26 :crying_cat_face:

mamantoha avatar Aug 14 '18 09:08 mamantoha

Still exists in Crystal 0.29 :crying_cat_face:

mamantoha avatar Jun 18 '19 16:06 mamantoha

should this issue be upstreamed to the crystal project?

jkthorne avatar Jun 18 '19 20:06 jkthorne

Still exists in Crystal 1.1.0 :crying_cat_face:

mamantoha avatar Jul 26 '21 13:07 mamantoha

It seems like this has been fixed with the docker nightly build.

cyangle avatar Nov 30 '21 15:11 cyangle

@cyangle still exists

crystal -v                
Crystal 1.3.0-dev [6ce66047c] (2021-12-07)

LLVM: 10.0.0
Default target: x86_64-unknown-linux-gnu

mamantoha avatar Dec 08 '21 15:12 mamantoha

@mamantoha Could you try it out with latest crystallang/crystal:nightly-alpine? It works for me.

# crystal -v
Crystal 1.3.0-dev [0f0852f33] (2021-12-08)

LLVM: 10.0.0
Default target: x86_64-unknown-linux-musl

cyangle avatar Dec 09 '21 03:12 cyangle

This bug seems to be fixed by https://github.com/crystal-lang/crystal/pull/12536

cyangle avatar Sep 28 '22 22:09 cyangle

Fixed in Crystal 1.6.0 😸 🎉

mamantoha avatar Oct 10 '22 11:10 mamantoha