-
Notifications
You must be signed in to change notification settings - Fork 84
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
Allow to use EPOCH timestamp in the image annotation #665
Conversation
I'm still confused by the epoch function, but I might be misremembering what we wanted. I think we said:
If we're allowing 13-digit epochs, that means it's in milliseconds, or it refers to the year proof of conceptIn [6]: len("1" + "0" * 12)
Out[6]: 13
In [7]: to_epoch_from_string("1" + "0" * 12)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [7], line 1
----> 1 to_epoch_from_string("1" + "0" * 12)
File ~/workcode/pelorus/exporters/pelorus/timeutil.py:82, in to_epoch_from_string(timestring, allowed_length)
78 raise ValueError(
79 f"Tried to get epoch from not allowed string length: {timestring} / {allowed_length}"
80 )
81 else:
---> 82 return datetime.fromtimestamp(int(epoch_date_time))
ValueError: year 33658 is out of range I also really don't get why customizing the number of digits is necessary. Where to do use any other values than the defaults?
|
79b1123
to
20610ef
Compare
/hold timezone issue and milliseconds discussion |
20610ef
to
b92e07a
Compare
/unhold |
/LGTM |
/LGTM |
For the images that were build without commit time or hash data we allow to annotate them for the Commit Time exporter to work properly. This change allows to annotate with EPOCH time format. Signed-off-by: Michal Pryc <mpryc@redhat.com>
b92e07a
to
2af8407
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KevinMGranger, weshayutin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/test 4.11-e2e-openshift |
For the images that were build without commit time or hash data we allow to annotate them for the Commit Time exporter to work properly. This change allows to annotate with EPOCH time format.
Signed-off-by: Michal Pryc mpryc@redhat.com
@redhat-cop/mdt