Skip to content

feat(flink): Describe command for Flink Jobs - #758

Merged
janelletavares merged 4 commits into
masterfrom
flink-jobs-describe
Jun 1, 2023
Merged

janelletavares merged 4 commits into
masterfrom
flink-jobs-describe

Conversation

@janelletavares

@janelletavares janelletavares commented May 31, 2023 •

Copy link
Copy Markdown
Contributor

Description of change

Fixes https://github.com/meroxa/turbine-project/issues/289

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

How was this tested?

  • Unit Tests
  • Tested in staging
  • Tested in minikube

Demo

Screenshot from 2023-05-31 16-34-50

Additional references

Documentation updated

@samirketema samirketema left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@jayjayjpg jayjayjpg left a comment

Copy link
Copy Markdown
Contributor

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! ✨


func (*Job) Usage() string {
return "flink"
return "jobs"

Copy link
Copy Markdown
Contributor

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, ", ")},

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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 != "" {

Copy link
Copy Markdown
Contributor

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

}
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)) {

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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.

@janelletavares
janelletavares merged commit 265a14c into master Jun 1, 2023
@janelletavares
janelletavares deleted the flink-jobs-describe branch June 1, 2023 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants