surahman commented on a change in pull request #3786:
URL: https://github.com/apache/incubator-heron/pull/3786#discussion_r836907557
##########
File path: heron/tools/tracker/src/python/routers/container.py
##########
@@ -143,8 +142,8 @@ class ExceptionLog(BaseModel):
hostname: str
instance_id: str
stack_trace: str = Field(..., alias="stacktrace")
- last_time: int = Field(..., alias="lasttime")
- first_time: int = Field(..., alias="firsttime")
+ last_time: str = Field(..., alias="lasttime")
+ first_time: str = Field(..., alias="firsttime")
Review comment:
We need to be careful with this. One of the many oddities and quirks of
Python is that assigning values of different types to a variable will convert
the type of the variable.
```python
test: str = "test string"
print (type(test)) ## <class 'str'>
test = 6
print (type(test)) ## <class 'int'>
#####
number: int = -1
print(type(number)) ## <class 'int'>
test = "test string"
number = test
print(type(number)) ## <class 'str'>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]