Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ We host the [PipeCD Development and Community Meetings](https://zoom-lfx.platfor

### Join our team on GitHub

We welcome and appreciate your contributions to the PipeCD project. If you would like to continue contributing to the project as a member of the pipe-cd GitHub organization, please attend the [public community meeting](#join-our-public-community-meeting) and let us know or ping us on the #pipecd channel in the CNCF Slack. Here are some minimum requirements to have before you can ask for the membership:
We welcome and appreciate your contributions to the PipeCD project. If you would like to continue contributing to the project as a member of the pipe-cd GitHub organization, please attend the [public community meeting](https://zoom-lfx.platform.linuxfoundation.org/meeting/96831504919?password=2f60b8ec-5896-40c8-aa1d-d551ab339d00) and let us know or ping us on the #pipecd channel in the CNCF Slack. Here are some minimum requirements to have before you can ask for the membership:

- Have at least 5 PRs successfully merged to repositories in the pipe-cd GitHub organization
- Have attended PipeCD public community meeting
Expand Down
15 changes: 15 additions & 0 deletions pkg/app/piped/eventwatcher/eventwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ func (w *watcher) execute(ctx context.Context, repo git.Repo, repoID string, eve
gitUpdateEvent = false
branchHandledEvents = make(map[string][]*pipedservice.ReportEventStatusesRequest_Event, len(eventCfgs))
gitNoChangeEvents = make([]*pipedservice.ReportEventStatusesRequest_Event, 0)
failureEvents = make([]*pipedservice.ReportEventStatusesRequest_Event, 0)
)
for _, e := range eventCfgs {
for _, cfg := range e.Configs {
Expand Down Expand Up @@ -435,6 +436,12 @@ func (w *watcher) execute(ctx context.Context, repo git.Repo, repoID string, eve
zap.String("event-name", latestEvent.Name),
zap.String("event-id", latestEvent.Id),
)
handledEvent := &pipedservice.ReportEventStatusesRequest_Event{
Id: latestEvent.Id,
Status: model.EventStatus_EVENT_FAILURE,
StatusDescription: fmt.Sprintf("Event watcher handler type %s is not supported", handler.Type),
}
failureEvents = append(failureEvents, handledEvent)
continue
}
}
Expand All @@ -447,6 +454,14 @@ func (w *watcher) execute(ctx context.Context, repo git.Repo, repoID string, eve
w.logger.Info(fmt.Sprintf("successfully made %d events OUTDATED", len(outDatedEvents)))
}

if len(failureEvents) > 0 {
if _, err := w.apiClient.ReportEventStatuses(ctx, &pipedservice.ReportEventStatusesRequest{Events: failureEvents}); err != nil {
w.logger.Error("failed to report event failure statuses", zap.Error(err))
return err
}
w.logger.Info(fmt.Sprintf("successfully reported %d event failures", len(failureEvents)))
}

if !gitUpdateEvent {
return nil
}
Expand Down