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

Removes "build" word references from TaskRun #818

Merged
merged 1 commit into from
Jun 4, 2019

Conversation

hrishin
Copy link
Member

@hrishin hrishin commented Apr 30, 2019

Changes

At present TaskRun's status, it's pod containers name(step name
prefix) and logs have references to build keyword.
Which kind of gives the perception that Task is intended to
perform only build operations.

This patch removes those references from TaskRun.

Fixes #815

Submitter Checklist

Release Notes

🚨 Remove "build" word references from TaskRun in the steps container name.

@tekton-robot tekton-robot requested a review from dlorenc April 30, 2019 19:34
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Apr 30, 2019
@tekton-robot tekton-robot requested a review from imjasonh April 30, 2019 19:34
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 30, 2019
@dlorenc
Copy link
Contributor

dlorenc commented Apr 30, 2019

/ok-to-test

@tekton-robot tekton-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 30, 2019
@hrishin
Copy link
Member Author

hrishin commented May 1, 2019

/retest

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

Interesting failure…

-: v1alpha1.StepState{ContainerState: v1.ContainerState{Terminated: s"&ContainerStateTerminated{ExitCode:0,Signal:0,Reason:Completed,Message:,StartedAt:2019-05-01 03:12:42 +0000 UTC,FinishedAt:2019-05-01 03:12:42 +0000 UTC,ContainerID:docker://46c79150e7ee174883921feb7619e42ba9c63d5c2e8285233f88e917e18b892a,}"}, Name: "nop"}
+: <non-existent>
    {[]v1alpha1.StepState}[?->3]:
-: <non-existent>
+: v1alpha1.StepState{ContainerState: v1.ContainerState{Terminated: s"&ContainerStateTerminated{ExitCode:0,Signal:0,Reason:Completed,Message:,StartedAt:0001-01-01 00:00:00 +0000 UTC,FinishedAt:0001-01-01 00:00:00 +0000 UTC,ContainerID:,}"}, Name: "nop"}

@hrishin
Copy link
Member Author

hrishin commented May 1, 2019

yeah I'm not getting exactly, looks like this PR has messed with nop step

@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 7, 2019
@hrishin
Copy link
Member Author

hrishin commented May 7, 2019

/test pull-tekton-pipeline-integration-tests

Copy link

@aristosvo aristosvo left a comment

Choose a reason for hiding this comment

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

It looks like the order of steps is changed. In the failing test the order is:

  • exit
  • hello
  • world
  • nop

In the output yaml the order is:

  • nop
  • exit
  • hello
  • world

@vdemeester vdemeester force-pushed the fix-815 branch 2 times, most recently from 66f228d to b9b44e9 Compare May 29, 2019 15:49
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit labels May 29, 2019
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit and removed cla: no labels May 29, 2019
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 29, 2019
@vdemeester
Copy link
Member

cc @bobcatfish @abayer @dlorenc

},
},
Name: "exit",
Name: "nop",
Copy link
Member Author

Choose a reason for hiding this comment

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

Just wondering if step order should change?
Now as per this fix nop step is appearing at the top. If the user fetches the logs it would show the nop step first?
Is it desired? 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Good question. I feel it's no big deal (as the order was always alphabitically and not from the step order), but… @bobcatfish 🙏

Copy link
Collaborator

Choose a reason for hiding this comment

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

it doesn't seem like we have any control over this, so I don't think it matters (does anyone understand why these are in the order they're in? it seems pretty random!)

Copy link
Member Author

@hrishin hrishin May 31, 2019

Choose a reason for hiding this comment

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

yeah its because of taskrun reconciler copies the pod.status.containerStatus for all steps. By default, k8s sort the containerStatus in alphabetically sorted order (which is wired don't know why).

While working on fetching the task logs, one has to either iterate through pod.status.containerStatus or TaskRun.Status.Steps. Now the issue is, steps order is not maintained anymore, it has to find the currently running container and rather simply iterate over taskrun.status.steps while printing the logs. isn't it wired? 🤔

it doesn't seem like we have any control over this

One approach is while updating the taskrun status, we can sort containers status as per task.spec.steps order. 🤔

WDYT? @vdemeester @bobcatfish

Copy link
Collaborator

Choose a reason for hiding this comment

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

hm I guess we could sort them - I expect we'd probably want to have the order of the statuses match the order that the steps are declared in?

anyway my feeling is that we do this in a separate issue and PR, if there are no objections! (I wouldn't think of the order here as part of the interface)

Copy link
Member

Choose a reason for hiding this comment

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

Created an issue to follow-up #942

pkg/reconciler/v1alpha1/taskrun/resources/pod.go Outdated Show resolved Hide resolved
},
},
Name: "exit",
Name: "nop",
Copy link
Collaborator

Choose a reason for hiding this comment

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

it doesn't seem like we have any control over this, so I don't think it matters (does anyone understand why these are in the order they're in? it seems pretty random!)

At present `TaskRun's` `status`, it's pod containers name(`step name`
prefix) and logs has references to `build` keyword.
Which kind of gives the perception that `Task` is intended to
perform only build operations.

This patch removes those references from `TaskRun`.

Fixes
 - tektoncd#815

Signed-off-by: Vincent Demeester <[email protected]>
@vdemeester
Copy link
Member

@bobcatfish updated 👼

@bobcatfish
Copy link
Collaborator

Looks good to me!

/lgtm

@vdemeester I'll leave it up to you if you want to address the container status issue (I wasn't clear on whether or not we were all in agreement about leaving it as is)

/hold

/meow space

@tekton-robot tekton-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Jun 3, 2019
@tekton-robot
Copy link
Collaborator

@bobcatfish: cat image

In response to this:

Looks good to me!

/lgtm

@vdemeester I'll leave it up to you if you want to address the container status issue (I wasn't clear on whether or not we were all in agreement about leaving it as is)

/hold

/meow space

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.

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 4, 2019
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/approve
/hold cancel

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hrishin, vdemeester

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 4, 2019
@vdemeester
Copy link
Member

/test pull-tekton-pipeline-integration-tests

@hrishin
Copy link
Member Author

hrishin commented Jun 4, 2019

/retest

@vdemeester
Copy link
Member

/test pull-tekton-pipeline-integration-tests

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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit 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.

Remove references to "build"
7 participants