-
Notifications
You must be signed in to change notification settings - Fork 9
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:add a new filed EnableRating in repository #351
Conversation
Codecov Report
@@ Coverage Diff @@
## main #351 +/- ##
==========================================
- Coverage 26.28% 26.14% -0.14%
==========================================
Files 38 38
Lines 3748 3768 +20
==========================================
Hits 985 985
- Misses 2691 2711 +20
Partials 72 72
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zqq454224016 Good job! Some tiny changes still required when doing the example-test.
if err := r.Client.Get(ctx, types.NamespacedName{Namespace: instance.Namespace, Name: component.Status.RepositoryRef.Name}, &repository); err != nil || !repository.Spec.EnableRating { | ||
instanceDeepCopy := instance.DeepCopy() | ||
cond := corev1alpha1.Condition{ | ||
Status: v1.ConditionFalse, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So rating's condition is only show when there are some error or rating is not enable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update condition when
- error is not nil and not
NotFound
- error is nil, but rating is disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the rating is disable, what error is returned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simple error message is enough just like the condition message you used here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So rating's condition is only show when there are some error or rating is not enable?
Actually we should track the whole running status in Rating.Let's do this in another pr
Signed-off-by: zqq454224016 <[email protected]>
What type of PR is this?
What this PR does / why we need it
Which issue(s) this PR fixes
Fixes #345
Special notes for your reviewer