Skip to content

Split up deprecated view notification to GitHub and other webhook endpoints #5083

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

Conversation

agjohnson
Copy link
Contributor

This sets a date for deprecated of these endpoints as Mar 1st 2019. Is this too soon?

  • Reduce complexity and drop decorator pattern for Notification classmethod pattern used in other notifications
  • Add notifications for non-GitHub incoming webhooks
  • Add docs as well

* Drop "deprecated webhook endpoint" copy, this is core team nomenclature, not user
nomenclature.
* Add small amount of docs to point to
…/readthedocs.org into humitos/builds/notify-old-endpoints
…points

This sets a date for deprecated of these endpoints as Mar 1st 2019. Too
soon?

* Reduce complexity and drop decorator pattern for Notification
  classmethod pattern used in other notifications
* Add notifications for non-GitHub incoming webhooks
* Add docs as well
@todo
Copy link

todo bot commented Jan 9, 2019

remove _build_url call and replace with a 4xx response after

https://github.com/rtfd/readthedocs.org/blob/f4663075204ba6d71838bc97da75770665746dfb/readthedocs/core/views/hooks.py#L228-L233


This comment was generated by todo based on a TODO comment in f466307 in #5083. cc @rtfd.

@todo
Copy link

todo bot commented Jan 9, 2019

remove _build_url call and replace with a 4xx response after

https://github.com/rtfd/readthedocs.org/blob/f4663075204ba6d71838bc97da75770665746dfb/readthedocs/core/views/hooks.py#L267-L272


This comment was generated by todo based on a TODO comment in f466307 in #5083. cc @rtfd.

@todo
Copy link

todo bot commented Jan 9, 2019

remove _build_url call and replace with a 4xx response after

https://github.com/rtfd/readthedocs.org/blob/f4663075204ba6d71838bc97da75770665746dfb/readthedocs/core/views/hooks.py#L338-L343


This comment was generated by todo based on a TODO comment in f466307 in #5083. cc @rtfd.

@todo
Copy link

todo bot commented Jan 9, 2019

remove _build_url call and replace with a 4xx response after

https://github.com/rtfd/readthedocs.org/blob/f4663075204ba6d71838bc97da75770665746dfb/readthedocs/core/views/hooks.py#L390-L395


This comment was generated by todo based on a TODO comment in f466307 in #5083. cc @rtfd.

@agjohnson agjohnson requested a review from a team January 9, 2019 17:24
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like these changes and the idea of making a "generic" notification that we will be able to use for other things also.

I noted some things to be consider.

Regarding the time window, what does it cost us to give one more month? Until April, for example?


.. _webhook-deprecated-endpoints:

I was warned that my project won't automatically build after Mar 1st
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the full month name and year here: March, 2019

@agjohnson
Copy link
Contributor Author

Yeah, i was considering longer, 3 months seems reasonable

Found out 2x messages are being generated, so this stops the automated
mechanism for triggering these messages.
@@ -225,9 +221,6 @@ def github_build(request): # noqa: D205
branches
)
projects = repo_projects | ssh_projects
# TODO remove _build_url call and replace with a 4xx response after
# Jan 31st.
DeprecatedGitHubWebhookNotification.for_project_users(projects)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we remove this from here, how is the idea to notify these users?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually for now, we need this out soon. We can probably just keep this easy and ditch automating, and just do 2 or 3 scheduled emails instead.

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are close.

We were discussing about "Why the notification was shown as a Site Notification" and I think it's because we are not marking it as read=True as was my original idea (IIRC).

Also, by removing the notification from the webhook, we not warning users at all. So, I think that will notify them manually with a different script.

@agjohnson
Copy link
Contributor Author

Already discussed in slack, but the message automation was creating more than one notification, as we were adding a site notification object to track the email notification. Manual notification is not ideal, but I feel like the addition Message instances for email notifications is creating some debt around on site messages we should avoid.

If we think that we want to deduplicate email messages in the same way we deduplicate site messages, perhaps we can look into adding our own message storage and message storage db tables. I view this as low priority work however.

@agjohnson agjohnson merged commit 2e243c4 into humitos/builds/notify-old-endpoints Jan 10, 2019
@delete-merged-branch delete-merged-branch bot deleted the agj/more-webhook-notifications branch January 10, 2019 21:25
agjohnson pushed a commit that referenced this pull request Jan 11, 2019
* Notify users about the usage of deprecated webhooks

Each time a deprecated webhook is hit, a notification is
created (without duplicating it) to be sent.

* Extend notification to support de-dup and delayed email sent

* Improve decorator to support generic and specific VCS webhook views

* Remove no necessary settings

* DeprecatedWebhookEndpointNotification tests and improvements

* Better docstring

* Lint

* Update copy on notifications for github services deprecation (#5067)

* Updated copy on webhooks

* Drop "deprecated webhook endpoint" copy, this is core team nomenclature, not user
nomenclature.
* Add small amount of docs to point to

* Update docs and point to docs in notification message

* Add year

* Split up deprecated view notification to GitHub and other webhook endpoints (#5083)

* Updated copy on webhooks

* Drop "deprecated webhook endpoint" copy, this is core team nomenclature, not user
nomenclature.
* Add small amount of docs to point to

* Update docs and point to docs in notification message

* Split up deprecated view notification to GitHub and other webhook endpoints

This sets a date for deprecated of these endpoints as Mar 1st 2019. Too
soon?

* Reduce complexity and drop decorator pattern for Notification
  classmethod pattern used in other notifications
* Add notifications for non-GitHub incoming webhooks
* Add docs as well

* More renaming and slight refactor

Found out 2x messages are being generated, so this stops the automated
mechanism for triggering these messages.

* Update dates

* Also update docs

* Typo on date

* Back out some more of the changes to notifications to make them operable without automation

* Add admin method for notification

* Add admin filter for project features
agjohnson pushed a commit that referenced this pull request Jan 11, 2019
* Notify users about the usage of deprecated webhooks

Each time a deprecated webhook is hit, a notification is
created (without duplicating it) to be sent.

* Extend notification to support de-dup and delayed email sent

* Improve decorator to support generic and specific VCS webhook views

* Remove no necessary settings

* DeprecatedWebhookEndpointNotification tests and improvements

* Better docstring

* Lint

* Update copy on notifications for github services deprecation (#5067)

* Updated copy on webhooks

* Drop "deprecated webhook endpoint" copy, this is core team nomenclature, not user
nomenclature.
* Add small amount of docs to point to

* Update docs and point to docs in notification message

* Add year

* Split up deprecated view notification to GitHub and other webhook endpoints (#5083)

* Updated copy on webhooks

* Drop "deprecated webhook endpoint" copy, this is core team nomenclature, not user
nomenclature.
* Add small amount of docs to point to

* Update docs and point to docs in notification message

* Split up deprecated view notification to GitHub and other webhook endpoints

This sets a date for deprecated of these endpoints as Mar 1st 2019. Too
soon?

* Reduce complexity and drop decorator pattern for Notification
  classmethod pattern used in other notifications
* Add notifications for non-GitHub incoming webhooks
* Add docs as well

* More renaming and slight refactor

Found out 2x messages are being generated, so this stops the automated
mechanism for triggering these messages.

* Update dates

* Also update docs

* Typo on date

* Back out some more of the changes to notifications to make them operable without automation

* Add admin method for notification

* Add admin filter for project features
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.

2 participants