Skip to content

Conversation

@malt3
Copy link
Collaborator

@malt3 malt3 commented Oct 28, 2025

This adds a more ergonomic way to set the image creation timestamp compared to using config_fragment. The created attribute accepts a file containing an RFC 3339 formatted datetime string, making it easier to integrate with Bazel's stamping mechanism.

Changes:

  • Add created attribute to image_manifest rule in manifest.bzl
  • Update Go manifest command to accept --created flag
  • Add readCreatedTimestamp function to parse RFC 3339 timestamps
  • Set config.Created field when timestamp is provided
  • Add test case in e2e/generic demonstrating usage

Closes #203

This adds a more ergonomic way to set the image creation timestamp
compared to using config_fragment. The created attribute accepts a
file containing an RFC 3339 formatted datetime string, making it
easier to integrate with Bazel's stamping mechanism.

Changes:
- Add created attribute to image_manifest rule in manifest.bzl
- Update Go manifest command to accept --created flag
- Add readCreatedTimestamp function to parse RFC 3339 timestamps
- Set config.Created field when timestamp is provided
- Add test case in e2e/generic demonstrating usage

Closes #203
@aspect-workflows
Copy link

aspect-workflows bot commented Oct 28, 2025

Bazel 8 (Test)

4 test targets passed

Targets
//docs:update_0_test [k8-fastbuild]                                                    112ms
//img/private/release/gazelle_plugin:release_files_test [k8-fastbuild]                 270ms
//tests/img_toolchain:img_toolchain_test [k8-fastbuild]                                689ms
//util:buildifier.check [k8-fastbuild]                                                 1s

Total test execution time was 2s. 11 tests (73.3%) were fully cached saving 793ms.


Integration Tests (Test)

17 test targets passed

Targets
//e2e:cc_bazel_7_4_0                     4m 55s
//e2e:cc_bazel_8_4_2                     4m 55s
//e2e:cc_bazel_9_0_0-pre_20251022_1      5m 2s
//e2e:generic_bazel_7_4_0                1m 20s
//e2e:generic_bazel_8_4_2                1m 14s
//e2e:generic_bazel_9_0_0-pre_20251022_1 1m 28s
//e2e:go_bazel_7_4_0                     3m 7s
//e2e:go_bazel_8_4_2                     3m 4s
//e2e:go_bazel_9_0_0-pre_20251022_1      3m 11s
//e2e:js_bazel_7_4_0                     40s
//e2e:js_bazel_8_4_2                     36s
//e2e:js_bazel_9_0_0-pre_20251022_1      40s
//e2e:python_bazel_7_4_0                 1m 47s
//e2e:python_bazel_8_4_2                 1m 42s
//e2e:python_bazel_9_0_0-pre_20251022_1  1m 43s
//e2e:workspace_bazel_7_4_0              15s
//e2e:workspace_bazel_8_4_2              19s

Buildifier

@malt3 malt3 marked this pull request as ready for review October 29, 2025 06:59
@malt3 malt3 merged commit de4e9bf into main Oct 29, 2025
11 checks passed
@malt3 malt3 deleted the image_manifest_created_attribute branch October 29, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Provide an attribute to set image's Created timestamp

2 participants