Skip to content

Commit 4621d76

Browse files
authored
Merge pull request #817 from cgwalters/config-ts
store: Get timestamp from config or annotation
2 parents 927ad1a + ca9534c commit 4621d76

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/src/store/ostree_container.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ fn create_imagestatus(
5151
l.get(oci_spec::image::ANNOTATION_CREATED)
5252
.map(|s| s.as_str())
5353
})
54+
.or_else(|| config.created().as_deref())
5455
.and_then(try_deserialize_timestamp);
5556

5657
let version = ostree_container::version_for_config(config).map(ToOwned::to_owned);

tests/booted/readonly/001-test-status.nu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ let st = bootc status --json --format-version=0 | from json
99
assert equal $st.apiVersion org.containers.bootc/v1
1010
let st = bootc status --format=yaml | from yaml
1111
assert equal $st.apiVersion org.containers.bootc/v1
12+
assert ($st.status.booted.image.timestamp != null)
1213
tap ok

0 commit comments

Comments
 (0)