补齐空部署目标防护与进度清单

This commit is contained in:
xuans committed 2026-09-30 06:04:54 +08:00
1 parent 9414b5c5d8
commit cb88602882
8 files changed
+77

No files matched your search

+4
View File
@@ -57,6 +57,10 @@ func NewService(factory ClientFactory) *Service {
func (s *Service) Deploy(ctx context.Context, targets []Target, artifact Artifact) Report {
report := Report{Total: len(targets), Results: make([]Result, 0, len(targets))}
if len(targets) == 0 {
report.Status = "failed"
return report
}
if s == nil || s.factory == nil {
report.Status = "failed"
report.Failed = len(targets)