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

Remove LiteralTypeForLiteral by creating IsInstance function #5909

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Mecoli1219
Copy link
Contributor

@Mecoli1219 Mecoli1219 commented Oct 24, 2024

Tracking issue

#5908

Why are the changes needed?

The current Tuple IDL design is complicated by this function since if we want to guess the LiteralType from Literal, we have to store the name of the tuple and the name of each field inside the tuple in the Literal.

However, guessing the LiteralType is not necessary for Flyte since whenever we create a new literal, there must be a target type (maybe inputs or outputs, but they will always have a defined type). Also, almost all use cases of LiteralTypeForLiteral are followed by a function AreTypesCastable, we could simply combine these two functions into a function determining whether a Literal could be instantiated by a LiteralType. It is really similar to isinstance() function in Python.

What changes were proposed in this pull request?

  • I created an IsInstance() for the flytepropeller to check whether a Literal could be represented by a LiteralType.
  • Remove LiteralTypeForLiteral and update all necessary code in FlyteAdmin & FlytePropeller.
  • Update the unit tests
    • Change unit tests for LiteralTypeForLiteral to IsInstance
    • Update the error message for other cases.

How was this patch tested?

  • Unit testing
  • Built and run some Flytekit test

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Additional Concerns

Someone suggested that we shouldn't merge this PR before the release

Summary by Bito

This PR implements a significant change in Flyte's type checking system by replacing LiteralTypeForLiteral with IsInstance function. The changes involve refactoring the array handler's type checking mechanism in FlytePropeller, focusing on outputLiteralTypes initialization and collection type assignments. The modification simplifies type checking logic and removes the need to guess LiteralTypes from Literals, while adding safety checks for map key existence. These changes affect both FlyteAdmin and FlytePropeller components.

Unit tests added: True

Estimated effort to review (1-5, lower is better): 5

Signed-off-by: Mecoli1219 <michaellai901026@gmail.com>
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 37.77778% with 112 lines in your changes missing coverage. Please review.

Project coverage is 36.96%. Comparing base (b010747) to head (01d4bec).

Files with missing lines Patch % Lines
flytepropeller/pkg/compiler/validators/utils.go 30.00% 97 Missing and 8 partials ⚠️
...tepropeller/pkg/compiler/errors/compiler_errors.go 0.00% 6 Missing ⚠️
...ytepropeller/pkg/controller/nodes/array/handler.go 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5909      +/-   ##
==========================================
- Coverage   37.02%   36.96%   -0.06%     
==========================================
  Files        1317     1317              
  Lines      132523   132564      +41     
