Merge ~troyanov/maas:configure-agent-retry into maas:master

Proposed by Anton Troyanov
Status: Needs review
Proposed branch: ~troyanov/maas:configure-agent-retry
Merge into: maas:master
Diff against target: 54 lines (+2/-7)
3 files modified
src/maasagent/internal/httpproxy/service.go (+1/-2)
src/maasagent/internal/power/service.go (+1/-3)
src/maastemporalworker/workflow/configure.py (+0/-2)
Reviewer Review Type Date Requested Status
MAAS Lander Needs Fixing
MAAS Maintainers Pending
Review via email: mp+465236@code.launchpad.net

Commit message

refactor: use configure-agent global timeout

Use WorkflowExecutionTimeout of configure-agent and let Temporal retry
all the child workflows and activities within this timeout.

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b configure-agent-retry lp:~troyanov/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci.internal:8080/job/maas-tester/5418/console
COMMIT: 08c561d622f7c1ed00bc1776f4794b6ea5ef3e9f

review: Needs Fixing

Unmerged commits

08c561d... by Anton Troyanov

refactor: use configure-agent global timeout

Use WorkflowExecutionTimeout of configure-agent and let Temporal retry
all the child workflows and activities within this timeout.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasagent/internal/httpproxy/service.go b/src/maasagent/internal/httpproxy/service.go
2index f4f694e..246a6b8 100644
3--- a/src/maasagent/internal/httpproxy/service.go
4+++ b/src/maasagent/internal/httpproxy/service.go
5@@ -108,8 +108,7 @@ func (s *HTTPProxyService) Configure(ctx tworkflow.Context, systemID string) err
6 if err := tworkflow.ExecuteActivity(
7 tworkflow.WithActivityOptions(ctx,
8 tworkflow.ActivityOptions{
9- TaskQueue: "region",
10- ScheduleToCloseTimeout: 60 * time.Second,
11+ TaskQueue: "region",
12 }),
13 "get-region-controller-endpoints").
14 Get(ctx, &endpointsResult); err != nil {
15diff --git a/src/maasagent/internal/power/service.go b/src/maasagent/internal/power/service.go
16index b33dd0f..cbb9acf 100644
17--- a/src/maasagent/internal/power/service.go
18+++ b/src/maasagent/internal/power/service.go
19@@ -24,7 +24,6 @@ import (
20 "os/exec"
21 "reflect"
22 "strings"
23- "time"
24
25 "go.temporal.io/sdk/activity"
26 tworker "go.temporal.io/sdk/worker"
27@@ -82,8 +81,7 @@ func (s *PowerService) Configure(ctx tworkflow.Context, systemID string) error {
28 err := tworkflow.ExecuteActivity(
29 tworkflow.WithActivityOptions(ctx,
30 tworkflow.ActivityOptions{
31- TaskQueue: "region",
32- ScheduleToCloseTimeout: 60 * time.Second,
33+ TaskQueue: "region",
34 }),
35 "get-rack-controller-vlans", param).
36 Get(ctx, &vlansResult)
37diff --git a/src/maastemporalworker/workflow/configure.py b/src/maastemporalworker/workflow/configure.py
38index 23d2575..15b12f3 100644
39--- a/src/maastemporalworker/workflow/configure.py
40+++ b/src/maastemporalworker/workflow/configure.py
41@@ -177,7 +177,6 @@ class ConfigureAgentWorkflow:
42 param.system_id,
43 id=f"configure-power-service:{param.system_id}",
44 task_queue=f"{param.system_id}@agent:main",
45- retry_policy=RetryPolicy(maximum_attempts=1),
46 )
47
48 await workflow.execute_child_workflow(
49@@ -185,5 +184,4 @@ class ConfigureAgentWorkflow:
50 param.system_id,
51 id=f"configure-httpproxy-service:{param.system_id}",
52 task_queue=f"{param.system_id}@agent:main",
53- retry_policy=RetryPolicy(maximum_attempts=1),
54 )

Subscribers

People subscribed via source and target branches