Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-0.4] Pkg.publish() failing #15381

Closed
sbromberger opened this issue Mar 6, 2016 · 17 comments
Closed

[release-0.4] Pkg.publish() failing #15381

sbromberger opened this issue Mar 6, 2016 · 17 comments
Labels
domain:packages Package management and loading kind:heisenbug This bug occurs unpredictably needs more info Clarification or a reproducible example is required

Comments

@sbromberger
Copy link
Contributor

julia> Pkg.tag("LightGraphs")
INFO: Tagging LightGraphs v0.5.1
INFO: Committing METADATA for LightGraphs

julia> Pkg.publish()
INFO: Validating METADATA
INFO: Pushing LightGraphs permanent tags: v0.5.1
Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
INFO: Submitting METADATA changes
INFO: Forking JuliaLang/METADATA.jl to sbromberger
ERROR: strangely formatted HTTP response
@toivoh
Copy link
Contributor

toivoh commented Mar 6, 2016 via email

@sbromberger
Copy link
Contributor Author

@toivoh did you resolve it? (How?)

@yuyichao yuyichao changed the title Pkg.publish() failing [release-0.4] Pkg.publish() failing Mar 7, 2016
@yuyichao
Copy link
Contributor

yuyichao commented Mar 7, 2016

Given the error message is not Pkg.publish() has been moved to the package PkgDev.jl. I assume this is release-0.4?

@sbromberger
Copy link
Contributor Author

Sorry - yes - this is 0.4:

Julia Version 0.4.4-pre+35
Commit 1a9429e* (2016-02-12 13:21 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin15.3.0)
  CPU: Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-svn

@tkelman tkelman added the domain:packages Package management and loading label Mar 7, 2016
@tkelman
Copy link
Contributor

tkelman commented Mar 7, 2016

https or git protocol?

@sbromberger
Copy link
Contributor Author

@tkelman - how do I tell? ~/.julia/v0.4/METADATA/.git/config shows url = https://github.com/JuliaLang/METADATA.jl.git.

@toivoh
Copy link
Contributor

toivoh commented Mar 7, 2016 via email

@tkelman
Copy link
Contributor

tkelman commented Mar 7, 2016

Since the error was "strangely formatted HTTP response," this might be due to something changing on github's API. Worth trying to reconstruct the same curl command that Pkg.publish was attempting to do and see what the full response looks like.

@vtjnash vtjnash added kind:heisenbug This bug occurs unpredictably needs more info Clarification or a reproducible example is required labels Mar 8, 2016
@sbromberger
Copy link
Contributor Author

@tkelman can you post the command? I'm happy to try it.

@tkelman
Copy link
Contributor

tkelman commented Mar 9, 2016

Probably something like curl -i -u $(Pkg.GitHub.token()):x-oauth-basic https://api.github.com/repos/JuliaLang/METADATA.jl/forks

@sbromberger
Copy link
Contributor Author

Output: https://gist.github.com/sbromberger/6c2c83f185e972f9c48d

Looks like JSON.

@tkelman
Copy link
Contributor

tkelman commented Mar 9, 2016

It is JSON - it then runs through

julia/base/pkg/github.jl

Lines 40 to 53 in 147d6d0

out, proc = open(`curl -i -s -S $opts $url`,"r")
head = readline(out)
status = parse(Int,split(head,r"\s+";limit=3)[2])
header = Dict{AbstractString,AbstractString}()
for line in eachline(out)
if !ismatch(r"^\s*$",line)
(k,v) = split(line, r":\s*"; limit=2)
header[k] = v
continue
end
wait(proc); return status, header, readall(out)
end
end
error("strangely formatted HTTP response")

@wildart
Copy link
Member

wildart commented Mar 14, 2016

I think it was some kind of problem with the response. Most likely it was empty.

@sbromberger Do you still have this problem?

So far following GitHub repo fork code works without problem, and creates fork for me.

PkgDev.GitHub.POST("repos/JuliaLang/Example.jl/forks")

@slundberg
Copy link
Contributor

@tkelman I think this may be caused by c0d41c9 since after moving the return statement inside a do-block there is now no way for the function to not hit the error at the end. This is likely only effecting the current 0.4 release, not the dev 0.5 version.

@tkelman
Copy link
Contributor

tkelman commented Mar 17, 2016

huh? return from inside a do block should work fine? if not that seems like a bigger bug

tkelman added a commit that referenced this issue Mar 17, 2016
@tkelman
Copy link
Contributor

tkelman commented Mar 17, 2016

Oh I think I see what you mean, the return is from the anonymous function inside the do block. Wish you had figured that out before I tagged 0.4.4. And that we had some automated tests of publish, register, etc.

@tkelman tkelman closed this as completed Mar 17, 2016
@slundberg
Copy link
Contributor

Sorry my first comment could have been clearer. But yes, that's what I was getting at. I agree, hopefully the new PkgDev will end up with more unit tests etc.

tkelman added a commit that referenced this issue Mar 18, 2016
I broke Pkg.publish (#15381), so may as well re-tag a new release that
includes the fix (#15536)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:packages Package management and loading kind:heisenbug This bug occurs unpredictably needs more info Clarification or a reproducible example is required
Projects
None yet
Development

No branches or pull requests

7 participants