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

KUBESAW-43: Introduce LastUpdatedTime as prefered one #398

Merged
merged 4 commits into from
May 13, 2024

Conversation

fbm3307
Copy link
Contributor

@fbm3307 fbm3307 commented May 6, 2024

After making the LastProbeTime optional, introduce LastUpdatedTime as the preferred one

This is the next step after codeready-toolchain/api#420
This is related to

Signed-off-by: Feny Mehta <fbm3307@gmail.com>
Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.06%. Comparing base (ed50ce5) to head (60ac00e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #398      +/-   ##
==========================================
+ Coverage   77.98%   78.06%   +0.07%     
==========================================
  Files          47       47              
  Lines        1958     1965       +7     
==========================================
+ Hits         1527     1534       +7     
  Misses        373      373              
  Partials       58       58              
Files Coverage Δ
controllers/toolchaincluster/healthchecker.go 93.54% <100.00%> (+0.44%) ⬆️
pkg/status/toolchaincluster.go 89.65% <100.00%> (+1.19%) ⬆️

Copy link
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

Comment on lines +51 to +54
if condition.LastUpdatedTime != nil {
return *condition.LastUpdatedTime
}
return condition.LastProbeTime
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please add/update the unit tests so it verifies that it give the LastUpdatedTime preference and if not set then it takes the LastProbeTime?
I mean, let's verify that it works when either from these two fields are not set. If I'm not mistaken, the current unit tests sets both fields

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added it

Signed-off-by: Feny Mehta <fbm3307@gmail.com>
Copy link

sonarcloud bot commented May 10, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@fbm3307 fbm3307 merged commit 0cabe6c into codeready-toolchain:master May 13, 2024
9 checks passed
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.

None yet

3 participants