Skip to content

Commit cc0a8db

Browse files
authored
feat: expose stepId on context (#1169)
* feat: expose stepId on context * fix: test context
1 parent 08356f8 commit cc0a8db

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

pkg/worker/context.go

+6
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ type HatchetContext interface {
4949

5050
StepRunId() string
5151

52+
StepId() string
53+
5254
WorkflowRunId() string
5355

5456
Log(message string)
@@ -208,6 +210,10 @@ func (h *hatchetContext) StepRunId() string {
208210
return h.a.StepRunId
209211
}
210212

213+
func (h *hatchetContext) StepId() string {
214+
return h.a.StepId
215+
}
216+
211217
func (h *hatchetContext) WorkflowRunId() string {
212218
return h.a.WorkflowRunId
213219
}

pkg/worker/middleware_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ func (c *testHatchetContext) StepRunId() string {
5555
panic("not implemented")
5656
}
5757

58+
func (c *testHatchetContext) StepId() string {
59+
panic("not implemented")
60+
}
61+
5862
func (c *testHatchetContext) WorkflowRunId() string {
5963
panic("not implemented")
6064
}

0 commit comments

Comments
 (0)