Skip to content

Commit 94ac2dc

Browse files
committed
fix: add FetchDepth to IR for round-trip data preservation
IRJob was missing FetchDepth, so round-tripping through pipeline.json (via pisyn build followed by pisyn graph/run) silently dropped the fetch depth setting. Added the field to IRJob and wired it through jobToIR() and irJobToJob(). Closes #9
1 parent ab0305a commit 94ac2dc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/pisyn/ir.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ type IRJob struct {
6565
Rules []Rule `json:"rules,omitempty"`
6666
Interruptible *bool `json:"interruptible,omitempty"`
6767
Outputs []JobOutput `json:"outputs,omitempty"`
68+
FetchDepth int `json:"fetch_depth"`
6869
}
6970

7071
// Build serializes the App's construct tree to pipeline.json in the given directory.
@@ -141,6 +142,7 @@ func jobToIR(job *Job) IRJob {
141142
Rules: job.Rules,
142143
Interruptible: job.Interruptible,
143144
Outputs: job.OutputList,
145+
FetchDepth: job.FetchDepth,
144146
}
145147
}
146148

@@ -227,5 +229,6 @@ func irJobToJob(irj IRJob) *Job {
227229
Rules: irj.Rules,
228230
Interruptible: irj.Interruptible,
229231
OutputList: irj.Outputs,
232+
FetchDepth: irj.FetchDepth,
230233
}
231234
}

0 commit comments

Comments
 (0)