1
0
Fork 0

[marathon] Assign filtered tasks to apps contained in slice.

We previously assigned them to a copy of each application, which
effectively disabled all filtering.

Fixes a bug introduced along commit 779eeba.
This commit is contained in:
Timo Reimann 2017-07-19 14:41:45 +02:00 committed by Ludovic Fernandez
parent 074b31b5e9
commit 3174fb8861
2 changed files with 30 additions and 2 deletions

View file

@ -175,8 +175,8 @@ func (p *Provider) loadMarathonConfig() *types.Configuration {
}
filteredApps := fun.Filter(p.applicationFilter, applications.Apps).([]marathon.Application)
for _, app := range filteredApps {
app.Tasks = fun.Filter(func(task *marathon.Task) bool {
for i, app := range filteredApps {
filteredApps[i].Tasks = fun.Filter(func(task *marathon.Task) bool {
return p.taskFilter(*task, app)
}, app.Tasks).([]*marathon.Task)
}