Skip to content

Commit 286f41d

Browse files
FlorentRevestdvyukov
authored andcommitted
pkg/aflow: support setting a custom repository
For situations where the user wants to reproduce bugs against a different repository than mainline.
1 parent 6f1aa2f commit 286f41d

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

pkg/aflow/flow/patching/base_commit.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var baseCommitPicker = aflow.NewFuncAction("base-commit-picker", pickBaseCommit)
1414
type baseCommitArgs struct {
1515
// Can be used to override the selected base commit (for manual testing).
1616
FixedBaseCommit string
17+
FixedRepository string
1718
}
1819

1920
type baseCommitResult struct {
@@ -41,6 +42,9 @@ func pickBaseCommit(ctx *aflow.Context, args baseCommitArgs) (baseCommitResult,
4142
KernelRepo: baseRepo,
4243
KernelCommit: args.FixedBaseCommit,
4344
}
45+
if args.FixedRepository != "" {
46+
res.KernelRepo = args.FixedRepository
47+
}
4448
if args.FixedBaseCommit != "" {
4549
return res, nil
4650
}

pkg/aflow/flow/patching/patching.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ type Inputs struct {
2929

3030
// Use this fixed based kernel commit (for testing/local running).
3131
FixedBaseCommit string
32+
FixedRepository string
3233
}
3334

3435
type Outputs struct {

syz-agent/agent.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ type Config struct {
4747
CacheSize uint64 `json:"cache_size"`
4848
// Use fixed base commit for patching jobs (for testing).
4949
FixedBaseCommit string `json:"fixed_base_commit"`
50+
// Use a different repo than torvalds's mainline.
51+
FixedRepository string `json:"repo"`
5052
// Use this LLM model (for testing, if empty use workflow-default model).
5153
Model string `json:"model"`
5254
}
@@ -231,6 +233,7 @@ func (s *Server) executeJob(ctx context.Context, req *dashapi.AIJobPollResp) (ma
231233
"Type": s.cfg.Type,
232234
"VM": s.cfg.VM,
233235
"FixedBaseCommit": s.cfg.FixedBaseCommit,
236+
"FixedRepository": s.cfg.FixedRepository,
234237
}
235238
maps.Insert(inputs, maps.All(req.Args))
236239
onEvent := func(span *trajectory.Span) error {

0 commit comments

Comments
 (0)