Skip to content

Remove "template.openshift.io/template-instance" label#16808

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
jim-minter:remove_templateinstance_label
Oct 13, 2017
Merged

Remove "template.openshift.io/template-instance" label#16808
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
jim-minter:remove_templateinstance_label

Conversation

@jim-minter
Copy link
Contributor

@jim-minter jim-minter commented Oct 11, 2017

Background: this label was a stopgap before OwnerReferences and TemplateInstance.Status.Objects existed. Now that these do, and before the templateinstance API is officially released, I'd like to remove the label. It is unnecessary, and it is problematic on two fronts: it is effectively trying to be a ObjectReference, but it doesn't record Namespace or UID. That means that it it is broken in the cases of cross-namespace template instantiations (TemplateInstance in one namespace, instantiated object in another), and rapid creation/deletion of TemplateInstances (recently witnessed in an extended test flake).

@openshift-ci-robot openshift-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 11, 2017
kapi.Kind("Secret"),
kapi.Kind("Service"),
routeapi.Kind("Route"),
routeapi.LegacyKind("Route"):
Copy link
Contributor

Choose a reason for hiding this comment

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

does this mean the expose annotation can only be used on these object types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes; that is currently the case anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing in the code should prevent expansion in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

hm, i guess that was a choice we made, sorry, i forgot about it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is legacy only an issue for Route? aren't there also Legacy apis for the other types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Legacy is via /oapi, non-legacy is via /apis/. Core Kubernetes API objects haven't moved from /api into /apis/, at least at this time.

Copy link
Contributor

Choose a reason for hiding this comment

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

hm. I thought it was also group vs non-group apis?

Copy link
Contributor

Choose a reason for hiding this comment

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

i guess you're saying the k8s objects haven't been groupified. ok.

o.Expect(err).NotTo(o.HaveOccurred())

err = cli.AsAdmin().Run("create").Args("-f", "-").InputString(stdout).Execute()
o.Expect(err).NotTo(o.HaveOccurred())
Copy link
Contributor

Choose a reason for hiding this comment

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

why not use new-app?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously there was a matching "delete", but I took it out. Will change.


// TemplateInstanceLabel is used to label every object created by the
// TemplateInstance API.
TemplateInstanceLabel = "template.openshift.io/template-instance"
Copy link
Contributor

Choose a reason for hiding this comment

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

@spadgett fyi. don't know if you were using this, but we're taking it away in preference to using ownerRefs to track the templateinstance associated with an object.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the heads up. We're not using it.

@jim-minter jim-minter force-pushed the remove_templateinstance_label branch from 83d9acf to e227d13 Compare October 12, 2017 15:20
@bparees
Copy link
Contributor

bparees commented Oct 12, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 12, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, jim-minter

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

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 12, 2017
@jim-minter
Copy link
Contributor Author

flake #16836
/test unit

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 12, 2017

@jim-minter: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins/experimental/unit e227d13 link /test origin-ut

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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. I understand the commands that are listed here.

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 16777, 16811, 16823, 16808, 16833).

@openshift-merge-robot openshift-merge-robot merged commit 7e4f2d3 into openshift:master Oct 13, 2017
@openshift-merge-robot
Copy link
Contributor

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

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/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.

6 participants