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

Deprecate old /github, /bitbucket, /build endpoints #4568

Closed
gjtorikian opened this issue Aug 24, 2018 · 7 comments
Closed

Deprecate old /github, /bitbucket, /build endpoints #4568

gjtorikian opened this issue Aug 24, 2018 · 7 comments
Assignees
Labels
Accepted Accepted issue on our roadmap
Milestone

Comments

@gjtorikian
Copy link
Contributor

Sorry @ericholscher, I should've reached out sooner, but it suddenly occurred to me: is the https://readthedocs.org/ integration into GitHub still using GitHub Services? If so, services are being deprecated, and we suggest migrating away as soon as possible.

Please let me know if I can provide any more info or help!

@agjohnson agjohnson added the Needed: design decision A core team decision is required label Aug 24, 2018
@agjohnson agjohnson added this to the 2.8 milestone Aug 24, 2018
@agjohnson
Copy link
Contributor

agjohnson commented Aug 24, 2018

Thanks for the heads up! We used GitHub services in the past, and there are likely a non-trivial number of projects still using the old service. However, if you sign up your project today, your project will get a webhook, not the service.

An easy path forward for us is to collect projects hitting the mostly deprecated /github endpoint and send a warning. We should:

  • Collect projects as the /github, /bitbucket, or /build endpoint is hit
  • Use our notification backend to send site/email notifications for reconnecting project with a webhook integration
  • Announce hard deprecation of old endpoints and GitHub services

I also think we should support signed GitHub webhooks with v3, as we'll be pushing more users to it. See #4886 for this work.

@humitos
Copy link
Member

humitos commented Sep 6, 2018

@agjohnson how are you thinking to collect these projects? our logs are not saved for too many days now.

Maybe creating a temporal model in the database and calling get_or_create on each /github, /bitbucket, /build and send an email notification every two weeks. After depreciation, we can just remove this model safely. What do you think?

This will cover most of your points. We will need to announce the deprecation (maybe a blog post?) and "signing webhook", but that's a completely different issue for me (I wrote some thoughts on corporate issue tracker, https://github.com/rtfd/readthedocs-corporate/issues/364, that maybe should be moved here)

@gjtorikian
Copy link
Contributor Author

I pulled numbers for you all at one point (I work at GitHub) but forgot to share them. I think there was something like 27,000 users on the old services, with 24,000 of them being enabled (not active -- simply "turned on." I can't pull active numbers.)

I can grab the users and projects associated with the service, but I'm not sure if that's useful.

@agjohnson
Copy link
Contributor

@humitos perhaps we don't even need a database to track this. our notification system should be able to deduplicate messages and only send one every 2 weeks. So on requests to the deprecated webhook endpoints, we create a notification for the project owners every two weeks.

@gjtorikian 24000 is way more than i would have guessed! it might help to have this information if it's not a pain to pull it. Feel free to move this conversation to a private channel -- anthony@readthedocs.com and if required, my public pgp is at https://github.com/agjohnson.gpg

If GitHub has announced this, I think announcing the deprecation on our side and alerting users with active deprecated webhooks might be enough.

@agjohnson agjohnson changed the title Is this still using GitHub Services? Alerts users using deprecated GitHub services Sep 14, 2018
@agjohnson agjohnson changed the title Alerts users using deprecated GitHub services Deprecate old /github, /bitbucket, /build endpoints Nov 10, 2018
@humitos
Copy link
Member

humitos commented Nov 13, 2018

@agjohnson I will write some code today for your idea around notifications.

@humitos humitos self-assigned this Nov 13, 2018
@humitos humitos added Accepted Accepted issue on our roadmap and removed Needed: design decision A core team decision is required labels Nov 13, 2018
@humitos
Copy link
Member

humitos commented Nov 13, 2018

@humitos perhaps we don't even need a database to track this. our notification system should be able to deduplicate messages and only send one every 2 weeks. So on requests to the deprecated webhook endpoints, we create a notification for the project owners every two weeks.

I'm not seeing this clearly because we have 2 different types of notifications: site and email. Site allows deduplication since it uses the message storage, but email send the email immediately when .send() is called and the notification is not saved anywhere to be recovered from a Celery task later.

I opened #4898 to discuss over the code proposed.

@humitos humitos closed this as completed Nov 14, 2018
@humitos humitos reopened this Nov 14, 2018
@humitos
Copy link
Member

humitos commented Nov 14, 2018

Considering Bitbucket and the deprecation of APIv1 we have,

In [6]: SocialAccount.objects.filter(provider='bitbucket').count()
Out[6]: 1128

These accounts use /1.0/users/{username} as resource_uri and it will stop working on December 31st.

I suppose we want to send a site/email notification to these users communicating them to disconnect from current (old) Bitbucket connection and re-connect their account under https://readthedocs.org/accounts/social/connections/ (the old Bitbucket button is not more available so they will press the correct one ;) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap
Projects
None yet
Development

No branches or pull requests

3 participants