Skip to content
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

Reproducible/deterministic bundles #2133

Merged
merged 2 commits into from
Sep 25, 2023
Merged

Conversation

zregvart
Copy link
Contributor

Changes

Sorts the bundle image layers according to the digest of the layer's content and adds the --ctime parameter to tkn bundle push to allow setting the created time in the bundle image config.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

See the contribution guide
for more details.

Release Notes

Tekton bundle images are reproducible with --ctime provided to tkn bundle push

Fixes #2132

Given the same set of files in any order this allows the layers to be
added to the image manifest in the deterministic order as they are now
sorted according to their sha256 digest.
@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 22, 2023
@tekton-robot
Copy link
Contributor

Hi @zregvart. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 22, 2023
@vdemeester
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 25, 2023
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 25, 2023
This allows specifying the created time in the image config instead of
using the current time. If `--ctime` is not provided the current time is
used. `--ctime` supports date, date and time in UTC timezone and RFC3339
formatted date that can include the timezone.
@piyush-garg
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 25, 2023
@tekton-robot tekton-robot merged commit 29048c4 into tektoncd:main Sep 25, 2023
8 checks passed
@chmouel
Copy link
Member

chmouel commented Sep 25, 2023

can it be the default? do we need a flag for different behavior?

@zregvart
Copy link
Contributor Author

can it be the default? do we need a flag for different behavior?

@chmouel do you mean set the created time to a predefined constant (say 1970-01-01?) instead of current time? Should be easy to do, I'm guessing there was a reason to setting it to the current time previously and I didn't want to change that.

@zregvart zregvart deleted the issue/2132 branch September 26, 2023 07:59
@vdemeester
Copy link
Member

can it be the default? do we need a flag for different behavior?

@chmouel do you mean set the created time to a predefined constant (say 1970-01-01?) instead of current time? Should be easy to do, I'm guessing there was a reason to setting it to the current time previously and I didn't want to change that.

I think I tend to agree with @chmouel, we could have it enabled by default. tkn bundles is an experimental set of subcommands, so we can "break" usage a little bit (even if, in that case, it shouldn't really break anything).

@zregvart
Copy link
Contributor Author

I created a followup in #2135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reproducible/deterministic bundles
5 participants