Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: pmahindrakar-oss <[email protected]>
  • Loading branch information
pmahindrakar-oss committed Sep 10, 2024
1 parent 3ee2f0f commit b8a1c4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flytepropeller/pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,14 @@ func New(ctx context.Context, cfg *config.Config, kubeClientset kubernetes.Inter

recoveryClient := recovery.NewClient(adminClient)
nodeHandlerFactory, err := factory.NewHandlerFactory(ctx, launchPlanActor, launchPlanActor,
kubeClient, kubeClientset, catalogClient, recoveryClient, &cfg.EventConfig, cfg.ClusterID, signalClient, scope)
kubeClient, kubeClientset, catalogClient, recoveryClient, &cfg.EventConfig, cfg.LiteralOffloadingConfig, cfg.ClusterID, signalClient, scope)

Check warning on line 439 in flytepropeller/pkg/controller/controller.go

View check run for this annotation

Codecov / codecov/patch

flytepropeller/pkg/controller/controller.go#L439

Added line #L439 was not covered by tests
if err != nil {
return nil, errors.Wrapf(err, "failed to create node handler factory")
}

nodeExecutor, err := nodes.NewExecutor(ctx, cfg.NodeConfig, store, controller.enqueueWorkflowForNodeUpdates, eventSink,
launchPlanActor, launchPlanActor, storage.DataReference(cfg.DefaultRawOutputPrefix), kubeClient,
catalogClient, recoveryClient, &cfg.EventConfig, cfg.ClusterID, signalClient, nodeHandlerFactory, scope)
catalogClient, recoveryClient, cfg.LiteralOffloadingConfig, &cfg.EventConfig, cfg.ClusterID, signalClient, nodeHandlerFactory, scope)

Check warning on line 446 in flytepropeller/pkg/controller/controller.go

View check run for this annotation

Codecov / codecov/patch

flytepropeller/pkg/controller/controller.go#L446

Added line #L446 was not covered by tests
if err != nil {
return nil, errors.Wrapf(err, "Failed to create Controller.")
}
Expand Down
4 changes: 2 additions & 2 deletions flytepropeller/pkg/controller/nodes/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func GetTargetEntity(ctx context.Context, nCtx interfaces.NodeExecutionContext)
// 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 {
literalSizeBytes := uint64(proto.Size(toBeOffloaded))
literalSizeBytes := int64(proto.Size(toBeOffloaded))
literalSizeMB := literalSizeBytes / MB
// check if the literal is large
if literalSizeMB >= literalOffloadingConfig.MaxSizeInMBForOffloading {
Expand Down Expand Up @@ -112,7 +112,7 @@ func OffloadLargeLiteral(ctx context.Context, datastore *storage.DataStore, data
toBeOffloaded.Value = &idlcore.Literal_OffloadedMetadata{
OffloadedMetadata: &idlcore.LiteralOffloadedMetadata{
Uri: dataReference.String(),
SizeBytes: literalSizeBytes,
SizeBytes: uint64(literalSizeBytes),
InferredType: inferredType,
},
}
Expand Down

0 comments on commit b8a1c4e

Please sign in to comment.