Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
maggie-lou committed Sep 4, 2024
1 parent f0af1f2 commit 3f41345
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions enterprise/server/cmd/ci_runner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,17 +560,14 @@ func (r *buildEventReporter) startBackgroundProgressFlush() func() {
//
// Event publishing errors will be surfaced in the caller func when calling
// `buildEventPublisher.Finish()`
//
// TODO: Emit TargetConfigured and TargetCompleted events to render artifacts
// for each command
func (r *buildEventReporter) emitBuildEventsForBazelCommands(b []byte) {
output := string(b)

// Check whether a bazel invocation was invoked
iidMatches := invocationIDRegex.FindAllStringSubmatch(output, -1)
for _, m := range iidMatches {
iid := m[1]
childStarted := contains(r.childInvocations, iid)
childStarted := slices.Contains(r.childInvocations, iid)

var buildEvent *bespb.BuildEvent
if childStarted {
Expand Down Expand Up @@ -614,15 +611,6 @@ func (r *buildEventReporter) emitBuildEventsForBazelCommands(b []byte) {
}
}

func contains(s []string, target string) bool {
for _, elem := range s {
if elem == target {
return true
}
}
return false
}

func main() {
if err := run(); err != nil {
if result, ok := err.(*actionResult); ok {
Expand Down Expand Up @@ -1091,7 +1079,6 @@ func (ar *actionRunner) Run(ctx context.Context, ws *workspace) error {
}
}()

// TODO(Maggie): Emit BES events for each bazel command
for i, step := range action.Steps {
cmdStartTime := time.Now()

Expand Down

0 comments on commit 3f41345

Please sign in to comment.