-
Notifications
You must be signed in to change notification settings - Fork 260
Conversation
48f1352
to
c723f86
Compare
d05f64d
to
b2a0946
Compare
d01db3e
to
2b9fc59
Compare
a84615c
to
a2fcab2
Compare
b95bbe2
to
6ec9a29
Compare
6ec9a29
to
4fb2f43
Compare
test/e2e/40_tests.bats
Outdated
poll_until_equals 'release deploy' 'True' "kubectl -n $DEMO_NAMESPACE get helmrelease/podinfo-helm-repository -o jsonpath='{.status.conditions[?(@.type==\"Released\")].status}'" | ||
|
||
if [ $HELM_VERSION = "v2" ]; then | ||
test_exists_jq_filter='.info.status | has("last_test_suite_run")' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is currently a race condition where the observed generation is set, immediately followed by the lock opening up for the next chart sync interval loop, and the informer cache is not updated yet with the observed generation change, which results in an upgrade, which causes "last_test_suite_run" to be unset, which causes this test to fail. This is resolved by #444 which runs a harmless dry run compare, instead of a direct upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the race condition by using polling in the test.
@@ -406,14 +433,14 @@ func (r *Release) upgrade(client helm.Client, hr *v1.HelmRelease, chart chart, v | |||
ResetValues: !hr.GetReuseValues(), | |||
SkipCRDs: hr.Spec.SkipCRDs, | |||
MaxHistory: hr.GetMaxHistory(), | |||
Wait: hr.Spec.Wait || hr.Spec.Rollback.Enable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
existing behavior is that wait only defaults to true on upgrades (not installs) when rollbacks are enabled. It seemed better to me for the config to be statically determined, and not depend on current action (install vs upgrade), so I implemented that for when tests are enabled, and then I just made the behavior match when rollbacks are enabled. This does mean wait may be turned on for some installs where it wasn't before. Let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 👌, I would have made the same change if I had to further extend the waiting behaviour.
4fb2f43
to
04d8675
Compare
chart: | ||
repository: https://stefanprodan.github.io/podinfo | ||
name: podinfo | ||
version: 3.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use 4.0.1
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't hurt to update things to a newer podinfo version, but can be taken care of in a a separate PR to change the other fixtures as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lengthy PR! But tidy, clean, and extensively documented.
LGTM @seaneagan 🥇
Fixes #369.
@hiddeco