helm/pkg/tiller
Matthew Fisher 8d408876a0
Fix race condition in `helm list` (#4620)
* Fix race in helm list when partitioning

Problem:
The chunks slice that is passed through the channel is reused for each
partition. This means that encoding the release into a message is racing with
populating the next partition, causing the results to sometimes not fit in the
message, and the release list to be incorrect

Solution:
Allocate a new slice for each partition

Issue #3322

Signed-off-by: Brian Marshall <bmarshall13@users.noreply.github.com>
(cherry picked from commit a0858e29d8)

* fix import sorting

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>

* ref(release_server_test): use NewReleaseServer()

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>

* add unit test for race condition in `helm list`

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
(cherry picked from commit 5b23632446)
2018-09-10 11:19:58 -07:00
..
environment ref(*): kubernetes v1.11 support 2018-08-09 19:13:12 -07:00
hook_sorter.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
hook_sorter_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
hooks.go [tiller] move the Manifest type to its own pkg 2018-08-06 17:24:02 -07:00
hooks_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
kind_sorter.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
kind_sorter_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_content.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_content_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_history.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_history_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_install.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_install_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_list.go Fix race condition in `helm list` (#4620) 2018-09-10 11:19:58 -07:00
release_list_test.go Fix race condition in `helm list` (#4620) 2018-09-10 11:19:58 -07:00
release_modules.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_rollback.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_rollback_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_server.go fix(release_server): handle the case when requested values is empty (#4604) 2018-09-07 12:22:12 -07:00
release_server_test.go Fix race condition in `helm list` (#4620) 2018-09-10 11:19:58 -07:00
release_status.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_status_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_testing.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_testing_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_uninstall.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_uninstall_test.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
release_update.go Merge pull request #4402 from novas0x2a/force-obey-dryrun 2018-07-31 09:10:25 -07:00
release_update_test.go fix(release_server): handle the case when requested values is empty (#4604) 2018-09-07 12:22:12 -07:00
release_version.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
resource_policy.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00
server.go change copyright to "Copyright The Helm Authors" 2018-07-30 08:29:17 -07:00