-
Notifications
You must be signed in to change notification settings - Fork 27
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
🐛 fixes unhandled exception when parsing an invalid string #2608
Merged
pcrespov
merged 3 commits into
ITISFoundation:master
from
pcrespov:bug/str-to-datetime-exception
Oct 28, 2021
Merged
🐛 fixes unhandled exception when parsing an invalid string #2608
pcrespov
merged 3 commits into
ITISFoundation:master
from
pcrespov:bug/str-to-datetime-exception
Oct 28, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #2608 +/- ##
======================================
Coverage 76.9% 77.0%
======================================
Files 630 631 +1
Lines 24741 24752 +11
Branches 2430 2430
======================================
+ Hits 19043 19071 +28
+ Misses 5050 5039 -11
+ Partials 648 642 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
pcrespov
changed the title
WIP: 🐛 fixes unhandled exception when parsing invalid string string
WIP: 🐛 fixes unhandled exception when parsing an invalid string
Oct 28, 2021
pcrespov
force-pushed
the
bug/str-to-datetime-exception
branch
from
October 28, 2021 08:40
4339453
to
5e0ed07
Compare
pcrespov
changed the title
WIP: 🐛 fixes unhandled exception when parsing an invalid string
🐛 fixes unhandled exception when parsing an invalid string
Oct 28, 2021
pcrespov
added
a:director
issue related with the director service
bug
buggy, it does not work as expected
labels
Oct 28, 2021
odeimaiz
approved these changes
Oct 28, 2021
sanderegg
approved these changes
Oct 28, 2021
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
What do these changes do?
An unhandled exception is causing the
director
service to respond with 500 every time is requested to list running services services.The exception displayed
ValueError: unconverted data remains: Z
and was raised while parsing an invalid string into adatetime
.A new utils with a more robust
parse_as_datetime
routine was implemented. In case of an invalid string, the function will return a default provided in the arguments.Related issue/s
None.
How to test
NOTE: needs python 3.6 in place (e.g. use
pyenv local
)NOTE: avoid using
make install-dev
, since it was not adapted properly since this service will be soon removedmake devenv cd services/director pip install -e . pytest tests/unit/test_utils.py