Skip to content

abci: Port EventAttribute field type change to main#9335

Merged
thanethomson merged 6 commits intomainfrom
thane/6403-event-types
Aug 30, 2022
Merged

abci: Port EventAttribute field type change to main#9335
thanethomson merged 6 commits intomainfrom
thane/6403-event-types

Conversation

@thanethomson
Copy link
Contributor

Closes #6403.

This PR is a port of #6408 to main for release in v0.37.


PR checklist

  • Tests written/updated, or no tests needed
  • CHANGELOG_PENDING.md updated, or no changelog entry needed
  • Updated relevant documentation (docs/) and code comments, or no
    documentation updates needed

alexanderbez and others added 5 commits August 30, 2022 12:22
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson requested a review from ebuchman as a code owner August 30, 2022 12:50
@thanethomson thanethomson requested a review from a team August 30, 2022 12:50
Signed-off-by: Thane Thomson <connect@thanethomson.com>
select {
case <-ctx.Done():
break
break EQ_LOOP
Copy link
Contributor

@sergio-mena sergio-mena Aug 30, 2022

Choose a reason for hiding this comment

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

Are we sure that, if the context passed as parameter to the function is "done", we just want to break out of the loop? (but still execute the one at the end: REMOVE_LOOP)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given the comment above the select statement I assumed that this is what was originally meant. Without specifying the for loop label, the existing code just breaks out of the select statement, which means we may as well just ignore the context altogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only alternative I can think of is to return from the function with an error.

What would trigger the termination of the context outside of the tests?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I got the intention of you changes, and they are definitely improving the logic.
It's just that, if the context is "done", don't we just want to return immediately? (if we're unsure, let's just leave it as you have it)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think this is something we need to clean up. I doubt it's catastrophic if we don't, but it is a bit messy right now.

Copy link
Contributor

@sergio-mena sergio-mena left a comment

Choose a reason for hiding this comment

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

Managing contexts in this part of the code, anyway, needs much more work, I don't think it should block this PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Events get mangled when non-utf8 value in Value

3 participants