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

returning the error when doing a nack in the message #968

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

cpanato
Copy link
Contributor

@cpanato cpanato commented Oct 24, 2023

Fixes: #831

other protocol return the error, doing similar thing here as well

@cpanato
Copy link
Contributor Author

cpanato commented Oct 24, 2023

/assign @duglin

@duglin
Copy link
Contributor

duglin commented Oct 24, 2023

Seems reasonable. Is there a test we can add for this?

@duglin
Copy link
Contributor

duglin commented Oct 24, 2023

rebase is needed

@cpanato
Copy link
Contributor Author

cpanato commented Oct 26, 2023

done @duglin, thanks for the review, PTAL

@duglin
Copy link
Contributor

duglin commented Oct 26, 2023

Is it possible to test that the error makes its way back to the logger?

@cpanato
Copy link
Contributor Author

cpanato commented Oct 26, 2023

Is it possible to test that the error makes its way back to the logger?
did some manual test and saw that showing up in the logs.

but not sure how to do that here in the tests, do you have a tests that setup the pubsub? sorry for asking that, i am too new to this codebase

@duglin
Copy link
Contributor

duglin commented Oct 26, 2023

I looked around and I didn't see a good example of us testing that yet so perhaps I'm asking too much.
Unless @embano1 can think of an easy way to test it, this
/LGTM

duglin
duglin previously approved these changes Oct 26, 2023
@embano1
Copy link
Member

embano1 commented Oct 27, 2023

Is it possible to test that the error makes its way back to the logger?

Are you asking for the caller here, i.e., integration tests?

@duglin
Copy link
Contributor

duglin commented Oct 27, 2023

Is it possible to test that the error makes its way back to the logger?

Are you asking for the caller here, i.e., integration tests?

Yea, I guess an integration test since the testcase added (while valid) is kind of silly/trivial since it's basically just testing one if-statement, and the real point of this PR was to ensure that the error bubbled up to the proper spot (like the logger). So, in essence not just test the if-statement but also the Finish() logic in conjunction with our logging system. But if we don't have an existing test that can be easily hooked-into I'm not sure it's fair to ask @cpanato to add one just for this trivial PR.

@cpanato
Copy link
Contributor Author

cpanato commented Oct 27, 2023

maybe we can open an issue for that, I think that will require some more complex things to setup

@duglin
Copy link
Contributor

duglin commented Oct 29, 2023

maybe we can open an issue for that, I think that will require some more complex things to setup

Done: #979

I'm still ok with this PR. @embano1 for the final review/merge.

Copy link
Member

@embano1 embano1 left a comment

Choose a reason for hiding this comment

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

LGTM

@embano1 embano1 merged commit 0836a52 into cloudevents:main Oct 30, 2023
9 checks passed
@cpanato cpanato deleted the GH-831 branch October 30, 2023 08:02
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.

No logs when nacking PubSub msgs
3 participants