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

Add Feishu Webhook Binding #872

Closed
wants to merge 6 commits into from
Closed

Add Feishu Webhook Binding #872

wants to merge 6 commits into from

Conversation

ipfans
Copy link

@ipfans ipfans commented May 15, 2021

Description

A binding that allows reading / writing from Feishu webhook. Feishu is a team collaborate toolkit developed by ByteDance.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #871

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

@microsoft-cla-retired
Copy link

microsoft-cla-retired bot commented May 15, 2021

CLA assistant check
All CLA requirements met.

@pkedy pkedy self-assigned this May 18, 2021
if loaded {
return fmt.Errorf("feishu webhook error: duplicate id %s", t.settings.ID)
}
webhooks.m[t.settings.ID] = &outgoingWebhook{handler: handler}
Copy link
Member

@pkedy pkedy May 27, 2021

Choose a reason for hiding this comment

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

It looks like Read (Input Binding method) must be called for a webhook to be created so that Invoke with GetOperation (Output Binding method) can be called to retrieve a message . I don't think input bindings and output bindings are supposed to share state like this. Is there a reason why you set it up this way? Maybe we can recommend a different approach that fits into the model.

/cc: @artursouza @mukundansundar Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Any reason why this cannot go to Init()?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this was borrowed from the DingTalk component and the same questions apply to that component.
https://github.com/dapr/components-contrib/blob/master/bindings/alicloud/dingtalk/webhook/webhook.go#L88-L101

Copy link
Author

Choose a reason for hiding this comment

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

@pkedy @artursouza yes, it copied from DingTalk component, I will update this later

Copy link
Member

Choose a reason for hiding this comment

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

@ipfans can you please update?

Copy link
Author

Choose a reason for hiding this comment

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

@yaron2 @pkedy Sorry, I had almost forgot it.Here is the determination if there are duplicate Webhook ID, is there any alternative solution to achieve a similar goal?

@yaron2 yaron2 requested review from a team as code owners July 14, 2021 16:08
@yaron2
Copy link
Member

yaron2 commented Jul 14, 2021

ping @ipfans

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 8, 2021

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@dapr-bot dapr-bot added the stale label Sep 8, 2021
@dapr-bot
Copy link
Collaborator

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@dapr-bot dapr-bot closed this Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Feishu Webhook Binding
5 participants