==========================================
- Hits        49066    49007      -59     
- Misses      79211    79305      +94     
- Partials     4246     4252       +6     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.21% <100.00%> (-0.04%) ⬇️
unittests-flytecopilot 30.99% <ø> (ø)
unittests-flytectl 62.29% <ø> (ø)
unittests-flyteidl 7.23% <ø> (ø)
unittests-flyteplugins 53.85% <ø> (ø)
unittests-flytepropeller 42.44% <34.88%> (-0.21%) ⬇️
unittests-flytestdlib 55.11% <ø> (-0.07%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Future-Outlier Future-Outlier changed the title [DO NOT MERGE] Remove LiteralTypeForLiteral by creating IsInstance function [WIP][DO NOT MERGE] Remove LiteralTypeForLiteral by creating IsInstance function Oct 24, 2024
Copy link
Member

@Future-Outlier Future-Outlier left a comment

Choose a reason for hiding this comment

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

Can you test every test case be affected in flytekit remote?
and provide screenshot?
I think this function is not well tested by unit test and integration test.

if _, ok := lit.GetValue().(*core.Literal_Collection); !ok {
return false
}
for _, x := range lit.GetCollection().Literals {
Copy link
Member

Choose a reason for hiding this comment

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

If we add the tuple literal type but still represent the literal as a collection, how do we check if this collection is a tuple or not

Copy link
Contributor Author

@Mecoli1219 Mecoli1219 Nov 7, 2024

Choose a reason for hiding this comment

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

The type of Literal for tuple will be Literal_Collection, but the LiteralType won't. We'll have to create another new InstanceChecker (perhaps tupleInstanceChecker) to deal with that.

func IsInstance(lit *core.Literal, t *core.LiteralType) bool {
instanceChecker := getInstanceChecker(t)

if lit.GetOffloadedMetadata() != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

i'd add a condition here to make sure the field is actually present.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry incomplete review... will get back to this later.

Signed-off-by: Mecoli1219 <michaellai901026@gmail.com>
Signed-off-by: Mecoli1219 <michaellai901026@gmail.com>
@Mecoli1219
Copy link
Contributor Author

@Future-Outlier I tested the IsInstance with the flytekit's unit tests and integration tests. I couldn't run eager in my environment, and it is not related to this update. Besides that, all test works successfully.
image
image

Signed-off-by: Mecoli1219 <michaellai901026@gmail.com>
@Mecoli1219 Mecoli1219 changed the title [WIP][DO NOT MERGE] Remove LiteralTypeForLiteral by creating IsInstance function Remove LiteralTypeForLiteral by creating IsInstance function Dec 20, 2024
@Mecoli1219
Copy link
Contributor Author

Updated flytekit Integration test:
image
unit test:
image
image

Signed-off-by: Mecoli1219 <michaellai901026@gmail.com>
@flyte-bot
Copy link
Collaborator

flyte-bot commented Jan 10, 2025

Code Review Agent Run #410df5

Actionable Suggestions - 9
  • flytepropeller/pkg/compiler/validators/utils.go - 5
  • flytepropeller/pkg/controller/nodes/common/utils.go - 1
    • Consider validating config parameters first · Line 106-106
  • flytepropeller/pkg/compiler/validators/utils_test.go - 1
  • flytepropeller/pkg/controller/nodes/array/handler_test.go - 1
  • flytepropeller/pkg/controller/nodes/array/handler.go - 1
Additional Suggestions - 7
  • flyteadmin/pkg/manager/impl/validation/launch_plan_validator.go - 1
  • flyteadmin/pkg/manager/impl/validation/execution_validator.go - 1
    • Consider improving type mismatch error message · Line 103-104
  • flytepropeller/pkg/controller/nodes/common/utils.go - 1
    • Consider early parameter validation for inferredType · Line 106-106
  • flytepropeller/pkg/compiler/validators/bindings_test.go - 3
  • flyteadmin/pkg/manager/impl/validation/validation.go - 1
    • Consider enhancing type mismatch error message · Line 284-287
Review Details
  • Files reviewed - 23 · Commit Range: af0ea73..d21cbfd
    • flyteadmin/pkg/manager/impl/validation/execution_validator.go
    • flyteadmin/pkg/manager/impl/validation/execution_validator_test.go
    • flyteadmin/pkg/manager/impl/validation/launch_plan_validator.go
    • flyteadmin/pkg/manager/impl/validation/launch_plan_validator_test.go
    • flyteadmin/pkg/manager/impl/validation/signal_validator.go
    • flyteadmin/pkg/manager/impl/validation/signal_validator_test.go
    • flyteadmin/pkg/manager/impl/validation/validation.go
    • flyteadmin/pkg/manager/impl/validation/validation_test.go
    • flytepropeller/go.mod
    • flytepropeller/pkg/compiler/errors/compiler_errors.go
    • flytepropeller/pkg/compiler/transformers/k8s/inputs.go
    • flytepropeller/pkg/compiler/transformers/k8s/inputs_test.go
    • flytepropeller/pkg/compiler/validators/bindings_test.go
    • flytepropeller/pkg/compiler/validators/utils.go
    • flytepropeller/pkg/compiler/validators/utils_test.go
    • flytepropeller/pkg/controller/nodes/array/handler.go
    • flytepropeller/pkg/controller/nodes/array/handler_test.go
    • flytepropeller/pkg/controller/nodes/catalog/datacatalog/transformer.go
    • flytepropeller/pkg/controller/nodes/catalog/datacatalog/transformer_test.go
    • flytepropeller/pkg/controller/nodes/common/utils.go
    • flytepropeller/pkg/controller/nodes/common/utils_test.go
    • go.mod
    • go.sum
  • Files skipped - 0
  • Tools
    • Golangci-lint (Linter) - ✖︎ Failed
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

AI Code Review powered by Bito Logo

@flyte-bot
Copy link
Collaborator

flyte-bot commented Jan 10, 2025

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Feature Improvement - Type System Enhancement

execution_validator.go - Simplified input validation using new IsInstance function

launch_plan_validator.go - Updated launch plan validation to use IsInstance

signal_validator.go - Refactored signal validation with IsInstance check

validation.go - Enhanced parameter validation using IsInstance

utils.go - Implemented new IsInstance function and related type checkers

Testing - Test Updates for New Type System

execution_validator_test.go - Updated test error messages for new validation

launch_plan_validator_test.go - Modified test cases for new type checking

signal_validator_test.go - Adjusted signal validation tests

bindings_test.go - Extensive updates to type checking test cases

Other Improvements - Dependency Updates

go.mod - Updated golang.org/x/exp dependency

Feature Improvement - Type System Enhancement

utils.go - Replaced LiteralTypeForLiteral with new IsInstance function and type checkers

transformer.go - Updated artifact validation to use IsInstance instead of type validation

handler.go - Simplified array handling using direct type checking

utils.go - Modified literal offloading to use provided type information

Testing - Test Updates for Type System Changes

utils_test.go - Converted type inference tests to instance checking tests

transformer_test.go - Updated error messages and test cases for new validation

handler_test.go - Modified error handling test cases

utils_test.go - Updated literal offloading tests with explicit type information

Other Improvements - Dependency Management

go.mod - Added new dependencies including flytectl and various UI/terminal related packages

go.sum - Updated checksums for new dependencies

Feature Improvement - Type System Enhancement

execution_validator.go - Simplified input validation using new IsInstance function

launch_plan_validator.go - Updated launch plan validation to use IsInstance

signal_validator.go - Refactored signal validation with IsInstance check

validation.go - Enhanced parameter validation using IsInstance

utils.go - Implemented new IsInstance function and related type checkers

transformer.go - Updated artifact validation to use IsInstance

handler.go - Simplified array handling using direct type checking

utils.go - Modified literal offloading to use provided type information

Testing - Test Coverage Updates

execution_validator_test.go - Updated test error messages for new validation

launch_plan_validator_test.go - Modified test cases for new type checking

signal_validator_test.go - Adjusted signal validation tests

bindings_test.go - Extensive updates to type checking test cases

utils_test.go - Converted type inference tests to instance checking tests

transformer_test.go - Updated error messages and test cases

handler_test.go - Modified error handling test cases

utils_test.go - Updated literal offloading tests

Other Improvements - Dependency Management

go.mod - Added new dependencies including flytectl and UI packages

go.sum - Updated dependency checksums and versions

go.mod - Updated golang.org/x/exp dependency

Comment on lines +220 to +221
if lit == nil {
return true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider additional nil check for GetScalar

Consider handling the case where lit.GetScalar() is called after checking lit == nil. If lit is not nil but lit.GetScalar() returns nil, this could lead to a nil pointer dereference in line 223.

Code suggestion
Check the AI-generated fix before applying
 	}
 +	scalar := lit.GetScalar()
 +	if scalar == nil {
 +		return false
 +	}
 -	_, ok := lit.GetScalar().GetValue().(*core.Scalar_NoneType)
 +	_, ok := scalar.GetValue().(*core.Scalar_NoneType)

Code Review Run #410df5


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

Comment on lines +247 to +253
func (t mapInstanceChecker) isInstance(lit *core.Literal) bool {
if _, ok := lit.GetValue().(*core.Literal_Map); !ok {
return false
}
for _, x := range lit.GetMap().GetLiterals() {
if !IsInstance(x, t.literalType.GetMapValueType()) {
return false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider nil check for map literals

Consider adding validation for nil map literals in isInstance(). Currently, a nil map would cause a panic when accessing GetMap().GetLiterals().

Code suggestion
Check the AI-generated fix before applying
 @@ -247,6 +247,10 @@ func (t mapInstanceChecker) isInstance(lit *core.Literal) bool {
 	if _, ok := lit.GetValue().(*core.Literal_Map); !ok {
 		return false
 	}
 +	if lit.GetMap() == nil {
 +		return false
 +	}
 +
 	for _, x := range lit.GetMap().GetLiterals()

Code Review Run #410df5


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

Comment on lines +288 to +289
}
scalar := lit.GetScalar()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider nil check for offloaded metadata

Consider handling the case where GetOffloadedMetadata() returns nil before accessing GetInferredType() to avoid potential nil pointer dereference.

Code suggestion
Check the AI-generated fix before applying
 @@ -288,2 +288,6 @@
 +	case *core.Literal_OffloadedMetadata:
 +		if l.GetOffloadedMetadata() != nil {
 +			return l.GetOffloadedMetadata().GetInferredType()
 +		}
 +		return nil

Code Review Run #410df5


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

Comment on lines +275 to +276
return true
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider additional schema type validation

Consider adding validation for v.StructuredDataset.GetMetadata().GetStructuredDatasetType() before returning true. The current implementation may allow invalid schema types.

Code suggestion
Check the AI-generated fix before applying
Suggested change
return true
}
return t.literalType.GetSchema() == nil
}
if v.StructuredDataset.GetMetadata().GetStructuredDatasetType() == nil {
return t.literalType.GetSchema() == nil
}

Code Review Run #410df5


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

Comment on lines +366 to +401
func getInstanceChecker(t *core.LiteralType) instanceChecker {
switch t.GetType().(type) {
case *core.LiteralType_CollectionType:
return collectionInstanceChecker{
literalType: t,
}
case *core.Literal_Map:
return &core.LiteralType{
Type: &core.LiteralType_MapValueType{
MapValueType: literalTypeForLiterals(maps.Values(l.GetMap().GetLiterals())),
},
case *core.LiteralType_MapValueType:
return mapInstanceChecker{
literalType: t,
}
case *core.LiteralType_Blob:
return blobInstanceChecker{
literalType: t,
}
case *core.LiteralType_Schema:
return schemaInstanceChecker{
literalType: t,
}
case *core.LiteralType_UnionType:
return unionInstanceChecker{
literalType: t,
}
case *core.LiteralType_StructuredDatasetType:
return structuredDatasetInstanceChecker{
literalType: t,
}
default:
if isNoneType(t) {
return noneInstanceChecker{}
}

return trivialInstanceChecker{
literalType: t,
}
case *core.Literal_OffloadedMetadata:
return l.GetOffloadedMetadata().GetInferredType()
}
return nil
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider handling unknown literal types appropriately

Consider adding error handling for unknown literal types in getInstanceChecker. Currently, it returns a trivialInstanceChecker as default which may not be appropriate for all unknown types.

Code suggestion
Check the AI-generated fix before applying
 -
 +		// Validate if type is supported
 +		if !isSupportedType(t) {
 +			panic(fmt.Sprintf("unsupported literal type: %v", t))
 +		}
  		return trivialInstanceChecker{
  			literalType: t,
  		}

Code Review Run #410df5


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

@@ -104,7 +103,7 @@ func ReadLargeLiteral(ctx context.Context, datastore *storage.DataStore,

// OffloadLargeLiteral offloads the large literal if meets the threshold conditions
func OffloadLargeLiteral(ctx context.Context, datastore *storage.DataStore, dataReference storage.DataReference,
toBeOffloaded *idlcore.Literal, literalOffloadingConfig config.LiteralOffloadingConfig) error {
toBeOffloaded *idlcore.Literal, inferredType *idlcore.LiteralType, literalOffloadingConfig config.LiteralOffloadingConfig) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider validating config parameters first

Consider validating the literalOffloadingConfig parameter before using it in the function. The function uses configuration values without validating if they are valid (e.g. MinSizeInMBForOffloading should not be negative).

Code suggestion
Check the AI-generated fix before applying
 @@ -106,6 +106,11 @@
  toBeOffloaded *idlcore.Literal, inferredType *idlcore.LiteralType, literalOffloadingConfig config.LiteralOffloadingConfig) error {
 +    if literalOffloadingConfig.MinSizeInMBForOffloading < 0 || literalOffloadingConfig.MaxSizeInMBForOffloading < 0 {
 +        return fmt.Errorf("invalid offloading config: min/max sizes cannot be negative")
 +    }
 +    if literalOffloadingConfig.MinSizeInMBForOffloading > literalOffloadingConfig.MaxSizeInMBForOffloading {
 +        return fmt.Errorf("invalid offloading config: min size cannot be greater than max size")
 +    }
      literalSizeBytes := int64(proto.Size(toBeOffloaded))

Code Review Run #410df5


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

lt := LiteralTypeForLiteral(literals)

assert.True(t, proto.Equal(expectedLt, lt))
assert.True(t, IsInstance(literals, expectedLt))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider using proto.Equal for comparison

Consider using proto.Equal() for comparing protobuf messages instead of IsInstance(). proto.Equal() is the recommended way to compare protobuf messages for equality as it handles all protobuf specific comparison edge cases.

Code suggestion
Check the AI-generated fix before applying
 -		assert.True(t, IsInstance(literals, expectedLt))
 +		assert.True(t, proto.Equal(LiteralTypeForLiteral(literals), expectedLt))
 @@ -379,1 +379,1 @@
 -		assert.True(t, IsInstance(literals, expectedLt))
 +		assert.True(t, proto.Equal(LiteralTypeForLiteral(literals), expectedLt))
 @@ -419,1 +419,1 @@
 -		assert.True(t, IsInstance(literals, expectedLt))
 +		assert.True(t, proto.Equal(LiteralTypeForLiteral(literals), expectedLt))

Code Review Run #410df5


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

Comment on lines +1026 to +1027
expectedErrorCode: errors.InvalidArrayLength,
expectedContainedErrorMsg: "no input array provided",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Error code mismatch with test scenario

The error code and message have been changed from IDLNotFoundErr with message "Failed to validate literal type" to InvalidArrayLength with message "no input array provided". Consider if this change aligns with the actual error scenario being tested. Similar issues were also found in:

  • flytepropeller/pkg/compiler/transformers/k8s/inputs.go (line 38-39)
  • flytepropeller/pkg/controller/nodes/catalog/datacatalog/transformer.go (line 56-57)
Code suggestion
Check the AI-generated fix before applying
Suggested change
expectedErrorCode: errors.InvalidArrayLength,
expectedContainedErrorMsg: "no input array provided",
expectedErrorCode: errors.IDLNotFoundErr,
expectedContainedErrorMsg: "Failed to validate literal type",

Code Review Run #410df5


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

@@ -595,7 +593,7 @@ func (a *arrayNodeHandler) Handle(ctx context.Context, nCtx interfaces.NodeExecu
// use the OffloadLargeLiteralKey to create {OffloadLargeLiteralKey}_offloaded_metadata.pb file in the datastore.
// Update the url in the outputLiteral with the offloaded url and also update the size of the literal.
offloadedOutputFile := v1alpha1.GetOutputsLiteralMetadataFile(outputLiteralKey, nCtx.NodeStatus().GetOutputDir())
if err := common.OffloadLargeLiteral(ctx, nCtx.DataStore(), offloadedOutputFile, outputLiteral, a.literalOffloadingConfig); err != nil {
if err := common.OffloadLargeLiteral(ctx, nCtx.DataStore(), offloadedOutputFile, outputLiteral, outputLiteralTypes[outputLiteralKey], a.literalOffloadingConfig); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider map key validation

Consider adding validation for outputLiteralTypes[outputLiteralKey] to ensure the map access is safe. The code assumes the key exists in the map which could lead to a panic if the key is missing.

Code suggestion
Check the AI-generated fix before applying
Suggested change
if err := common.OffloadLargeLiteral(ctx, nCtx.DataStore(), offloadedOutputFile, outputLiteral, outputLiteralTypes[outputLiteralKey], a.literalOffloadingConfig); err != nil {
outputType, exists := outputLiteralTypes[outputLiteralKey]
if !exists {
return fmt.Errorf("output type not found for key %v", outputLiteralKey)
}
if err := common.OffloadLargeLiteral(ctx, nCtx.DataStore(), offloadedOutputFile, outputLiteral, outputType, a.literalOffloadingConfig); err != nil {

Code Review Run #410df5


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

Signed-off-by: Mecoli1219 <michaellai901026@gmail.com>
@flyte-bot
Copy link
Collaborator

flyte-bot commented Jan 10, 2025

Code Review Agent Run #f57dfd

Actionable Suggestions - 1
  • flytepropeller/pkg/controller/nodes/array/handler.go - 1
Review Details
  • Files reviewed - 1 · Commit Range: d21cbfd..01d4bec
    • flytepropeller/pkg/controller/nodes/array/handler.go
  • Files skipped - 0
  • Tools
    • Golangci-lint (Linter) - ✖︎ Failed
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

AI Code Review powered by Bito Logo

Comment on lines +556 to +560
outputLiteralTypes[name] = &idlcore.LiteralType{
Type: &idlcore.LiteralType_CollectionType{
CollectionType: outputs.GetVariables()[name].GetType(),
},
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider adding map key existence check

Consider adding validation to ensure outputs.GetVariables()[name] exists before accessing its type to avoid potential nil pointer dereference.

Code suggestion
Check the AI-generated fix before applying
Suggested change
outputLiteralTypes[name] = &idlcore.LiteralType{
Type: &idlcore.LiteralType_CollectionType{
CollectionType: outputs.GetVariables()[name].GetType(),
},
}
if variable, ok := outputs.GetVariables()[name]; ok {
outputLiteralTypes[name] = &idlcore.LiteralType{
Type: &idlcore.LiteralType_CollectionType{
CollectionType: variable.GetType(),
},
}
}

Code Review Run #f57dfd


Is this a valid issue, or was it incorrectly flagged by the Agent?

  • it was incorrectly flagged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

5 participants