Skip to content

Commit

Permalink
fix: 20791 - sync multi-source application out of order source syncs (#…
Browse files Browse the repository at this point in the history
…21071)

Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
  • Loading branch information
ishitasequeira authored Dec 5, 2024
1 parent cdec7e2 commit fa9023a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -2229,7 +2229,7 @@ func getAmbiguousRevision(app *appv1.Application, syncReq *application.Applicati
ambiguousRevision := ""
if app.Spec.HasMultipleSources() {
for i, pos := range syncReq.SourcePositions {
if pos == int64(sourceIndex) {
if pos == int64(sourceIndex+1) {
ambiguousRevision = syncReq.Revisions[i]
}
}
Expand Down
2 changes: 1 addition & 1 deletion server/application/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2946,7 +2946,7 @@ func TestGetAmbiguousRevision_MultiSource(t *testing.T) {
},
}
syncReq := &application.ApplicationSyncRequest{
SourcePositions: []int64{0, 1},
SourcePositions: []int64{1, 2},
Revisions: []string{"rev1", "rev2"},
}

Expand Down

0 comments on commit fa9023a

Please sign in to comment.