uber-go/cadence-client

panic: getActivityEnv: Not an activity context

longquanzheng opened this issue · 1 comments

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Is the issue reproducible?

  • [Yes | No]

Steps to reproduce the behavior:
A clear and concise description of the reproduce steps.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

time="2021-01-07T19:15:58Z" level=info msg="Recording heartbeat with details [github.com/continualiq/continual/continual/services/management/services.PlanStepActivity.func1_projects/scale5/apply/bvrkj9jf0ji0bgleb330/step/963_5101_hb]"
panic: getActivityEnv: Not an activity context
goroutine 47113 [running]:
go.uber.org/cadence/internal.getActivityEnv(...)
        /home/tylerkohn/go/pkg/mod/go.uber.org/cadence@v0.15.0/internal/internal_activity.go:151
go.uber.org/cadence/internal.RecordActivityHeartbeat(0x2210a60, 0xc00005a028, 0xc009cd3fd0, 0x1, 0x1)
        /home/tylerkohn/go/pkg/mod/go.uber.org/cadence@v0.15.0/internal/activity.go:258 +0x405
go.uber.org/cadence/activity.RecordHeartbeat(...)

probably related to


time="2020-12-15T20:02:49Z" level=info msg="Workflow marked as done" error="context canceled" modelVersion="projects/xxxx/models/assets:signal/versions/bvcgsjni446h9ffoju00"
2020-12-15T20:02:49.463Z        ERROR   internal/internal_task_handlers.go:1821 Activity error. {"Domain": "continualiq-management-domain", "TaskList": "ContinualWF", "WorkerID": 
"1@management-74bd68c8b8-qgb2p@ContinualWF", "WorkflowID": "TrainingWorkflow_projects/xxxx/models/assets:signal/versions/bvcgsjni446h9ffoju00", "RunID": "e3e05ed9-75cd-4041-a08
3-c1083e1f6061", "ActivityType": "github.com/continualiq/continual/continual/services/management/services.waitForTrainingJobCompletionActivity", "error": "context canceled"}
go.uber.org/cadence/internal.(*activityTaskHandlerImpl).Execute
        /home/tylerkohn/go/pkg/mod/go.uber.org/cadence@v0.12.0/internal/internal_task_handlers.go:1821
go.uber.org/cadence/internal.(*activityTaskPoller).ProcessTask
        /home/tylerkohn/go/pkg/mod/go.uber.org/cadence@v0.12.0/internal/internal_task_pollers.go:873
go.uber.org/cadence/internal.(*baseWorker).processTask
        /home/tylerkohn/go/pkg/mod/go.uber.org/cadence@v0.12.0/internal/internal_worker_base.go:302
2020-12-15T20:02:49.472Z        INFO    internal/internal_worker_base.go:307    Task processing failed with error       {"Domain": "continualiq-management-domain", "TaskList": "Co
ntinualWF", "WorkerID": "1@management-74bd68c8b8-qgb2p@ContinualWF", "WorkerType": "ActivityWorker", "error": "EntityNotExistsError{Message: activity task not found}"}

Additional context
Add any other context about the problem here, E.g. Stackstace, workflow history.

Confirmed that there was a bug in the activity code which override the context to a diffrent context