Skip to content

Move backend routes under api/v1 #1017

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

Merged
merged 1 commit into from
Aug 27, 2017
Merged

Conversation

carols10cents
Copy link
Member

@carols10cents carols10cents commented Aug 27, 2017

For consistency, to avoid the clash with the frontend /me route that
caused problems with staying logged in, to make it clear that these
routes are part of the public HTTP API provided by crates.io, and to
let us evolve these routes in the future.

This would make me feel comfortable about adding a cargo command that uses the info from the backend me route (see #1012).

We could do this more conservatively by leaving the old routes here and only adding the new routes... but we haven't made any guarantees about the stability of these routes, so...

See discussion: #910 (comment)

@jtgeibel wdyt?

For consistency, to avoid the clash with the frontend /me route that
caused problems with staying logged in, to make it clear that these
routes are part of the public HTTP API provided by crates.io, and to
let us evolve these routes in the future.
@jtgeibel
Copy link
Member

Looks great to me @carols10cents! Works fine for me in a staging environment. This should also fix things for people who have HTML cached under the old route.

@carols10cents
Copy link
Member Author

thank you @jtgeibel!

bors: r+

bors-voyager bot added a commit that referenced this pull request Aug 27, 2017
1017: Move backend routes under api/v1 r=carols10cents

For consistency, to avoid the clash with the frontend /me route that
caused problems with staying logged in, to make it clear that these
routes are part of the public HTTP API provided by crates.io, and to
let us evolve these routes in the future.

This would make me feel comfortable about adding a cargo command that uses the info from the backend me route (see #1012).

We could do this more conservatively by leaving the old routes here and only adding the new routes... but we haven't made any guarantees about the stability of these routes, so...

See discussion: #910 (comment)

@jtgeibel wdyt?
@bors-voyager
Copy link
Contributor

bors-voyager bot commented Aug 27, 2017

Build succeeded

@bors-voyager bors-voyager bot merged commit 8f56f39 into rust-lang:master Aug 27, 2017
@lambda-fairy
Copy link

Is there any way I can get notified in advance for these API changes?

Cargobot (which announces new crates on #rust-bots) works by polling https://crates.io/summary, so it broke when this PR was deployed.

I realize that the crates.io API doesn't have any stability guarantees at the moment, but it would be nice to get a heads-up when things break!

@carols10cents carols10cents deleted the move-me branch August 30, 2017 14:16
@carols10cents
Copy link
Member Author

Hi! I had no idea about cargobot. In what form would you like to be notified, and for what kinds of API changes?

@jtgeibel
Copy link
Member

Fortunately, the only routes that remain at the top level are /authorize_url, /authorize, and /logout. I don't see any need to move these and I don't expect that anything else would depend on these routes.

However, it would be really nice if we had a list of known projects using the API so that we could reach out when we have such changes and even to just get a better understanding of how the broader ecosystem is using crates.io.

@lambda-fairy
Copy link

Cargobot only depends on /api/v1/summary at the moment, so I just need to be notified about that.

I think a GitHub mention would be okay, since I check that often. If/when we set up a general way to notify consumers about API changes (as suggested by @jtgeibel) I'll be happy to follow that instead.

@carols10cents
Copy link
Member Author

Ok! I started a wiki page for things I know use crates.io's api, and I'll try and remember to cc you if we change things about summary!

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.

4 participants