Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package utils

import (
"context"
"errors"
"fmt"
"strings"
"time"
Expand Down Expand Up @@ -63,16 +62,14 @@ func NewStandaloneEngine(
workflowSettingsCfgFn func(*cresettings.Workflows),
) (services.Service, []*sdkpb.TriggerSubscription, error) {
ctx = contexts.WithCRE(ctx, contexts.CRE{Owner: defaultOwner, Workflow: defaultWorkflowID})
labeler := custmsg.NewLabeler()
moduleConfig := &host.ModuleConfig{
Logger: lggr,
Labeler: labeler,
MaxCompressedBinarySize: defaultMaxUncompressedBinarySize,
IsUncompressed: true,
Timeout: &defaultTimeout,
}

mainModule, err := host.NewModule(ctx, moduleConfig, binary, host.WithDeterminism())
mainModule, err := host.NewModule(ctx, moduleConfig, binary)
if err != nil {
return nil, nil, fmt.Errorf("unable to create module from config: %w", err)
}
Expand Down Expand Up @@ -130,10 +127,6 @@ func NewStandaloneEngine(
billingClient, _ = billing.NewWorkflowClient(lggr, billingClientAddr, clientOpts...)
}

if module.IsLegacyDAG() {
return nil, nil, errors.New("legacy DAG workflows are not supported")
}

secretsFetcher, err := NewFileBasedSecrets(secrets)
if err != nil {
return nil, nil, err
Expand Down
12 changes: 2 additions & 10 deletions core/services/workflows/syncer/v2/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -852,12 +852,8 @@ func (h *eventHandler) engineFactoryFn(ctx context.Context, workflowID, owner st
lggr := logger.Named(h.lggr, "WorkflowEngine.Module")
lggr = logger.With(lggr, "workflowID", workflowID, "workflowName", name, "workflowOwner", owner)
var sdkName string
h.emitterMu.RLock()
labeler := h.emitter
h.emitterMu.RUnlock()
moduleConfig := &host.ModuleConfig{
Logger: lggr,
Labeler: labeler,
MemoryLimiter: h.engineLimiters.WASMMemorySize,
MaxCompressedBinaryLimiter: h.engineLimiters.WASMCompressedBinarySize,
MaxDecompressedBinaryLimiter: h.engineLimiters.WASMBinarySize,
Expand All @@ -878,17 +874,13 @@ func (h *eventHandler) engineFactoryFn(ctx context.Context, workflowID, owner st

h.lggr.Debugw("Creating module for workflowID", "workflowID", workflowID)

module, err := host.NewModule(ctx, moduleConfig, binary, host.WithDeterminism())
module, err := host.NewModule(ctx, moduleConfig, binary)
if err != nil {
return nil, err
}

h.lggr.Debugw("Finished creating module for workflowID", "workflowID", workflowID)

if module.IsLegacyDAG() { // V1 aka "DAG"
return nil, errors.New("legacy DAG workflows are not supported")
}

// V2 aka "NoDAG"
// Wrap the local WASM module in a RequirementSelectingModule that routes
// triggers with a TEE requirement to the ConfidentialModule (which delegates
Expand Down Expand Up @@ -965,7 +957,7 @@ func (h *eventHandler) createEngineModule(
if storeErr != nil {
h.lggr.Warnw("Failed to cache module binary to disk, LRU eviction disabled for this workflow", "workflowID", workflowID, "err", storeErr)
} else {
evictable := NewEvictableModule(module, moduleConfig, h.moduleStore, workflowID, h.moduleEngineVersion, nil, h.cacheMetrics, int64(len(binary)), host.WithDeterminism())
evictable := NewEvictableModule(module, moduleConfig, h.moduleStore, workflowID, h.moduleEngineVersion, nil, h.cacheMetrics, int64(len(binary)))
h.moduleLRU.Register(workflowID, evictable)
engineModule = evictable
}
Expand Down
Loading