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

Add Build status fields to TaskRun status #243

Merged
merged 3 commits into from
Nov 22, 2018

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Nov 19, 2018

Updates TaskRunStatus to have the BuildStatus fields (non-deprecated ones) and populate them from the scheduled build status.

Simple naive approach. , putting WIP as I need to add/update tests (unit tests 😉).

Closes #236

/cc @pivotal-nader-ziada @imjasonh @bobcatfish

Signed-off-by: Vincent Demeester [email protected]

@knative-prow-robot knative-prow-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 19, 2018
@vdemeester
Copy link
Member Author

/test pull-knative-build-pipeline-integration-tests

@vdemeester vdemeester force-pushed the 236-taskrunstatus branch 2 times, most recently from e93fa49 to 1d97125 Compare November 20, 2018 09:56
@vdemeester vdemeester changed the title WIP: Add Build status fields to TaskRun status Add Build status fields to TaskRun status Nov 20, 2018
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 20, 2018
pkg/apis/pipeline/v1alpha1/task_types.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1alpha1/taskrun_types.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1alpha1/taskrun_types.go Outdated Show resolved Hide resolved
pkg/reconciler/v1alpha1/taskrun/taskrun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/v1alpha1/taskrun/taskrun_test.go Outdated Show resolved Hide resolved
@vdemeester vdemeester force-pushed the 236-taskrunstatus branch 4 times, most recently from 4ef652c to 69a62e0 Compare November 20, 2018 15:04
@vdemeester
Copy link
Member Author

# […]
I1120 15:23:03.717] status:
I1120 15:23:03.717]   conditions:
I1120 15:23:03.718]   - lastTransitionTime: "2018-11-20T15:16:50Z"
I1120 15:23:03.718]     message: All Tasks have completed executing
I1120 15:23:03.718]     reason: Succeeded
I1120 15:23:03.718]     status: "True"
I1120 15:23:03.718]     type: Succeeded
# […]
I1120 15:23:03.758] --- FAIL: TestHelmDeployPipelineRun (329.85s)
I1120 15:23:03.758] 	helm_task_test.go:177: Image to be pusblished: gcr.io/knative-boskos-09/kbuild-pipeline-e2e-img/go-helloworld-image-sueovuam
I1120 15:23:03.758] 	helm_task_test.go:141: Error from pinging service IP 35.239.144.181 : timed out waiting for the condition

Looking at that error (and the object above that log), it feels like it's flakey 🤔

/test pull-knative-build-pipeline-integration-tests

@@ -68,8 +68,7 @@ type TaskSpec struct {

// TaskStatus defines the observed state of Task
type TaskStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
// Important: Run "./hack/update-codegen.sh" to regenerate code after modifying this file
Copy link
Collaborator

Choose a reason for hiding this comment

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

🙏 thank you!

Copy link
Collaborator

Choose a reason for hiding this comment

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

p.s. really appreciate your attention to detail cleaning up lots of comments and docs @vdemeester !!! ❤️

state := build.Status.StepStates[i]
tr.Status.Steps = append(tr.Status.Steps, v1alpha1.StepState{
ContainerState: *state.DeepCopy(),
// FIXME(vdemeester) logsURL
Copy link
Collaborator

Choose a reason for hiding this comment

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

if this is something you intend to fix in a further PR can you add a bit more detail about what needs to happen here?

if you plan to fix it in this PR just ignore me :D

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah right, I should add more context to this… So there is a LogsURL field in the StepState (previously StepRun), which was not populate (and still is not). That's why the FIXME here, to not forget… but really, to not forget we shoul create an issue, not a comment 😝

Copy link
Collaborator

@bobcatfish bobcatfish left a comment

Choose a reason for hiding this comment

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

I have strong feelings about moving the test logic down a level, into a unit test and out of the reconciler test.

Thanks so much for taking this on!!

@vdemeester
Copy link
Member Author

I have strong feelings about moving the test logic down a level, into a unit test and out of the reconciler test.

Yes, definitely agree on that 🙌 This needs refactoring, and I'll do the refactoring in the PR very shortly 😉

@vdemeester
Copy link
Member Author

/test pull-knative-build-pipeline-integration-tests

@nader-ziada
Copy link
Member

everything looking good @vdemeester but I don't know why the helm test in so flakey for you, I didn't have any trouble with it before

/test pull-knative-build-pipeline-integration-tests

@vdemeester
Copy link
Member Author

I think there is currently some issue with gcr.io (at least I have some from my network)

@nader-ziada
Copy link
Member

/test pull-knative-build-pipeline-integration-tests

Copy link
Member

@nader-ziada nader-ziada left a comment

Choose a reason for hiding this comment

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

All the comments so far have been addressed. Thanks @vdemeester

/approve
/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2018
@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pivotal-nader-ziada, 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:
  • OWNERS [pivotal-nader-ziada]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2018
@nader-ziada
Copy link
Member

@vdemeester looks like you might have to rebase

@vdemeester
Copy link
Member Author

@pivotal-nader-ziada oh boy 😅 Will do :)

Updates TaskRunStatus to have the BuildStatus fields (non-deprecated
ones) and populate them from the scheduled build status.

Signed-off-by: Vincent Demeester <[email protected]>
Extract updating the TaskRunStatus from reconcile so we can test it in isolation.

Signed-off-by: Vincent Demeester <[email protected]>
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2018
@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-build-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/v1alpha1/taskrun/taskrun.go 72.6% 74.4% 1.9

@nader-ziada
Copy link
Member

Thanks @vdemeester

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2018
@knative-prow-robot knative-prow-robot merged commit c42258c into tektoncd:master Nov 22, 2018
@vdemeester vdemeester deleted the 236-taskrunstatus branch November 22, 2018 14:59
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.

6 participants