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
Events #315
Events #315
Conversation
migration, | ||
v1.EventTypeNormal, | ||
migration.Status.Phase, | ||
"Step completed.") |
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.
I wonder whether it might be better to use a message more specific to the step in question (i.e. "Step 2 of 22 completed") You could use task.getStep() to pull the number information out, although you'd have to be careful to get the numbers for the last-completed step rather than the step that's just beginning.
@jortel @jwmatthews It is a common practice to use events for testing controllers. If improvements on a test coverage for mig-controller are still relevant, this PR may be of additional help for some reasons:
|
Added |
Having event info could be quite helpful from a debugging perspective, I'd could see us adding events to our must-gather and extracting a good amount of information if our controller is emitting these at key points in the migration. Edit: The way that events are laid out in the example provided above makes it look like it would give the user an effective overview of which stages of the migration were consuming a lot of time to complete, and might make it plain where an anomaly is occuring. |
Closing due to inactivity, please re-open if desired. |
Add support for events in the controller(s).
Based on documentation and examples (pods), an
Event
seems to be intended to provide additional information about what the happening with a resource. This may be different than conditions in that although events are garbage collected, conditions can be transient and only represent the current status of the resource. Events also include a count and first/last occurrence times. So, an event may provide the user with more insight even though there may be a similar condition. Most of the events I have in this prototype feel a bit redundant with conditions but seem helpful? I'm really not sure. We have a very rich set of conditions so perhaps a completely different set of events then prototyped here would be more helpful?This PR is mainly to promote discussion. Thoughts?
Also considering events for:
Examples:
$ oc describe migcluster host
$ oc describe migplan test
$ oc describe migmigration test
$ oc describe migmigration test