Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

#patch: Add in task execution event fields #119

Merged
merged 13 commits into from
Mar 18, 2021
Merged

#patch: Add in task execution event fields #119

merged 13 commits into from
Mar 18, 2021

Conversation

katrogan
Copy link
Contributor

Signed-off-by: Katrina Rogan [email protected]

TL;DR

Add in task execution event fields

  • Add phase reason and task type to TaskExecutionEvent
  • Add generated_name to TaskExecutionMetadata
  • Add a ManagedResourceInfo message for capturing resource token name (and future FRM attributes)

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

How did you fix the bug, make the feature etc. Link to any design docs etc

Tracking Issue

flyteorg/flyte#325

Follow-up issue

NA

string generated_name = 1;

// Includes information about how resource token allocation (if applicable).
ManagedResourceInfo managed_resource_info = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be repeated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

perhaps i'm misunderstanding but isn't this only determined once per execution?

Copy link
Contributor

Choose a reason for hiding this comment

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

A plugin can request multiple resource allocations during execution... our plugins only request one resource at most because we didn't need more... but the API allows plugins to request more

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@EngHabu got it, thanks. updated

protos/flyteidl/event/event.proto Outdated Show resolved Hide resolved
protos/flyteidl/event/event.proto Outdated Show resolved Hide resolved
Signed-off-by: Katrina Rogan <[email protected]>
Signed-off-by: Katrina Rogan <[email protected]>
Signed-off-by: Katrina Rogan <[email protected]>
@katrogan katrogan changed the title Add in task execution event fields Feat: Add in task execution event fields Mar 16, 2021
@katrogan katrogan changed the title Feat: Add in task execution event fields Patch: Add in task execution event fields Mar 16, 2021
@katrogan katrogan changed the title Patch: Add in task execution event fields #Patch: Add in task execution event fields Mar 16, 2021
@EngHabu EngHabu changed the title #Patch: Add in task execution event fields #patch: Add in task execution event fields Mar 16, 2021
EngHabu
EngHabu previously approved these changes Mar 16, 2021
// executions for a project namespace.
message ManagedResourceInfo {
// Unique resource ID used to identify this execution when allocating a token.
string token = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we call this allocation_token ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure done @EngHabu

Signed-off-by: Katrina Rogan <[email protected]>
EngHabu
EngHabu previously approved these changes Mar 16, 2021
@@ -167,4 +187,11 @@ message TaskExecutionMetadata {
INTERRUPTIBLE = 1;
}
InstanceClass instance_class = 16;

// Generated unique name for this task execution used by the backend.
string generated_name = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

should we call it resource_name?
As for Qubole/AWS Batch etc, it may not be the generated_name?
Or we can have both - but that is confusing!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Katrina Rogan <[email protected]>
Signed-off-by: Katrina Rogan <[email protected]>
@@ -151,10 +151,40 @@ message TaskExecutionEvent {
// The version field should be incremented when metadata changes across the duration of an individual phase.
uint32 phase_version = 12;

// If there is an explanation for this phase transition, the reason will capture it.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// If there is an explanation for this phase transition, the reason will capture it.
// An optional explanation for the phase transition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

// A predefined yet extensible Task type identifier. If the task definition is already registered in flyte admin
// this type will be identical, but not all task executions necessarily use pre-registered definitions and this
// type is useful to render the task in the UI, filter task executions, etc.
string task_type = 14;
Copy link
Contributor

Choose a reason for hiding this comment

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

should we also add the actual execution plugin-ID used?

Signed-off-by: Katrina Rogan <[email protected]>
@@ -167,4 +197,14 @@ message TaskExecutionMetadata {
INTERRUPTIBLE = 1;
}
InstanceClass instance_class = 16;

// Contains various identifiers for resources used during execution.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we order them by the field id? sorry!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kumare3 done

Signed-off-by: Katrina Rogan <[email protected]>
Signed-off-by: Katrina Rogan <[email protected]>
Signed-off-by: Katrina Rogan <[email protected]>
@katrogan
Copy link
Contributor Author

friendly ping @EngHabu @kumare3

// Holds metadata around how a task was executed.
// TODO(katrogan): Extend to include freeform fields (https://github.com/flyteorg/flyte/issues/325).
message TaskExecutionMetadata {

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the todo on the message? indicates task -
flyteorg/flyte#325

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yes good catch, done

// this type will be identical, but not all task executions necessarily use pre-registered definitions and this
// type is useful to render the task in the UI, filter task executions, etc.
string task_type = 14;

Copy link
Contributor

Choose a reason for hiding this comment

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

@katrogan another question, why is task_type / reason not metadata? Maybe a clearer definition in the distinction

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I like the documentation at the beginning of this proto message: Plugin specific execution event information i.e. attributes of the event itself. In this case task_type is an attribute of the execution and reason goes along with phase and phase version as part of the actual event update, right? I see metadata is more for identifying/discerning how a task was executed rather than artifacts or products of the event itself.

Signed-off-by: Katrina Rogan <[email protected]>
kumare3
kumare3 previously approved these changes Mar 17, 2021
Signed-off-by: Katrina Rogan <[email protected]>
@katrogan
Copy link
Contributor Author

one last (?) ping @kumare3 @EngHabu

Copy link
Contributor

@EngHabu EngHabu left a comment

Choose a reason for hiding this comment

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

👍

@katrogan katrogan merged commit f7abcb0 into master Mar 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants