Skip to content

docs: enable Slack notifications #14830

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 4 commits into from
Sep 27, 2024
Merged

docs: enable Slack notifications #14830

merged 4 commits into from
Sep 27, 2024

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Sep 26, 2024

Fixes: #14740
Preview: link

This PR adds a subpage to Coder docs with a guide on integrating Coder with MS Teams notifications.

Screenshot 2024-09-26 at 14 51 34

@mtojek mtojek self-assigned this Sep 26, 2024
@mtojek mtojek changed the title docs: enable Slack Notifications docs: enable Slack notifications Sep 26, 2024
@mtojek mtojek marked this pull request as ready for review September 26, 2024 14:34
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

Overall looks great!

I think @EdwardAngert should have a look as well, if possible.
Thanks for putting this together!

receiver.router.post("/webhook", async (req, res) => {
try {
if (!req.body) {
return res.status(400).send("Error: request body is missing");
Copy link
Contributor

Choose a reason for hiding this comment

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

If we fail the webhook receiver, the webhook will be retried.
In this case, I think we should just log but let the receiver return successfully.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, but I'd like to keep the logic short. TBH I wanted to remove the HTTP request entity validation at all to indicate the communication flow with Slack API.

Also, this is rather a prevention mechanism for potential internet crawlers or scanners trying to send crappy requests.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can still demonstrate the correct behaviour, but it's not a big deal.

Also, this is rather a prevention mechanism for potential internet crawlers or scanners trying to send crappy requests.

By that logic, shouldn't the requests succeed so the crawlers don't know their request was invalid?

Copy link
Member Author

Choose a reason for hiding this comment

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

By that logic, shouldn't the requests succeed so the crawlers don't know their request was invalid?

That's a long story; frankly, it depends on the crawler implementation, and HTTP200 may encourage them to perform further scans :)

I'll defer to platform admins to take a decision on this 👍 .

@mtojek mtojek requested a review from dannykopping September 27, 2024 07:51
receiver.router.post("/webhook", async (req, res) => {
try {
if (!req.body) {
return res.status(400).send("Error: request body is missing");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can still demonstrate the correct behaviour, but it's not a big deal.

Also, this is rather a prevention mechanism for potential internet crawlers or scanners trying to send crappy requests.

By that logic, shouldn't the requests succeed so the crawlers don't know their request was invalid?

@mtojek mtojek merged commit a3ffab6 into main Sep 27, 2024
24 checks passed
@mtojek mtojek deleted the 14740-slack branch September 27, 2024 08:08
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notifications: Native slack target
2 participants