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

remove legacy resource and kind checks from the CLI #19657

Merged
merged 1 commit into from May 10, 2018

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented May 8, 2018

The CLI no longer deals in oapi types. No need to test the legacy resources and kinds.

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 8, 2018
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 8, 2018
batch.Kind("Job"): checkJobReadiness,
apps.Kind("StatefulSet"): checkStatefulSetReadiness,
routeapi.Kind("Route"): checkRouteReadiness,
{Group: "", Kind: "Build"}: checkBuildReadiness,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bparees when are you going to stop supporting oapi?

Copy link
Contributor

Choose a reason for hiding this comment

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

The moment someone tells me we're allowed to drop it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The moment someone tells me we're allowed to drop it.

The process endpoint no longer returns old oapi resources. Is the only use-case you have for this working with legacy masters and previously created things? Could you simply create a migration command to be run during 3.10 and remove this code in 3.11?

Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible we could accomplish this via conversion logic so the storage migration would just cover it? Adding a whole new migration command for a single release seems like overkill. (I assume you're suggesting a new "oc adm migrate templateinstances" subcommand)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is it possible we could accomplish this via conversion logic so the storage migration would just cover it? Adding a whole new migration command for a single release seems like overkill. (I assume you're suggesting a new "oc adm migrate templateinstances" subcommand)

Possible, but I would not recommend doing so. Your old and new servers would be fighting with each other. I would point out HPA as an example of a thing with similar needs (ref needs updating) that created a separate command to avoid muddying the API specific knowledge baked into conversions. Conversions are more sensitive and broadly applied than a targeted migrate command. Stakes are much higher.

Copy link
Contributor

Choose a reason for hiding this comment

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

k. i'll take a look at it.

Copy link
Contributor

Choose a reason for hiding this comment

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

PR for migration: #19664

t.Errorf("Expected type error.")
}

if _, err := legacyscheme.Registry.RESTMapper().KindFor(template.LegacyResource("processedtemplates").WithVersion("")); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this static restmapper is gone in 3.11

extensionsapi.Resource("deployments/rollback"),
appsapi.Resource("deployments/rollback"),
kapi.Resource("pods/attach"),
kapi.Resource("namespaces/finalize"),
{Group: "", Resource: "buildconfigs/instantiatebinary"},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that authorization sticks around longer than we'll keep the admission endpoints.

@deads2k
Copy link
Contributor Author

deads2k commented May 8, 2018

/retest

@deads2k
Copy link
Contributor Author

deads2k commented May 9, 2018

/retest

@deads2k
Copy link
Contributor Author

deads2k commented May 9, 2018

/retest

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 10, 2018
@deads2k
Copy link
Contributor Author

deads2k commented May 10, 2018

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@deads2k
Copy link
Contributor Author

deads2k commented May 10, 2018

/retest

1 similar comment
@deads2k
Copy link
Contributor Author

deads2k commented May 10, 2018

/retest

@openshift-merge-robot openshift-merge-robot merged commit 8af9b16 into openshift:master May 10, 2018
@deads2k deads2k deleted the cli-35-legacy-01 branch July 3, 2018 17:48
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. lgtm Indicates that a PR is ready to be merged. 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.

None yet

6 participants