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

Switch from Knative conditions to metav1.Condition #159

Merged
merged 1 commit into from
Jul 20, 2021

Conversation

scothis
Copy link
Contributor

@scothis scothis commented Jul 20, 2021

metav1.Condition requires a Reason for all conditions. We are now in
sync with the spec defined ServiceBinding resource shape.

Signed-off-by: Scott Andrews andrewssc@vmware.com

metav1.Condition requires a Reason for all conditions. We are now in
sync with the spec defined ServiceBinding resource shape.

Signed-off-by: Scott Andrews <andrewssc@vmware.com>
@vmwclabot vmwclabot added the cla-not-required CLA not required label Jul 20, 2021
@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

Merging #159 (0371926) into main (fdccc48) will increase coverage by 0.15%.
The diff coverage is 98.07%.

❗ Current head 0371926 differs from pull request most recent head 1483422. Consider uploading reports for the commit 1483422 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
+ Coverage   94.46%   94.61%   +0.15%     
==========================================
  Files          16       16              
  Lines         578      613      +35     
==========================================
+ Hits          546      580      +34     
- Misses         21       22       +1     
  Partials       11       11              
Impacted Files Coverage Δ
...is/servicebinding/v1alpha2/servicebinding_types.go 100.00% <ø> (ø)
...ervicebinding/v1alpha2/servicebinding_lifecycle.go 98.03% <97.91%> (-1.97%) ⬇️
pkg/reconciler/servicebinding/controller.go 100.00% <100.00%> (ø)
pkg/reconciler/servicebinding/servicebinding.go 79.41% <100.00%> (+0.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdccc48...1483422. Read the comment docs.

@scothis scothis requested a review from shashwathi July 20, 2021 17:27
@shashwathi
Copy link
Contributor

What is the need for passing time into setting status functions? Potentially, the function could add the current time when it's called. In the unit test, we could ignore LastTransitionTime field in comparison

@scothis
Copy link
Contributor Author

scothis commented Jul 20, 2021

What is the need for passing time into setting status functions? Potentially, the function could add the current time when it's called. In the unit test, we could ignore LastTransitionTime field in comparison

Testability. Since time is inherently non-deterministic, we can make these functions deterministic by injecting the timestamp. Before this change, the tests ignored the timestamps, but since we're now setting the timestamps, and when the timestamp gets updated is important, we can't just ignore the value.

@scothis scothis merged commit 817ba71 into vmware-tanzu:main Jul 20, 2021
@scothis scothis deleted the metav1-condition branch July 20, 2021 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-not-required CLA not required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants