Add timestamp formatting for rosconsole#1533
Add timestamp formatting for rosconsole#1533abrzozowski wants to merge 1 commit intoros:melodic-develfrom
Conversation
6713fd4 to
f229193
Compare
f229193 to
3dec6fc
Compare
|
@ros-pull-request-builder retest this please |
dirk-thomas
left a comment
There was a problem hiding this comment.
Please add unit tests for the newly introduced feature (as well as the pointed out problematic case).
| msg = msg.replace('${walltime}', '%f' % time.time()) # for performance reasons | ||
|
|
||
| while '${walltime:' in msg: | ||
| time_format = msg[msg.index('${walltime:') + len('${walltime:'): msg.index('}')] |
There was a problem hiding this comment.
What if another placeholder which hasn't been replaced yet precedes the ${walltime:? msg.index('}') would return an index which is before msg.index('${walltime:').
There was a problem hiding this comment.
Ok, you're right. Line:
time_format = msg[msg.index('${walltime:') + len('${walltime:'): msg.index('}')]
should looks like
tag_end_index = msg.index('${walltime:') + len('${walltime:')
time_format = msg[tag_end_index: msg.index('}', tag_end_index)]
I'll fix it by next week.
There was a problem hiding this comment.
@dirk-thomas I added unit test for formatted timestamp, but there are some problems on Npr_* builds. Could you tell me what does Npr_ stands for?
There was a problem hiding this comment.
These are the PR builds for the upcoming ROS Noetic distribution.
Just recently the default branch of this repo has moved to noetic-devel so please retarget that branch instead (and then the already existing Mpr results won't be updated anymore).
There was a problem hiding this comment.
Is there a problem with a Jenkins pipeline script on line git rev-parse origin/noetic-devel^{commit} ?
12:00:50 > git rev-parse origin/noetic-devel^{commit} # timeout=10
12:00:50 FATAL: Command "git rev-parse origin/noetic-devel^{commit}" returned status code 128:
12:00:50 stdout: origin/noetic-devel^{commit}
12:00:50
12:00:50 stderr: fatal: ambiguous argument 'origin/noetic-devel^{commit}': unknown revision or path not in the working tree.
[Npr__ros_comm__ubuntu_focal_amd64/138/]
I even tried an another PR-draft on #1892, made the same error: FATAL: Command "git rev-parse origin/noetic-devel^{commit}" returned status code 128: [Npr__ros_comm__ubuntu_focal_amd64/139]
3dec6fc to
27783bc
Compare
|
@ros-pull-request-builder retest this please |
27783bc to
831fe58
Compare
|
Please keep targeting |
It's Python part of formatter based on #1458 and related to the ros/rosconsole#22 for Cpp version.