-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(flink): Describe command for Flink Jobs #758
Conversation
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.
looks great!
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.
This reads great! I only left a few more questions to understand the feature better, but otherwise this is already good to go -- thank you for the super quick iteration! ✨
_ builder.CommandWithSubCommands = (*Job)(nil) | ||
_ builder.CommandWithFeatureFlag = (*Job)(nil) | ||
_ builder.CommandWithHidden = (*Job)(nil) | ||
) | ||
|
||
func (*Job) Usage() string { | ||
return "flink" | ||
return "jobs" |
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.
Thank you for the quick rename here as well!
}, | ||
{ | ||
{Align: simpletable.AlignRight, Text: "Input Streams:"}, | ||
{Text: strings.Join(flinkJob.InputStreams, ", ")}, |
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.
Is this how you can parse a list into a comma-separated string?
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.
yes, this is the standard way to combine a slice of strings. Ilike spew.Sdump formatting for complicated structs, but this slice is simple
}) | ||
} | ||
|
||
if flinkJob.Status.ReconciliationState != "" { |
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.
These guard checks are helpful for filtering out empty values, I'll keep this in mind for future CLI work as well
@@ -85,8 +85,8 @@ func verifyPrintFlinkJobsOutput(t *testing.T, out string, flinkJob *meroxa.Flink | |||
if !strings.Contains(out, flinkJob.UUID) { | |||
t.Errorf("%s, not found", flinkJob.UUID) | |||
} | |||
if !strings.Contains(out, string(flinkJob.Status.State)) { | |||
t.Errorf("state %s, not found", flinkJob.Status.State) | |||
if !strings.Contains(out, string(flinkJob.Status.LifecycleState)) { |
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.
Do I understand it correctly, that for this phase of the work LifecycleState
is the best representation of a flink job's state? Is it, because State
will not be populated for now since the state computation will be implemented in a later stage of the project?
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.
That's our best guess for the time being, and it may change soon. I am looking forward to having one calculated state value, but we just don't know enough to do that yet.
Description of change
Fixes https://github.com/meroxa/turbine-project/issues/289
Type of change
How was this tested?
Demo
Additional references
Documentation updated