Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Execution ID in the executor's evaluation param logs #3889

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions internal/engine/eval_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (e *executor) createEvalStatusParams(
ArtifactID: artID,
PullRequestID: prID,
ProjectID: inf.ProjectID,
ExecutionID: *inf.ExecutionID, // Execution ID is required in the executor.
}

// Prepare params for fetching the current rule evaluation from the database
Expand Down
2 changes: 2 additions & 0 deletions internal/engine/interfaces/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ type EvalStatusParams struct {
evalErr error
actionsOnOff map[ActionType]ActionOpt
actionsErr evalerrors.ActionsError
ExecutionID uuid.UUID
}

// Ensure EvalStatusParams implements the necessary interfaces
Expand Down Expand Up @@ -250,6 +251,7 @@ func (e *EvalStatusParams) DecorateLogger(l zerolog.Logger) zerolog.Logger {
Str("rule_type", e.GetRule().GetType()).
Str("rule_name", e.GetRule().GetName()).
Str("rule_type_id", e.GetRuleTypeID().String()).
Str("execution_id", e.ExecutionID.String()).
Logger()
if e.RepoID.Valid {
outl = outl.With().Str("repository_id", e.RepoID.UUID.String()).Logger()
Expand Down