Repository navigation
pod/build delete sync - #2465
Conversation
There was a problem hiding this comment.
Just use an annotation.
There was a problem hiding this comment.
can't query on annotations, right? i do this later:
selector := labels.LabelSelector{}.Add(buildapi.IsBuildPodLabel, labels.EqualsOperator, []string{"true"})
podList, err := lw.client.KubeClient.Pods(kapi.NamespaceAll).List(selector, fields.Everything())
There was a problem hiding this comment.
You can query on anything you write code for. Label query is no more efficient than any other type of query. That query at the end is pretty bad. Also... build name == pod name so why in the world would we need to list anything?
----- Original Message -----
@@ -12,6 +12,8 @@ const (
BuildAnnotation = "openshift.io/build.name"
// BuildLabel is the key of a Pod label whose value is the Name of a
Build which is run.
BuildLabel = "build"
- // BuildIndicatorLabel is the key of a Pod label which can be used to
query for all build pods- IsBuildPodLabel = "isBuildPod"
can't query on annotations, right? i do this later:
selector := labels.LabelSelector{}.Add(buildapi.IsBuildPodLabel,
labels.EqualsOperator, []string{"true"})
podList, err := lw.client.KubeClient.Pods(kapi.NamespaceAll).List(selector,
fields.Everything())
Reply to this email directly or view it on GitHub:
https://github.com/openshift/origin/pull/2465/files#r30928406
There was a problem hiding this comment.
changing this to just list all pods and then filter in the code based on the existing BuildLabel presence, as discussed.
|
@smarterclayton fyi I am working on tests for this. |
804d2f7 to
ceacb17
Compare
|
[test] |
ceacb17 to
99ff583
Compare
|
@smarterclayton tests added, things we discussed cleaned up except for this which i didn't understand:
since i think that's basically what this is doing already. |
|
fixes #1646 |
99ff583 to
dca3bb1
Compare
dca3bb1 to
26f3bd5
Compare
23da809 to
bcc2eba
Compare
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/2424/) |
There was a problem hiding this comment.
Don't use dummy, I already fixed this to use now in all other places in build controller. Otherwise you'll have to tackle @smarterclayton's angry eyes 😉
There was a problem hiding this comment.
The same suggestion as above, to get rid of client var name.
|
@ironcladlou PTAL - we'll need to do the same thing for deployment <-> deployer-pod sync. |
bcc2eba to
fcf0f44
Compare
fcf0f44 to
0519368
Compare
|
@soltysh I had to revert one of your suggested changed (controller.go line 241) but i added a comment explaining the reasoning. |
|
LGTM [merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/2100/) (Image: devenv-fedora_1631) |
|
Evaluated for origin up to 0519368 |
Merged by openshift-bot
No description provided.