Trigger status depends on importer status#1849
Conversation
|
/assign @grantr |
|
/test pull-knative-eventing-integration-tests |
|
@capri-xiyue: GitHub didn't allow me to assign the following users: adamharwayne. Note that only knative members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. DetailsIn response to this:
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. |
|
@capri-xiyue: GitHub didn't allow me to assign the following users: adamharwayne. Note that only knative members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. DetailsIn response to this:
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 differentiate the status "False" and "Unknown" by following this doc https://github.com/knative/serving/blob/master/docs/spec/errors.md
|
|
I'm wondering whether we have any restrictions of using third party libraries? I used https://github.com/hashicorp/go-multierror to handle multi error. @grantr |
This sounds like a bug, so yes please create an issue about this @capri-xiyue! |
grantr
left a comment
There was a problem hiding this comment.
I'm excited to see this go in! Thanks @capri-xiyue.
After finishing the review, I think I favor validating the format of the annotation in the webhook, not the reconciler. That simplifies the reconciler since there are fewer error states to worry about. Let me know if you need help getting started with this.
General question: Should a failure to reconcile the dependency's status due to a non-terminal error (like the object doesn't exist, or doesn't have a status) immediately return a reconcile error? The effect of returning immediately is that the Trigger's data plane configuration is never created. I think this might cause data loss. For example:
- Importer created along with Trigger.
- Importer isn't ready. Trigger reconcile returns before creating a Subscription.
- Importer is ready and starts sending events.
- Trigger reconcile creates a Subscription.
Between step 3 and 4, any events sent by the importer will be lost. I think it would be a better experience for the user if we continue reconciling the trigger even if the dependency isn't ready.
What do you think @capri-xiyue?
Co-Authored-By: mattmoor-sockpuppet <mattmoor+sockpuppet@google.com>
Discussed offline with @grantr. When trigger is not ready, user won't have the expectation that they will receive events from trigger, so data loss should not be a problem. But it's good to have trigger reconciled ASAP. So it's better to allow trigger to keep reconciling other dependent resources even when it encounters problems when trying to reconcile some dependent resources. But it should return all errors together in the end and mark reconcile failed. Otherwise, when user try to kubectl describe trigger, it's quite confusing to find "trigger reconciled" logging but trigger status is still not ready. |
Harwayne
left a comment
There was a problem hiding this comment.
Overall looks really good. I think all the logic is mostly correct, just lots of minor comments.
| - apiGroups: | ||
| - "sources.eventing.knative.dev" | ||
| resources: | ||
| - "cronjobsources" |
There was a problem hiding this comment.
Do we need the status subresource as well? E.g.
- cronjobsources
- cronjobsources/status
- containersources
- containersources/status
- apiserversources
- apiserversources/statusThere was a problem hiding this comment.
I think no, because we never write the status.
There was a problem hiding this comment.
Makes sense. Probably worth giving this feedback on #1856, which says they must include the status subresources.
| - "pubsub.cloud.run" | ||
| - "events.cloud.run" | ||
| resources: | ||
| - "pullsubscriptions" |
There was a problem hiding this comment.
Same question about status subresources.
There was a problem hiding this comment.
We don't need to update status. Do we need the status subresources? I did manual testing. It works even without permission of status subresources.
|
The following is the coverage report on pkg/.
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: capri-xiyue, grantr The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Patch the upstream config file to repair or reenable old behavior Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Running 'make RELEASE=v1.4 generate-release' Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Adding check for (legacy) annotations Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
…ative#9012) (knative#1849) Generate test certs dynamically instead of hardcoding them Co-authored-by: Knative Prow Robot <automation+prow-robot@knative.team>
Fixes #1734
Proposed Changes
Release Note