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
docs(coding-guidelines): Add request response correlation #3290
docs(coding-guidelines): Add request response correlation #3290
Changes from 4 commits
3055002
a951fbd
694a09c
a7be506
12e61b6
3ba6ea3
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.
Compared to the
Command
below the ID here is not user generated but instead handed out to the user. When would it be recommended to use user-generated IDs and when should they be handed out?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.
I don't have a good rule here, nor an opinion. Thus far I was simply deciding case-by-case.
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.
Would it make sense to remove this and be consistent with commands where the caller always specifies the ID? Only
Transport::dial
currently behaves like stated here and we already said we wanted to fix this! :)I'd be in favor of removing this from the guidelines (or rather, say that we want to accept the ID) and opening an issue to fix
Transport::dial
.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.
I have to give this more thought. In other words, I am not sure this is the way to go in all situations.
Do you feel strongly about removing this @thomaseizinger? I would prefer proceeding here. I see this pull request as a net-positive at this point.
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.
I think it makes sense for anything that is public API in our library. Internally, where we control all usages of an ID, it doesn't matter as much.
The reason for that is that the majority of our public API is command-based. Anything command-based needs to create the ID ahead of time. Any component underneath that creates its own IDs causes friction here because it doesn't compose well with commands.
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.
I am a bit torn. There is certainly value in documenting this but if we document something, I'd prefer if we can back the written words 100%, e.g. have strong convictions that this is the way to go. Everything else is just confusing to the reader.
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.
Would removing this section be a middle ground? i.e. only document that commands should come with a user-generated ID and not talk about functions at all?
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.
Done with 12e61b6.