-
Notifications
You must be signed in to change notification settings - Fork 6
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
feature: support ACK/NACK/REQUEUE #127
Conversation
Signed-off-by: Valery Piashchynski <[email protected]>
WalkthroughThe changes introduce error handling improvements and an experimental feature flag in a Golang project. Key updates include adding job requeue functionality with preserved message order, introducing compile-time configuration checks, and applying necessary GitHub workflow updates. Changes
Sequence DiagramssequenceDiagram
participant User
participant Plugin
participant Configurer
participant Handler
User->>Plugin: Init()
Plugin->>Configurer: cfg.Experimental()
Configurer-->>Plugin: true/false
Plugin->>Plugin: Set experimental field
User->>Handler: Handle(Job)
Handler->>Handler: Process job
alt Job needs requeue
Handler->>Plugin: requeue()
end
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
go.work.sum
is excluded by!**/*.sum
Files selected for processing (2)
- protocol/error.go (2 hunks)
- protocol/handler.go (2 hunks)
Files not reviewed due to errors (1)
- protocol/error.go (no review received)
Additional comments not posted (2)
protocol/handler.go (2)
19-21
: The addition of ACK, NACK, and REQUEUE to theType
enum is correctly implemented using the iota pattern.
82-99
: The updatedHandle
method correctly implements handling for the new ACK, NACK, and REQUEUE types, with appropriate error handling and logging.
Signed-off-by: Valery Piashchynski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- apis.go (1 hunks)
- listener.go (1 hunks)
- plugin.go (2 hunks)
Additional comments not posted (1)
apis.go (1)
43-44
: The addition of theExperimental()
method to theConfigurer
interface is appropriate for enabling dynamic checks of experimental features.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Valery Piashchynski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- listener.go (1 hunks)
Additional context used
golangci-lint
listener.go
166-166: expected operand, found 'if' (typecheck)
GitHub Check: Golang-CI (lint)
listener.go
[failure] 166-166:
syntax error: unexpected if, expected expression (typecheck)
[failure] 166-166:
expected operand, found 'if' (typecheck)
Signed-off-by: Valery Piashchynski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- .github/workflows/linters.yml (1 hunks)
- .github/workflows/linux.yml (2 hunks)
- listener.go (1 hunks)
Files skipped from review due to trivial changes (2)
- .github/workflows/linters.yml
- .github/workflows/linux.yml
Files skipped from review as they are similar to previous changes (1)
- listener.go
Reason for This PR
closes: roadrunner-server/roadrunner#1941
ref: roadrunner-server/roadrunner#1941 (comment)
CC: @shieldz80, @msmakouz
Description of Changes
ACK
(2),NACK
(3),REQUEUE
(4).License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.
PR Checklist
[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]
git commit -s
).CHANGELOG.md
.Summary by CodeRabbit
Configurer
interface with anExperimental()
method.experimental
flag.golangci/golangci-lint-action
in GitHub Actions to v6.0.1.