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

feat: add request/reply support #551

Merged
merged 29 commits into from
Nov 21, 2023

Conversation

KhudaDad414
Copy link
Member

@KhudaDad414 KhudaDad414 commented Oct 25, 2023

resolves #550
resolves #544

checklist:

  • implement request/reply.
  • add channel parameter parsing from payload/headers/asyncapi
  • Resolve the double message processing problem.

@KhudaDad414 KhudaDad414 marked this pull request as ready for review November 8, 2023 16:28
@KhudaDad414
Copy link
Member Author

@fmvilas @Souvikns a review would be appreciated.

src/adapters/http/client.ts Outdated Show resolved Hide resolved
src/adapters/ws/client.ts Outdated Show resolved Hide resolved
src/lib/adapter.ts Outdated Show resolved Hide resolved
src/lib/functions.ts Show resolved Hide resolved
src/lib/functions.ts Show resolved Hide resolved
src/lib/functions.ts Show resolved Hide resolved
src/lib/message.ts Outdated Show resolved Hide resolved
@KhudaDad414 KhudaDad414 requested a review from fmvilas November 15, 2023 11:20
@KhudaDad414 KhudaDad414 mentioned this pull request Nov 15, 2023
4 tasks
SlackEventStream:
servers:
- $ref: "#/servers/Slack_WebSocket"
address: /link/?ticket={ticket}&app_id={app_id}
Copy link
Member

Choose a reason for hiding this comment

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

just remember that these should go through websocket binding query field - but of course if that is not supported, parameters are good temporary solution, although in future address should be validated by parser, if not yet

Copy link
Member Author

Choose a reason for hiding this comment

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

Will update it to use the bindings.

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +85 to +87
reply:
channel:
$ref: "#/channels/SlackEventStream"
Copy link
Member

Choose a reason for hiding this comment

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

this feels weird, as your app is reaction listener, and I bet slack websocket server that you listen to do not expect any reply from the app that you're creating. So you receive stream and that is it

Copy link
Member Author

Choose a reason for hiding this comment

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

It actually needs a reply. if slack doesn't receive a confirmation it will resend the message multiple times.
https://api.slack.com/apis/connections/socket#acknowledge

src/lib/functions.ts Outdated Show resolved Hide resolved
src/lib/functions.ts Outdated Show resolved Hide resolved
src/lib/functions.ts Show resolved Hide resolved
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6930343277

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 46 of 53 (86.79%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+3.3%) to 69.477%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/adapter.ts 1 2 50.0%
src/lib/message.ts 4 7 57.14%
src/lib/util.ts 41 44 93.18%
Files with Coverage Reduction New Missed Lines %
src/lib/message.ts 1 82.76%
Totals Coverage Status
Change from base Build 6930079658: 3.3%
Covered Lines: 370
Relevant Lines: 474

💛 - Coveralls

Copy link

sonarcloud bot commented Nov 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@KhudaDad414
Copy link
Member Author

KhudaDad414 commented Nov 20, 2023

@fmvilas @Souvikns @derberg this PR is ready for review.

Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@KhudaDad414
Copy link
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 8f226b8 into asyncapi:master Nov 21, 2023
12 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.30.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Add request/reply support support address parameters in channels
6 participants