Skip to content
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

docs: Add comments to NodePhase definition. Closes #1117. #3467

Merged
merged 17 commits into from Jul 15, 2020
Merged
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 15 additions & 6 deletions pkg/apis/workflow/v1alpha1/workflow_types.go
Expand Up @@ -35,13 +35,22 @@ type NodePhase string

// Workflow and node statuses
const (
NodePending NodePhase = "Pending"
NodeRunning NodePhase = "Running"
// Node is waiting to run
NodePending NodePhase = "Pending"
// Node is running
NodeRunning NodePhase = "Running"
// Node finished with no errors
NodeSucceeded NodePhase = "Succeeded"
NodeSkipped NodePhase = "Skipped"
NodeFailed NodePhase = "Failed"
NodeError NodePhase = "Error"
NodeOmitted NodePhase = "Omitted"
// Node was skipped
NodeSkipped NodePhase = "Skipped"
// There was an error within the container. E.g. the container exits with a non 0 code
Copy link
Member

Choose a reason for hiding this comment

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

It's not standard to put a docstring below its definition. If it doesn't fit on the same line then all of the docstrings for this type should be above their definitions

Copy link
Member

Choose a reason for hiding this comment

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

I would simply say "Node or child of node exited with non-0 code"

Copy link
Member

Choose a reason for hiding this comment

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

I would simply say "Node or child of node exited with non-0 code"

This doesn't look addressed

// a WF with a failed Node will be marked with NodeFailed as well
NodeFailed NodePhase = "Failed"
// Node had an error other than a non 0 exit code. E.g. The pod was deleted, couldn’t be scheduled, or there were problems getting logs
Copy link
Member

Choose a reason for hiding this comment

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

I would simply say "Node had an error other than a non-0 exit code"

This doesn't look addressed

// a WF with an errored Node will be marked with NodeError as well
NodeError NodePhase = "Error"
// Node was omitted because its `depends` condition was not met (only relevant in DAGs)
NodeOmitted NodePhase = "Omitted"
)

// NodeType is the type of a node
Expand Down