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

fix: build stamp computation #1608

Merged
merged 1 commit into from
Mar 8, 2023
Merged

Conversation

matejvasek
Copy link
Contributor

Changes

  • 🐛 Fix build stamp computation.
    About the same time that buildStamp was computed .gitignore was (unnecessary) modified.
    This caused timestamp mismatch so function appeared to be not built.
    Reason: sometimes (randomly) the buildStamp was computed before the .gitignore was modified.

/kind bug

fix: build stamp computation

About the same time that buildStamp was computed .gitignore was modified.
This caused non-deterministic results, because sometimes the
modification was taken into account and sometimed it was not.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
@knative-prow knative-prow bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 8, 2023
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 8, 2023
@knative-prow knative-prow bot requested a review from jrangelramos March 8, 2023 19:38
@knative-prow knative-prow bot requested a review from rhuss March 8, 2023 19:38
@knative-prow knative-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 8, 2023
@matejvasek
Copy link
Contributor Author

@lkingland @zroubalik PTAL

@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Patch coverage: 62.50% and project coverage change: -1.78 ⚠️

Comparison is base (9a9da1f) 58.66% compared to head (706b51f) 56.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1608      +/-   ##
==========================================
- Coverage   58.66%   56.88%   -1.78%     
==========================================
  Files          82       92      +10     
  Lines       10884    11584     +700     
==========================================
+ Hits         6385     6590     +205     
- Misses       3903     4387     +484     
- Partials      596      607      +11     
Flag Coverage Δ
e2e-test-oncluster 34.96% <25.00%> (?)
e2e-test-oncluster-runtime 29.64% <25.00%> (?)
e2e-test-runtime-go 30.35% <25.00%> (?)
e2e-test-runtime-python 30.32% <25.00%> (?)
e2e-test-runtime-quarkus 30.43% <25.00%> (?)
e2e-test-runtime-springboot 30.44% <25.00%> (?)
e2e-test-runtime-typescript 30.43% <25.00%> (?)
integration-tests ?
unit-tests-macos-latest 48.57% <62.50%> (?)
unit-tests-ubuntu-latest 49.55% <62.50%> (?)

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

Impacted Files Coverage Δ
pkg/functions/client.go 59.71% <62.50%> (+2.11%) ⬆️
pkg/k8s/logs.go 0.00% <0.00%> (-70.00%) ⬇️
pkg/k8s/dialer.go 24.60% <0.00%> (-48.83%) ⬇️
pkg/docker/runner.go 21.76% <0.00%> (-47.65%) ⬇️
pkg/knative/describer.go 45.58% <0.00%> (-20.59%) ⬇️
pkg/knative/deployer.go 45.64% <0.00%> (-20.16%) ⬇️
pkg/k8s/configmaps.go 34.21% <0.00%> (-15.79%) ⬇️
pkg/functions/invoke.go 49.64% <0.00%> (-5.76%) ⬇️
pkg/k8s/persistent_volumes.go 66.87% <0.00%> (-5.53%) ⬇️
pkg/knative/logs.go 75.25% <0.00%> (-5.16%) ⬇️
... and 37 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@matejvasek
Copy link
Contributor Author

matejvasek commented Mar 8, 2023

@lkingland why is ensureRuntimeDir() even called upon the buildStamp computation? Shouldn't be the existence ensured on project creation?

@lkingland
Copy link
Member

@lkingland why is ensureRuntimeDir() even called upon the buildStamp computation? Shouldn't be the existence ensured on project creation?

It is currently ensured during project creation. It is not tracked in source control (this is the purpose of the directory), so any code which requires it to exist needs to call ensureRuntimeDir() as a precondition, creating it lazily, since the user may not have created the function, but rather have checked it out from source control.

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

knative-prow bot commented Mar 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [lkingland,matejvasek]

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 merged commit 9aac5eb into knative:main Mar 8, 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/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants