-
Notifications
You must be signed in to change notification settings - Fork 184
fixing flipped sign in expiry time padding #55
Conversation
also FYI this stems from a discussion in: |
anyone have any idea what's wrong with my py2.7 pep8? it doesn't say what the actual failure is. |
cc @mbohlool who seems to be the one who worked on the expiry time logic |
@flylo I reran the CI, and it is still failing https://travis-ci.org/kubernetes-client/python-base/jobs/361191252 in particular, i see the following error message. |
@yliaog still won't pass and all I can see are a bunch of user warnings to use pycodestyle instead of pep8. what exactly does this mean? |
I'm not quite sure, I can take a look tomorrow. https://github.com/kubernetes-client/python/blame/master/scripts/update-pep8.sh#L80 shows @dims added it in kubernetes-client/python@5c82309 |
Codecov Report
@@ Coverage Diff @@
## master #55 +/- ##
==========================================
+ Coverage 93.29% 93.36% +0.07%
==========================================
Files 11 11
Lines 939 949 +10
==========================================
+ Hits 876 886 +10
Misses 63 63
Continue to review full report at Codecov.
|
Figured out that the diff is between the PR files and the pep8 auto-formatted files. There should probably be some log messages in that script as it wasn't clear to me what that was doing until I went back to the PR where it was merged. |
Yes, thanks for fixing it. |
We ran into a bug where any job that runs long enough for the API token to expire will fail with a
401 Unauthorized ApiException
. We found that this was due to a flipped sign in the padding added to the expiry. I've updated the_is_expired
method to returnTrue
if the token expires in 5 minutes, as opposed to the current logic which returnsTrue
if the token expired 5 minutes ago. I've also added an extra assertion to ensure that the_load_gcp_token
method actually updates the expiry timestamp.Please let me know if you have any questions or comments!