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

Use trigger instead of triggerRef #366

Merged
merged 3 commits into from
Jan 4, 2019

Conversation

bobcatfish
Copy link
Collaborator

We use the syntax somethingRef in several fields on our specs because
we want to be able to use ducktyping down the line to switch out other
types (see #238).

However triggerRef is a bit weird because:

  • If the type is manual, there is no actual CRD to reference
  • We don't know what other sorts of types we might need (e.g. when
    created via events)
  • It was inconsistent b/w TaskRun and PipelineRun (TaskRun had an extra
    level of indirection)

This commit applies @sebgoa's suggestion to simplify this to just
trigger.

This was part of the discussion in #320 about simplifying the
interface.

We use the syntax `somethingRef` in several fields on our specs because
we want to be able to use ducktyping down the line to switch out other
types (see tektoncd#238).

However `triggerRef` is a bit weird because:
- If the type is `manual`, there is no actual CRD to reference
- We don't know what other sorts of types we might need (e.g. when
  created via events)
- It was inconsistent b/w TaskRun and PipelineRun (TaskRun had an extra
  level of indirection)

This commit applies @sebgoa's suggestion to simplify this to just
`trigger`.

This was part of the discussion in tektoncd#320 about simplifying the
interfaace.
@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 4, 2019
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 4, 2019
This is consistent with `TaskRun` which also has a `Trigger` field.
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.

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 4, 2019
@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bobcatfish, 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

@bobcatfish
Copy link
Collaborator Author

Looks like the integration tests actually failed for this:

I0104 12:48:05.037] Running tests with 'go test -race -v  -count=1 -tags=e2e -timeout=20m ./test '
W0104 12:48:45.938] # github.com/knative/build-pipeline/test
W0104 12:48:45.938] test/helm_task_test.go:277:19: unknown field 'PipelineTrigger' in struct literal of type "github.com/knative/build-pipeline/pkg/apis/pipeline/v1alpha1".PipelineRunSpec
W0104 12:48:45.939] test/pipelinerun_test.go:466:19: unknown field 'PipelineTrigger' in struct literal of type "github.com/knative/build-pipeline/pkg/apis/pipeline/v1alpha1".PipelineRunSpec
W0104 12:48:45.939] test/pipelinerun_test.go:593:19: unknown field 'PipelineTrigger' in struct literal of type "github.com/knative/build-pipeline/pkg/apis/pipeline/v1alpha1".PipelineRunSpec
I0104 12:48:46.040] FAIL	github.com/knative/build-pipeline/test [build failed]

@vdemeester
Copy link
Member

@bobcatfish ahhhh 😅 that's why some PR failed afterwards 🙃

@bobcatfish
Copy link
Collaborator Author

😅

bobcatfish added a commit to bobcatfish/pipeline that referenced this pull request Jan 8, 2019
In tektoncd#366 I tried to rename the trigger field in a `PipelineRun.Spec` from
`PipelineTrigger` to just `Trigger` to be in line with the similar
`Trigger` field in `TaskRun.Spec` BUT I MISSED SOME OF THEM 😭😭😭

Fixes tektoncd#366
pradeepitm12 pushed a commit to pradeepitm12/pipeline that referenced this pull request Jan 28, 2021
The crashloop is due to 2 reasons:
1. We deprecated and removed the `params` field from the EventListener. So, when the reconciler tries to  unmarshal an old EventListener, it fails since it cannot parse the deleted `params` field.

2. The new event listener sink image expects `/etc/config-logging` to be mounted. However the reconciler code does not add the `volumeMount` for any existing sink deployments. So, the new pods go into a crashloop

To fix this, this commit does the following:
1. Add back the `params` field. Also, update the mutating webhook to delete any set `params` field in existing eventlisteners.
2. Add volumeMount for existing deployments if not present.

- Co-Authored-by: Brandon Walker
Fixes tektoncd#366

Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
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.

3 participants