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

feat: specify create time for image built with buildpacks #1685

Merged
merged 4 commits into from
Apr 28, 2023

Conversation

cuichenli
Copy link
Contributor

Changes

Currently the image built with func build command all says the image was built 42 years ago. Although it was treated as a feature of buildpacks (in buildpacks/pack#931 (comment)), they have fixed this feature recently in buildpacks/imgutil#138 hence I think it is worth to change the behavior here as well.

/kind enhancement

Note: I am new to the func project and this change may be inappropriate, feel free to reject it. Thanks

@knative-prow
Copy link

knative-prow bot commented Apr 23, 2023

Welcome @cuichenli! It looks like this is your first PR to knative/func 🎉

@knative-prow knative-prow bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 23, 2023
@knative-prow knative-prow bot requested review from dsimansk and navidshaikh April 23, 2023 09:08
@matejvasek matejvasek requested review from lance, zroubalik and lkingland and removed request for navidshaikh and dsimansk April 24, 2023 13:53
@matejvasek
Copy link
Contributor

I think we can have this but I would prefer having this behind some config flag in ~/.config/func/config.yaml.

@cuichenli
Copy link
Contributor Author

yeah, definitely it would be great to make it configurable. if the owners are ok with this, i will try to implement it.

@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch coverage: 88.88% and project coverage change: +13.31 🎉

Comparison is base (88b3634) 49.81% compared to head (8db2466) 63.12%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1685       +/-   ##
===========================================
+ Coverage   49.81%   63.12%   +13.31%     
===========================================
  Files          81       93       +12     
  Lines       11148    11989      +841     
===========================================
+ Hits         5553     7568     +2015     
+ Misses       5111     3735     -1376     
- Partials      484      686      +202     
Flag Coverage Δ
e2e-test 38.94% <88.88%> (?)
e2e-test-oncluster 34.81% <80.55%> (?)
e2e-test-oncluster-runtime 29.64% <80.55%> (?)
e2e-test-runtime-go 28.34% <80.55%> (?)
e2e-test-runtime-node 29.48% <80.55%> (?)
e2e-test-runtime-python 29.48% <80.55%> (?)
e2e-test-runtime-quarkus 29.61% <80.55%> (?)
e2e-test-runtime-springboot 28.47% <80.55%> (?)
e2e-test-runtime-typescript 29.61% <80.55%> (?)
integration-tests 50.05% <77.77%> (?)
unit-tests-macos-latest 48.87% <77.77%> (?)
unit-tests-ubuntu-latest 49.81% <77.77%> (?)
unit-tests-windows-latest 48.95% <77.77%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/builders/buildpacks/builder.go 65.81% <50.00%> (+18.10%) ⬆️
cmd/build.go 72.57% <100.00%> (+0.59%) ⬆️
cmd/deploy.go 75.80% <100.00%> (+0.86%) ⬆️

... and 57 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@matejvasek
Copy link
Contributor

@lance @zroubalik wdyt?

@lance
Copy link
Member

lance commented Apr 24, 2023

@lance @zroubalik wdyt?

I agree behind a config flag would be nice

@lkingland
Copy link
Member

lkingland commented Apr 25, 2023

Perhaps a Builder option WithTimestamp(bool) which would be set when the builder is created in cmd/build.go and cmd/deploy.go, based on the value of a flag --build-timestamp?

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2023
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 25, 2023
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2023
@cuichenli
Copy link
Contributor Author

i have updated accordingly, please let me know if i missed anything. thanks!

@matejvasek
Copy link
Contributor

@cuichenli you need to fix one linter error.

@cuichenli
Copy link
Contributor Author

i (think) i have fixed it in the latest commit, can you trigger the build again? thanks

@lance
Copy link
Member

lance commented Apr 27, 2023

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 27, 2023
Copy link
Member

@lkingland lkingland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good. Thanks @cuichenli

I re-ran the failed tests. They've been flaky lately

@knative-prow
Copy link

knative-prow bot commented Apr 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cuichenli, lkingland

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

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 28, 2023
@knative-prow knative-prow bot merged commit cd0dbfd into knative:main Apr 28, 2023
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. kind/enhancement lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants