Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: bulksubscribe http #478
base: main
Are you sure you want to change the base?
feat: bulksubscribe http #478
Changes from 7 commits
3f5bcd8
1c45f4e
2193f47
5d4e498
f19a505
fdd425a
cb26d03
597c099
10d2c67
e218130
5131387
81b72ef
203d31c
068ef1c
36b78f5
38bc154
35c37bc
fb4138a
0b41a28
d05856f
92e7eef
f315c9e
0f2d9bb
f4a3b65
3577081
5e1f64d
de720d9
05f3ad7
300e5ac
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit: break this comment up so it doesn't wrap/exceed a reasonable character count (~140ish)
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.
As my previous review - the validation of arguments passed to these parameters should be implemented as per the implementation spec. I do think that this is something we need to address both sdk-side and in the runtime explicitly as part of best practice.
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.
what default values you suggest if nil values are given?
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.
Error-out if either are
X <= 0
this would prevent a negative value, a nil value is not possible for the int type.Check warning on line 43 in service/grpc/topic.go
Codecov / codecov/patch
service/grpc/topic.go#L40-L43
Check warning on line 45 in service/grpc/topic.go
Codecov / codecov/patch
service/grpc/topic.go#L45
Check warning on line 93 in service/grpc/topic.go
Codecov / codecov/patch
service/grpc/topic.go#L89-L93
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.
Please reuse the type provided
go-sdk/service/common/type.go
Lines 106 to 113 in de720d9
Check failure on line 130 in service/http/topic.go
GitHub Actions / Test on 1.19
Check failure on line 130 in service/http/topic.go
GitHub Actions / Test on 1.20
Check failure on line 130 in service/http/topic.go
GitHub Actions / Test on 1.21
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.
A string value type should be fine
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.
Likewise with the grpc implementation I would like to see validation of the
maxMessagesCount
andmaxAwaitDurationMs
paramsThere 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.
This exported function should have a comment quickly outlining the use
Check warning on line 331 in service/http/topic.go
Codecov / codecov/patch
service/http/topic.go#L328-L331
Check warning on line 339 in service/http/topic.go
Codecov / codecov/patch
service/http/topic.go#L334-L339
Check warning on line 353 in service/http/topic.go
Codecov / codecov/patch
service/http/topic.go#L341-L353
Check warning on line 358 in service/http/topic.go
Codecov / codecov/patch
service/http/topic.go#L355-L358
Check warning on line 365 in service/http/topic.go
Codecov / codecov/patch
service/http/topic.go#L361-L365
Check failure on line 370 in service/http/topic.go
GitHub Actions / Test on 1.19
Check failure on line 370 in service/http/topic.go
GitHub Actions / Test on 1.20
Check failure on line 370 in service/http/topic.go
GitHub Actions / Test on 1.21
Check failure on line 377 in service/http/topic.go
GitHub Actions / Test on 1.19
Check failure on line 377 in service/http/topic.go
GitHub Actions / Test on 1.20
Check failure on line 377 in service/http/topic.go
GitHub Actions / Test on 1.21
Check warning on line 422 in service/http/topic.go
Codecov / codecov/patch
service/http/topic.go#L367-L422
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.
There is no unhandled error at this point, could you clarify that if a single event is dropped it will be replayed/retried at a later date?
Check warning on line 435 in service/http/topic.go
Codecov / codecov/patch
service/http/topic.go#L425-L435
Check warning on line 438 in service/http/topic.go
Codecov / codecov/patch
service/http/topic.go#L438
Check warning on line 451 in service/http/topic.go
Codecov / codecov/patch
service/http/topic.go#L448-L451
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.
It's fine to create a new function as it is manifestly different or is idiomatic, do you think this is better or would it be better to pass the slice to your function as an argument and wrap it within the function?
Check failure on line 17 in service/internal/topicregistrar.go
GitHub Actions / Test on 1.19
Check failure on line 17 in service/internal/topicregistrar.go
GitHub Actions / Test on 1.20
Check failure on line 17 in service/internal/topicregistrar.go
GitHub Actions / Test on 1.21
Check warning on line 75 in service/internal/topicregistrar.go
Codecov / codecov/patch
service/internal/topicregistrar.go#L66-L75
Check warning on line 82 in service/internal/topicregistrar.go
Codecov / codecov/patch
service/internal/topicregistrar.go#L77-L82
Check warning on line 93 in service/internal/topicregistrar.go
Codecov / codecov/patch
service/internal/topicregistrar.go#L84-L93
Check warning on line 104 in service/internal/topicregistrar.go
Codecov / codecov/patch
service/internal/topicregistrar.go#L95-L104
Check warning on line 106 in service/internal/topicregistrar.go
Codecov / codecov/patch
service/internal/topicregistrar.go#L106
Check warning on line 111 in service/internal/topicregistrar.go
Codecov / codecov/patch
service/internal/topicregistrar.go#L109-L111
Check failure on line 32 in service/internal/topicsubscription.go
GitHub Actions / Test on 1.19
Check failure on line 32 in service/internal/topicsubscription.go
GitHub Actions / Test on 1.20
Check failure on line 32 in service/internal/topicsubscription.go
GitHub Actions / Test on 1.21
Check failure on line 40 in service/internal/topicsubscription.go
GitHub Actions / Test on 1.19
Check failure on line 40 in service/internal/topicsubscription.go
GitHub Actions / Test on 1.20
Check failure on line 40 in service/internal/topicsubscription.go
GitHub Actions / Test on 1.21
Check failure on line 41 in service/internal/topicsubscription.go
GitHub Actions / Test on 1.19
Check failure on line 41 in service/internal/topicsubscription.go
GitHub Actions / Test on 1.20
Check failure on line 41 in service/internal/topicsubscription.go
GitHub Actions / Test on 1.21
Check warning on line 98 in service/internal/topicsubscription.go
Codecov / codecov/patch
service/internal/topicsubscription.go#L88-L98