-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/website/internal/dl: document /dl/?mode=json API more prominently #34864
Comments
There's also an The docs are there (https://godoc.org/golang.org/x/website/internal/dl) but it's pretty hidden. I agree we should document it somewhere more prominent. Perhaps some place in https://golang.org/dl/ itself. |
I agree. Multiple times I've found people using GitHub's releases API to see what Go versions have been released, when using the |
If we decide to document this API more prominently, we should be clear about its stability and reliability. Them being documented only in internal packages is a signal they're primarily for our own use and that they can change and that they don't have a public SLO. By the way, there is yet another primarily-for-internal-use-so-no-stability-guarantees gRPC-based API for determining latest Go releases. A client for it is available in the apipb package. See here for example usage. If we decide to document these more prominently, perhaps it would make sense to create a new API page on the golang.org website where various APIs, including /dl?mode=json, can be documented. This page can be listed under the Developer Resources section of the Go project page. Then golang.org/dl can include a short sentence with a link to it, rather than providing all the details. |
While I see your point there, it's probably too late for any breaking changes at this point. For example, any backwards-incompatible change would break https://github.com/actions/setup-go, and thus would break practically all GitHub Actions that need Go. It's true that the API was never announced or publicly documented, but it was made de facto stable the moment that it went live under an easy-to-use golang.org endpoint, in my opinion. |
@theckman there are a lot off open issues which require a decision, and most of them don't have assignees. It also doesn't seem to me like this issue is urgent, compared to the other work wrapping up for 1.15. Having said that, if you look at https://dev.golang.org/owners, you'll see the owners for |
This is a real endpoint that we have repeatedly told people about. It's definitely (past) time for it to be documented. Let's do that. |
@rsc Given it's already documented at https://pkg.go.dev/golang.org/x/website/internal/dl, I understand this issue is about documenting it elsewhere as well. I've suggested one possibility of making a new page on golang.org (see the last paragraph of #34864 (comment)). Another place could be a new API wiki page. Would either one of those would work, or do you have more thoughts on those two options? Should we describe the availability of the API, or is it sufficiently implicit that it's the same as that of the golang.org website, given the API endpoint shares the same domain name? |
I vote for documenting it under golang.org, not the wiki, as the latter isn't code reviewed.
I'm not sure what you mean here, but I do think having a full HTTPS link would be useful. Clicking and seeing the data in your browser within a second is a good way to get a feel for how the API works. |
I think he meant what users should expect from an uptime perspective. I don’t think this is necessary beyond maybe setting expectations that it’s supported on a best-effort basis with no guarantees. |
Change https://golang.org/cl/290231 mentions this issue: |
@andybons of course - I'm not sure what I was thinking :) |
Change https://go.dev/cl/401094 mentions this issue: |
Since golang.org/dl/ always redirects to go.dev/dl/, update the documentation accordingly. Updates golang/go#34864. Change-Id: Ied245b8765a2570609ea30441ffe7676b04796aa Reviewed-on: https://go-review.googlesource.com/c/website/+/401094 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
It would be nice for the JSON mode of golang.org/dl to be documented somewhere (https://golang.org/dl/?mode=json). I wasn't able to find it until after I built a project to recreate the same functionality and someone pointed it out.
Having a JSON API for Go releases is great and I think some folks would build more tools using it if we had it documented.
The text was updated successfully, but these errors were encountered: