Skip to content

Warn about deprecated commands - #16786

Merged
openshift-merge-robot merged 2 commits into
openshift:masterfrom
simo5:deprecate
Oct 13, 2017
Merged

openshift-merge-robot merged 2 commits into
openshift:masterfrom
simo5:deprecate

Conversation

@simo5

@simo5 simo5 commented Oct 10, 2017 •

Copy link
Copy Markdown

These commands still work against 3.6 servers, but we should start
warning that they will stop working once 3.7 is used.

Fixes #15932

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 10, 2017
@simo5

simo5 commented Oct 10, 2017

Copy link
Copy Markdown
Author

@enj PTAL

@enj

enj commented Oct 10, 2017

Copy link
Copy Markdown
Contributor

@simo5 wrong approach, please see these examples:

Deprecated: validateNodeConfigDeprecationMessage,

// Deprecated commands that are bundled with the binary but not displayed to end users directly
deprecatedCommands := []*cobra.Command{
admin.NewCommandCreateMasterCerts(admin.CreateMasterCertsCommandName, fullName+" "+admin.CreateMasterCertsCommandName, out),
admin.NewCommandCreateKeyPair(admin.CreateKeyPairCommandName, fullName+" "+admin.CreateKeyPairCommandName, out),
admin.NewCommandCreateServerCert(admin.CreateServerCertCommandName, fullName+" "+admin.CreateServerCertCommandName, out),
admin.NewCommandCreateSignerCert(admin.CreateSignerCertCommandName, fullName+" "+admin.CreateSignerCertCommandName, out),
}
for _, cmd := range deprecatedCommands {
// Unsetting Short description will not show this command in help
cmd.Short = ""
cmd.Deprecated = fmt.Sprintf("Use '%s ca' instead.", fullName)
cmds.AddCommand(cmd)
}

@enj enj assigned fabianofranz and unassigned 0xmichalis Oct 10, 2017
These commands still work against 3.6 servers, but we should start
warning that they will stop working once 3.7 is used.

Signed-off-by: Simo Sorce <[email protected]>
@simo5

simo5 commented Oct 11, 2017

Copy link
Copy Markdown
Author

@enj ok changed, PTAL

@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 11, 2017
@simo5

simo5 commented Oct 11, 2017

Copy link
Copy Markdown
Author

/test cmd

@simo5

simo5 commented Oct 12, 2017

Copy link
Copy Markdown
Author

@enj all test pass and I would like to get this into 3.7 as it is not a code change

@enj

enj commented Oct 12, 2017

Copy link
Copy Markdown
Contributor

/lgtm
/kind bug

@openshift/cli-review please approve.

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. labels Oct 12, 2017
@juanvallejo

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: enj, juanvallejo, simo5
We suggest the following additional approver: fabianofranz

Assign the PR to them by writing /assign @fabianofranz in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@enj enj added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2017
@enj

enj commented Oct 13, 2017

Copy link
Copy Markdown
Contributor

Added approved per @juanvallejo approval.

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot
openshift-merge-robot merged commit 05f812f into openshift:master Oct 13, 2017
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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants