Skip to content
Merged
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
6 changes: 5 additions & 1 deletion internal/runners/mcp/projecterrors/projecterrors.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ func (runner *ProjectErrorsRunner) Run(params *Params) error {
// If found, assume the issue is resolved so that a new build could be retried.
func CheckDependencyFixes(auth *authentication.Auth, failedArtifacts []*buildplan.Artifact) (map[strfmt.UUID]bool, error) {
fixed := make(map[strfmt.UUID]bool)
latest, err := model.FetchLatestRevisionTimeStamp(auth)
if err != nil {
return nil, fmt.Errorf("Failed to fetch latest timestamp: %w", err)
}
for _, artifact := range failedArtifacts {
// TODO: Query multiple artifacts at once to reduce API calls, improving performance.
latestRevision, err := model.GetIngredientByNameAndVersion(
artifact.Ingredients[0].Namespace, artifact.Name(), artifact.Version(), nil, auth)
artifact.Ingredients[0].Namespace, artifact.Name(), artifact.Version(), &latest, auth)
if err != nil {
return nil, fmt.Errorf("error searching ingredient: %w", err)
}
Expand Down
Loading