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

Deprecate kubectl scale job #60139

Merged
merged 2 commits into from
Feb 22, 2018

Conversation

soltysh
Copy link
Contributor

@soltysh soltysh commented Feb 21, 2018

What this PR does / why we need it:
With the generic scaler (#58298) the only problem is job and as discussed in #58468 (comment) and during SIG CLI we've agreed that scaling jobs was a mistake we need to revert.
This PR deprecates scale command for jobs, only.

/assign @deads2k @pwittrock

Release note:

Deprecate kubectl scale jobs (only jobs). 

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 21, 2018
@deads2k
Copy link
Contributor

deads2k commented Feb 21, 2018

This matches the discussion in sig-cli.

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 21, 2018
@@ -146,6 +147,10 @@ func RunScale(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin
}

mapping := info.ResourceMapping()
if mapping.Resource == "jobs" {
glog.Warningf("%s scale job is DEPRECATED and will be removed in a future version.", cmd.Parent().Name())
Copy link
Contributor

Choose a reason for hiding this comment

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

we normally use fmt.fprintf(stderr to avoid irrelevant line numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what I had originally, but then I found this cherry. Although I'm fine fixing the other one as well to use fmt.Fprintf

@deads2k
Copy link
Contributor

deads2k commented Feb 21, 2018

/hold

fix up the printing

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 21, 2018
@soltysh soltysh force-pushed the deprecate_scale_job branch from 676ab52 to 2935fd6 Compare February 21, 2018 21:38
@k8s-ci-robot k8s-ci-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 Feb 21, 2018
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2018
@soltysh
Copy link
Contributor Author

soltysh commented Feb 21, 2018

@deads2k fixed the printing and updated printDeprecationWarning accordingly

@deads2k
Copy link
Contributor

deads2k commented Feb 22, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 22, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, soltysh

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

@soltysh
Copy link
Contributor Author

soltysh commented Feb 22, 2018

The printing was fixed, I'm guessing David forgot to :
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 22, 2018
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 39c7e92 into kubernetes:master Feb 22, 2018
@soltysh soltysh deleted the deprecate_scale_job branch February 22, 2018 10:11
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants