Skip to content

Commit

Permalink
fix dbgc
Browse files Browse the repository at this point in the history
  • Loading branch information
haiqingchq committed Dec 4, 2024
1 parent efc671b commit 1ac206f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/tools/pipeline/providers/dbgc/dbgc.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ func (p *provider) doPipelineDatabaseGC(ctx context.Context, req *pb.PipelinePag

func needArchive(p spec.Pipeline) bool {
// ensure gc filed is not none
p.EnsureGC()
if p.Extra.GC.DatabaseGC == nil {
return true
}

Check warning on line 98 in internal/tools/pipeline/providers/dbgc/dbgc.go

View check run for this annotation

Codecov / codecov/patch

internal/tools/pipeline/providers/dbgc/dbgc.go#L97-L98

Added lines #L97 - L98 were not covered by tests
if p.Status == apistructs.PipelineStatusAnalyzed {
if *p.Extra.GC.DatabaseGC.Analyzed.NeedArchive != false {
return *p.Extra.GC.DatabaseGC.Analyzed.NeedArchive
Expand Down

0 comments on commit 1ac206f

Please sign in to comment.