-
Notifications
You must be signed in to change notification settings - Fork 263
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
Find sink and ready conditions for untyped source #911
Find sink and ready conditions for untyped source #911
Conversation
Fixes knative#909 - Look up spec.sink field in untyped source unstructured object and try to convert it to duck Destination object - Look up status.conditions field in untyped source unstructured object and try to convert it to duck Conditions object - Upon not finding the data at expected fields, return "<unknown>"
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: navidshaikh 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@navidshaikh: 0 warnings.
In response to this:
Description
[kn source list] Improve extraction of source instance's sink and ready status
Changes
- Look up spec.sink field in untyped source unstructured object and
try to convert it to duck Destination object- Look up status.conditions field in untyped source unstructured object and
try to convert it to duck Conditions object- Upon not finding the data at expected fields, return ""
Example:
Before:
kn source list --type kafkasource NAME TYPE RESOURCE SINK READY k1 KafkaSource kafkasources.sources.knative.dev <unknown> <unknown> mykafkasrc KafkaSource kafkasources.sources.knative.dev <unknown> <unknown> seeder KafkaSource kafkasources.sources.knative.dev <unknown> <unknown>
After:
kn source list --type kafkasource NAME TYPE RESOURCE SINK READY k1 KafkaSource kafkasources.sources.knative.dev svc:event-display True mykafkasrc KafkaSource kafkasources.sources.knative.dev False seeder KafkaSource kafkasources.sources.knative.dev broker:relay True
Reference
Fixes #909
/lint
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please take a look and if you have any comments about the approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lack of testing... See comments. Perhaps not all can be easily covered but we should attempt some if possible. Thank you.
Nice work @navidshaikh. Please update the copyright and otherwise LGTM |
03848b5
to
b5c5d71
Compare
The following is the coverage report on the affected files.
|
/retest Error: Operation cannot be fulfilled on triggers.eventing.knative.dev "filtertrigger": the object has been modified; please apply your changes to the latest version and try again |
/lgtm |
Description
[kn source list] Improve extraction of source instance's sink and ready status
Changes
try to convert it to duck Destination object
try to convert it to duck Conditions object
Example:
Before:
After:
Reference
Fixes #909
/lint