Skip to content

Commit 7437301

Browse files
authored
Merge branch 'develop' into poc/fs_layout
2 parents c1c9222 + 83309fa commit 7437301

13 files changed

Lines changed: 2273 additions & 743 deletions

File tree

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ repos:
77
entry: "pre-commit-scripts/runner.sh"
88
language: script
99
stages: ["pre-commit", "pre-push"]
10+
- repo: local
11+
hooks:
12+
- id: post-commit
13+
name: Post Commit
14+
description: Run post-commit scripts.
15+
entry: "post-commit-scripts/runner.sh"
16+
language: script
17+
stages: ["post-commit"]
18+
always_run: true
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package activity
2+
3+
import "context"
4+
5+
// GlobalActivityOutputs maps each action name to a list of its result maps.
6+
// {"noop.log": [{"logged": "hello"}, {"logged": "world"}], "noop.echo": [...]}
7+
type GlobalActivityOutputs map[string][]map[string]interface{}
8+
9+
// ActivityInput is the generic input passed to all activities.
10+
type ActivityInput struct {
11+
Action string `json:"action"`
12+
Params map[string]interface{} `json:"params"`
13+
StepName string `json:"step_name"`
14+
WorkflowExecutionId string `json:"workflow_execution_id"`
15+
Async bool `json:"async"`
16+
PluginVersion string `json:"plugin_version"`
17+
StepId string `json:"step_id,omitempty"`
18+
// Attempt is the 1-based Temporal activity attempt number for this invocation.
19+
// Async plugins must include this in the payload they send to the external system
20+
// so that callbacks can be routed back to the exact attempt that triggered the work.
21+
Attempt int `json:"attempt,omitempty"`
22+
// Config holds plugin-specific configuration injected from etcd at call time.
23+
// Plugins should read environment-specific values from here instead of os.Getenv,
24+
// so that config can be updated in etcd without redeploying the orchestrator.
25+
Config map[string]string `json:"config,omitempty"`
26+
}
27+
28+
// ActivityOutput is the generic output returned by all activities.
29+
type ActivityOutput struct {
30+
Result map[string]interface{} `json:"result,omitempty"`
31+
Error string `json:"error,omitempty"`
32+
}
33+
34+
// ActivityFunc is the function signature that every registered activity must implement.
35+
type ActivityFunc func(ctx context.Context, globalOutputs GlobalActivityOutputs, input ActivityInput) (ActivityOutput, error)

core/activity-contracts/go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/Meesho/BharatMLStack/core/activity-contracts
2+
3+
go 1.25.6

0 commit comments

Comments
 (0)