Skip to content

Integration resync webhook fails #3931

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

Closed
humitos opened this issue Apr 10, 2018 · 1 comment
Closed

Integration resync webhook fails #3931

humitos opened this issue Apr 10, 2018 · 1 comment
Labels
Bug A bug
Milestone

Comments

@humitos
Copy link
Member

humitos commented Apr 10, 2018

Steps to reproduce it:

  1. Import GitLab project (do not use Manual Import)
  2. Webhook are created sucessfully
  3. Go to your GitLab project and remove the RTD integration from settings
  4. Go to your Admin -> Integrations
  5. Select your integration
  6. Click on Resync

Message received:

Webhook activation failed. Make sure you have the necessary permissions.

The logs show:

[10/Apr/2018 12:52:17] readthedocs.oauth.services.gitlab:347[30538]: DEBUG GitLab webhook update failure response: {'message': '404 Not found'}

This is happening because we are trying to update a webhook in GitLab that it was manually removed by the user. So, we need to handle this case here and re-create the webhook if it fails when trying to update.

NOTE: you need ngrok setup to test this in your local instance

Related: #3587 #2561

@humitos humitos added the Bug A bug label Apr 10, 2018
@humitos humitos added this to the Admin UX milestone Apr 10, 2018
@humitos
Copy link
Member Author

humitos commented Apr 10, 2018

The same happen in GitHub:

[10/Apr/2018 13:04:30] readthedocs.oauth.services.github:281[30538]: DEBUG GitHub webhook creation failure response: {'message': 'Not Found', 'documentation_url': 'https://developer.github.com/v3/repos/hooks/#edit-a-hook'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

No branches or pull requests

1 participant