Skip to content

Conversation

mmarshallgh
Copy link
Contributor

Python 3.x doesn't support str.decode() causing code to fail with AttributeError exception. This code change allows the python module to continue to work with older 2.x python while being 3.x friendly as well. Any alternate suggestions?

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Copy link
Contributor

@fxdgear fxdgear left a comment

Choose a reason for hiding this comment

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

Can you put the try inside the if statement?

if body: try: body = body.decode('utf-8', 'ignore') except AttributeError: pass

This way we avoid the try statement if no body.

Thanks for the patch

@fxdgear
Copy link
Contributor

fxdgear commented Nov 28, 2018

Also could you please sign the CLA? I can't merge until that's signed.

Thanks

@mmarshallgh
Copy link
Contributor Author

Moving the change inside the if statement sounds good. Also, I signed the CLA.

Thank You,
Mike

@mmarshallgh
Copy link
Contributor Author

I will push the requested change in the morning.

Mike

@mmarshallgh
Copy link
Contributor Author

Change has been pushed

@fxdgear
Copy link
Contributor

fxdgear commented Nov 29, 2018

jenkins test this please

@fxdgear
Copy link
Contributor

fxdgear commented Nov 29, 2018

@mmarshallgh when you signed the CLA did you sign it using an email address associated to your GH account? The CLA check is still failing.

@mmarshallgh
Copy link
Contributor Author

@fxdgear I have now signed it using the private github issued email. That didn't work, so i uncheck "keep email address private" and signed it again. Please check to see if it took.

Thank You,
Mike

@fxdgear
Copy link
Contributor

fxdgear commented Nov 29, 2018

@mmarshallgh still not showing up. I'll look into the CLA checker in a bit, have to run some errands now.

But if you look at the "PR status" at the bottom of this page where it shows the "Clients-ci" green check box and the build has finished. You'll see a red x where the CLA check is.

Maybe something is going on with the CLA checker and I'll investigate.

@mmarshallgh
Copy link
Contributor Author

Where do we stand on troubleshooting the CLA? I have multiple signed copies in my email box matching the email used on the github account.

@fxdgear
Copy link
Contributor

fxdgear commented Dec 3, 2018

@mmarshallgh I'm not sure how this is not working, but I don't see any signatures related to your GH username. If you want I can look up by email? see what email addresses you've signed with?

when you signed the form did you add your GH username as well?

Image of signature

@mmarshallgh
Copy link
Contributor Author

please lookup michael_marshall@neimanmarcus.com

Thank you,

Mike

@fxdgear
Copy link
Contributor

fxdgear commented Dec 5, 2018

@mmarshallgh ahh hah I found you.

the problem is the GH username in our system is @marshallgh

Could you please re-sign using the correct GH name mmarshallgh . I don't feel that it would be legal for me to make a change.

screenshot

@mmarshallgh
Copy link
Contributor Author

ok, i signed it again.
image

@karmi
Copy link

karmi commented Dec 6, 2018

Hello Michael, sorry for the troubles with the CLA. The reason why the CLA checker doesn't want to approve the commits seems to be an incorrect e-mail address used in the Git commit — have a look at the raw patch, it has nemianmarcus.com.

To fix the commit, just set your email address for Git, and then update the commit:

git commit --amend --reset-author --verbose 

and force push the branch here so it's getting processed.

@fxdgear
Copy link
Contributor

fxdgear commented Dec 6, 2018

@mmarshallgh

I just spoke to the author of the CLA checker and he said that the email that you use for your git email does not match what you signed the CLA with.

If you look at the patch being applied to the repo, you can see that your email is: michael_marshall@nemianmarcus.com

From: nmmlm404 <michael_marshall@nemianmarcus.com> Date: Wed, 28 Nov 2018 15:25:21 -0600 Subject: [PATCH 1/2] fix python 3.x str.decode exception --- elasticsearch/connection/base.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 

But when you signed the CLA your email is michael_marshall@neimanmarcus.com

There is a transposition of the i.

If your email truly is michael_marshall@neimanmarcus.com then you'll need to ammend your commit, for how to do that please see: https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit

ALSO I would recommend updating your git config to have the correct email address to avoid situations like this in the future.

@ghost
Copy link

ghost commented Dec 6, 2018

Hi @mmarshallgh, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in yout Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile?

@mmarshallgh
Copy link
Contributor Author

What is the next step to get the change merged?

@fxdgear fxdgear merged commit 6cdf258 into elastic:master Dec 10, 2018
@fxdgear
Copy link
Contributor

fxdgear commented Dec 10, 2018

all done! :)

Thanks for your patience and the patch!

@mmarshallgh mmarshallgh deleted the fixbasedecode branch December 12, 2018 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants