-
Notifications
You must be signed in to change notification settings - Fork 557
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
Resolves #522 set Created date to time of execution #2108
Resolves #522 set Created date to time of execution #2108
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly lgtm, aside from the one tiny style nit.
A couple more questions though:
- Is there any kind of test we can add to check that the created date isn't zero?
- Do we also want this for attestations, SBOMs, etc?
Signed-off-by: Tobias Trabelsi <lerentis@uploadfilter24.eu>
for a test like this one would need to mock a timestamp right? i am still learning when it comes to writing tests, so i fear this is out of my skill level as of now :/
would make sense to keep this consistent imo, but maybe i am missing some greater context why it was implemented with this fixed date stamp before |
I don't know about everyone, but I'd personally accept a test that just checks that the created date is non-zero. Bonus points for it being any time in the last minute. Having a test that injects a fake timestamp and checks that it's exactly that date seems like overkill, but that's subjective.
Yeah I think we should stay consistent. The reason it was zero before was probably some combination of (a) that was the default when using |
Codecov Report
@@ Coverage Diff @@
## main #2108 +/- ##
==========================================
+ Coverage 26.27% 26.35% +0.07%
==========================================
Files 129 129
Lines 7574 7582 +8
==========================================
+ Hits 1990 1998 +8
Misses 5329 5329
Partials 255 255
Help us with your feedback. Take ten seconds to tell us how you rate us. |
@imjasonh i hope i understood the requested changes correctly. initially i thought you were talking about a unit test and not a check about the previous date that was set 😅 |
…te change to files as well Signed-off-by: Tobias Trabelsi <tobias.trabelsi@dbschenker.com>
Oh I meant we should have a unit test that when a signature/whatever gets appended, it also updates the image's created-at date to be something recent, or at least non-zero. I think we should always update the image's created-at to be |
Signed-off-by: Tobias Trabelsi <tobias.trabelsi@dbschenker.com>
ah okay then my initial understanding was correct. sorry about that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good!
I can't approve your CI run, but except for a few minor comments, this should be good to go assuming tests pass.
Signed-off-by: Tobias Trabelsi <tobias.trabelsi@dbschenker.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only tiny tiny nits left, otherwise LGTM
Co-authored-by: Jason Hall <jason@chainguard.dev> Signed-off-by: Tobias Trabelsi <tobias.trabelsi@dbschenker.com>
Signed-off-by: Tobias Trabelsi <tobias.trabelsi@dbschenker.com>
Summary
This commit sets the Created date of the signature to the date of execution of the signing action.
Release Note
-changed: Signatures do now use the created timestamp based on the local time of signing
Documentation
n/a