Skip to content

Commit

Permalink
feat: not throw error in case if update revision for path failed
Browse files Browse the repository at this point in the history
  • Loading branch information
pasha-codefresh committed Oct 27, 2024
1 parent 32d3762 commit 4c9941b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (m *appStateManager) GetRepoObjs(app *v1alpha1.Application, sources []v1alp
keyManifestGenerateAnnotationVal, keyManifestGenerateAnnotationExists := app.Annotations[v1alpha1.AnnotationKeyManifestGeneratePaths]

logCtx := log.WithField("application", app.QualifiedName())

for i, source := range sources {
if len(revisions) < len(sources) || revisions[i] == "" {
revisions[i] = source.TargetRevision
Expand Down Expand Up @@ -235,11 +235,9 @@ func (m *appStateManager) GetRepoObjs(app *v1alpha1.Application, sources []v1alp
HasMultipleSources: app.Spec.HasMultipleSources(),
})
if err != nil {


return nil, nil, false, fmt.Errorf("failed to compare revisions for source %d of %d: %w", i+1, len(sources), err)
}

if updateRevisionResult.Changes {
revisionUpdated = true
}
Expand Down Expand Up @@ -292,7 +290,7 @@ func (m *appStateManager) GetRepoObjs(app *v1alpha1.Application, sources []v1alp
}

ts.AddCheckpoint("unmarshal_ms")

for k, v := range ts.Timings() {
logCtx = logCtx.WithField(k, v.Milliseconds())
}
Expand Down

0 comments on commit 4c9941b

Please sign in to comment.