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

adding updatedAvailableReplicas field #1317

Merged
merged 3 commits into from
Jul 6, 2023

Conversation

nitishchauhan0022
Copy link
Contributor

Ⅰ. Describe what this PR does

Added updatedAvailableReplicas field to CloneSet and Advanced StatefulSet

Ⅱ. Does this pull request fix one issue?

fixes #1305

@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2023

Codecov Report

Merging #1317 (929d489) into master (ffcf189) will increase coverage by 0.04%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #1317      +/-   ##
==========================================
+ Coverage   48.50%   48.55%   +0.04%     
==========================================
  Files         151      152       +1     
  Lines       21210    21246      +36     
==========================================
+ Hits        10288    10316      +28     
- Misses       9793     9801       +8     
  Partials     1129     1129              
Flag Coverage Δ
unittests 48.55% <100.00%> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
pkg/controller/cloneset/cloneset_status.go 89.83% <100.00%> (+0.73%) ⬆️
pkg/controller/statefulset/stateful_set_control.go 63.42% <100.00%> (+0.10%) ⬆️

... and 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
@zmberg
Copy link
Member

zmberg commented Jun 25, 2023

@nitishchauhan0022 You must exec make build & make manifests, and push again.

@nitishchauhan0022
Copy link
Contributor Author

@zmberg I did it before pushing, and I tried again now, but no changes were observed.

@@ -403,6 +403,9 @@ func (ssc *defaultStatefulSetControl) updateStatefulSet(
status.ReadyReplicas++
if getPodRevision(pods[i]) == updateRevision.Name {
status.UpdatedReadyReplicas++
if avail, _ := isRunningAndAvailable(pods[i], minReadySeconds); avail {
status.UpdatedAvailableReplicas++
}
Copy link
Member

Choose a reason for hiding this comment

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

File have many checks for set.Status.UpdatedReplicas, and i think you can add UpdatedAvailableReplicas checks.

@zmberg
Copy link
Member

zmberg commented Jun 26, 2023

Run [[ -z $(git status -s) ]] || (printf "Existing modified/untracked files.\nPlease run \"make generate manifests\" and push again.\n"; exit 1)
Existing modified/untracked files.
Please run "make generate manifests" and push again.
Error: Process completed with exit code 1.

What is your go version? Preferably 1.18.

@nitishchauhan0022
Copy link
Contributor Author

Run [[ -z $(git status -s) ]] || (printf "Existing modified/untracked files.\nPlease run \"make generate manifests\" and push again.\n"; exit 1)
Existing modified/untracked files.
Please run "make generate manifests" and push again.
Error: Process completed with exit code 1.

What is your go version? Preferably 1.18.

1.20.5

@zmberg
Copy link
Member

zmberg commented Jul 4, 2023

@nitishchauhan0022 Can you join kruise dingding to communicate with me?

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
@zmberg
Copy link
Member

zmberg commented Jul 5, 2023

/lgtm

@zmberg
Copy link
Member

zmberg commented Jul 6, 2023

/approve

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zmberg

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

@kruise-bot kruise-bot merged commit 24a4b7f into openkruise:master Jul 6, 2023
21 checks passed
diannaowa pushed a commit to diannaowa/kruise that referenced this pull request Aug 29, 2023
* adding updatedAvailableReplicas field

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* resolving linting error and some check for updatedavailabel replica

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* fixing typo

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

---------

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
lilongfeng0902 pushed a commit to lilongfeng0902/kruise that referenced this pull request Sep 12, 2023
* adding updatedAvailableReplicas field

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* resolving linting error and some check for updatedavailabel replica

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* fixing typo

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

---------

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
ppbits pushed a commit to ppbits/kruise that referenced this pull request Apr 4, 2024
* adding updatedAvailableReplicas field


* resolving linting error and some check for updatedavailabel replica


* fixing typo


---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add updatedAvailableReplicas field to CloneSet and Advanced StatefulSet
4 participants