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

Add config override idl #412

Closed
wants to merge 3 commits into from
Closed

Conversation

ByronHsu
Copy link
Contributor

TL;DR

Added idl as discussed in flyteorg/flyte#3553

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

Tracking Issue

flyteorg/flyte#475

byhsu added 2 commits May 28, 2023 12:30
wip
Signed-off-by: byhsu <[email protected]>
@codecov
Copy link

codecov bot commented May 28, 2023

Codecov Report

Merging #412 (ae5579a) into master (9d79003) will increase coverage by 2.57%.
The diff coverage is 100.00%.

❗ Current head ae5579a differs from pull request most recent head b56c1d5. Consider uploading reports for the commit b56c1d5 to get more accurate results

@@            Coverage Diff             @@
##           master     #412      +/-   ##
==========================================
+ Coverage   75.90%   78.48%   +2.57%     
==========================================
  Files          18       18              
  Lines        1457     1250     -207     
==========================================
- Hits         1106      981     -125     
+ Misses        294      212      -82     
  Partials       57       57              
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
clients/go/admin/config_flags.go 61.22% <100.00%> (+3.22%) ⬆️

... and 17 files with indirect coverage changes

Signed-off-by: byhsu <[email protected]>
@@ -249,4 +253,37 @@ message WorkflowTemplate {
message TaskNodeOverrides {
// A customizable interface to convey resources requested for a task container.
Resources resources = 1;

// Boolean that indicates if caching should be enabled
oneof cache_value {
Copy link
Contributor

Choose a reason for hiding this comment

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

For all of these oneofs we can also use google.protobuf.BoolValue, google.protobuf.Int32Value, etc which differentiate between being set and unset in addition to the values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whats the concern of oneof?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's easier to explicitly mark and check for whether a field was intended to be set.

Oneof implies that there may be other flavors/varieties when that's not really the intention, right?

Copy link
Contributor

@katrogan katrogan left a comment

Choose a reason for hiding this comment

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

Since the fields you added to the TaskNodeOverrides are also used in matchable attributes WorkflowExecutionConfig, ExecutionSpec, LaunchPlanSpec and more, could we take this PR as an opportunity to encapsulate all these fields in a well-defined proto message (which we can then embed in TaskNodeOverrides) and in the future hopefully refactor all the existing specs to share as part of a separate GH issue? Currently adding a new execution-type field and understanding the pattern of overrides is onerous so it would be super helpful to establish a singular message/source of truth in this PR we could later migrate to elsewhere

@@ -249,4 +253,37 @@ message WorkflowTemplate {
message TaskNodeOverrides {
// A customizable interface to convey resources requested for a task container.
Resources resources = 1;

// Boolean that indicates if caching should be enabled
oneof cache_value {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's easier to explicitly mark and check for whether a field was intended to be set.

Oneof implies that there may be other flavors/varieties when that's not really the intention, right?

@ByronHsu ByronHsu closed this Sep 11, 2023
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