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

Add changes for --scale-init support #990

Merged
merged 9 commits into from
Sep 15, 2020

Conversation

hemanrnjn
Copy link
Contributor

@hemanrnjn hemanrnjn commented Aug 25, 2020

Description

Now that we have support for defining the initial scale for a service, implementing --scale-init with kn as a top-level option instead of just as an annotation.

Changes

  • Add support for --scale-init option

Reference

Fixes #959

Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@hemanrnjn: 0 warnings.

In response to this:

Description

Changes

  • Add support for --scale-init option

Reference

Fixes #959

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 25, 2020
@knative-prow-robot
Copy link
Contributor

Hi @hemanrnjn. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 25, 2020
@rhuss
Copy link
Contributor

rhuss commented Aug 25, 2020

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 25, 2020
@hemanrnjn
Copy link
Contributor Author

@rhuss I'm adding test cases so till then I'll put this PR in WIP.

@hemanrnjn hemanrnjn changed the title Add changes for --scale-init support WIP: Add changes for --scale-init support Aug 25, 2020
@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 25, 2020
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 25, 2020
Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

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

@hemanrnjn thanks for the contribution. Are you ready for some feedback or would you rather we wait for when you remove the WIP tag?

@hemanrnjn
Copy link
Contributor Author

@hemanrnjn thanks for the contribution. Are you ready for some feedback or would you rather we wait for when you remove the WIP tag?

Sure. Why not! I'd also implement those feedback while the PR is in WIP.

@hemanrnjn hemanrnjn changed the title WIP: Add changes for --scale-init support Add changes for --scale-init support Aug 26, 2020
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 26, 2020
Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

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

Left some initial. Happy to do another round when addressed and more tests added (unit and e2e).
Thanks for contribution again.

docs/cmd/kn_service_update.md Outdated Show resolved Hide resolved
pkg/kn/commands/service/configuration_edit_flags.go Outdated Show resolved Hide resolved
pkg/kn/commands/service/configuration_edit_flags.go Outdated Show resolved Hide resolved
pkg/kn/commands/service/configuration_edit_flags.go Outdated Show resolved Hide resolved
pkg/kn/commands/service/configuration_edit_flags.go Outdated Show resolved Hide resolved
Copy link
Contributor

@rhuss rhuss left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this PR ! Looks good to me, with some minor suggestions (see below)

docs/cmd/kn_service_update.md Outdated Show resolved Hide resolved
docs/cmd/kn_service_update.md Outdated Show resolved Hide resolved
pkg/kn/commands/service/configuration_edit_flags.go Outdated Show resolved Hide resolved
pkg/kn/commands/service/configuration_edit_flags.go Outdated Show resolved Hide resolved
@hemanrnjn hemanrnjn changed the title Add changes for --scale-init support WIP: Add changes for --scale-init support Sep 1, 2020
@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 1, 2020
@navidshaikh
Copy link
Collaborator

navidshaikh commented Sep 2, 2020

Just out of curiosity I wonder how this works for an "update". Is it that the current number of replicas is changed to this number when the update is triggered ?

@rhuss : IIUC, yes, this would scale the number of replicas to match given init-scale and mark the revision ready, and then it'll ignore this value (for eg in no-traffic scale to zero case). This property applies to per revision, so setting this for to-be-created revision in an update should be a valid use case.

@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 7, 2020
@hemanrnjn
Copy link
Contributor Author

/retest

4 similar comments
@hemanrnjn
Copy link
Contributor Author

/retest

@hemanrnjn
Copy link
Contributor Author

/retest

@hemanrnjn
Copy link
Contributor Author

/retest

@rhuss
Copy link
Contributor

rhuss commented Sep 8, 2020

/retest

@hemanrnjn
Copy link
Contributor Author

@navidshaikh and @rhuss I have made all the changes and added all test cases. Please take one final look at it, if they look fine to you guys too?

@hemanrnjn hemanrnjn changed the title WIP: Add changes for --scale-init support Add changes for --scale-init support Sep 11, 2020
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 11, 2020
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 12, 2020
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 14, 2020
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/kn/commands/service/configuration_edit_flags.go 83.0% 83.2% 0.2

@hemanrnjn
Copy link
Contributor Author

/retest

Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

thanks @hemanrnjn ! The changelog entry is missing but you can add that in a separate PR.

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 15, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hemanrnjn, navidshaikh

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 15, 2020
@knative-prow-robot knative-prow-robot merged commit 6c7fc7c into knative:master Sep 15, 2020
rhuss pushed a commit to rhuss/knative-client that referenced this pull request Oct 5, 2020
* Add changes for --scale-init support

* Added test cases

* Add test case in e2e tests

* minor fix

* Test case failure fix

* Incorporated review comments

* Add service update test cases

* Incorporate review comments
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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for --scale-init
7 participants