Skip to content

Conversation

@sallyom
Copy link
Contributor

@sallyom sallyom commented Nov 20, 2019

Here's an e2e that:

  • creates a pod
  • creates a PodDisruptionBudget of minAvail=1
  • queries prometheus for a pending 'PodDisruptionBudgetAtLimit' alert 'pending' - to wait for 'firing' you'd have to wait 15 min, so pending it is.
  • query uses helper functions from this PR: add helper functions for running prometheus query library-go#602 (fake bump here)

/cc @soltysh @marun

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 20, 2019
@sallyom sallyom force-pushed the pdb-alert-test branch 2 times, most recently from d1a5a81 to d66b663 Compare November 20, 2019 23:53
@sallyom
Copy link
Contributor Author

sallyom commented Nov 21, 2019

/test e2e-aws-operator

})

// test that pdb-atlimit alert exists when there is a pdb at limit
t.Run("PodDisruptionBudgetAtLimit alert", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(No action required) Consider using of dashes or underscores in test names instead of spaces to simplify targeting test execution.

@sallyom sallyom force-pushed the pdb-alert-test branch 6 times, most recently from 89cd4aa to bd2beb9 Compare November 23, 2019 20:38
@sallyom
Copy link
Contributor Author

sallyom commented Nov 23, 2019

@marun @sanchezl thanks for the review! I've addressed your suggestions, then moved the query functions to library-go openshift/library-go#602 I've placed a fake-bump commit to test the library-go pr.

@openshift-ci-robot openshift-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 24, 2019
@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 7, 2020
@sallyom sallyom force-pushed the pdb-alert-test branch 2 times, most recently from bd86675 to 9f908dd Compare January 13, 2020 19:59
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2020
@sallyom
Copy link
Contributor Author

sallyom commented Jan 14, 2020

/retest

@sallyom
Copy link
Contributor Author

sallyom commented Jan 15, 2020

/test e2e-aws

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits, mostly
/approve

Makefile Outdated
$(call add-bindata,v4.1.0,./bindata/v4.1.0/...,bindata,v411_00_assets,pkg/operator/v411_00_assets/bindata.go)

test-e2e: GO_TEST_PACKAGES :=./test/e2e/...
test-e2e: GO_TEST_FLAGS += -v
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto as in the other PR, I don't think we need it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to see what's going on rather than a hang, but I removed this change : )

// Wait for pbd
err = wait.PollImmediate(time.Second*1, testTimeout, func() (bool, error) {
if _, err := policyClient.PodDisruptionBudgets(name).List(metav1.ListOptions{LabelSelector: "app=pbtest"}); err != nil {
return false, fmt.Errorf("Waiting for poddisruptionbudget")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now with go1.13:

fmt.Errorf("waiting for poddisruptionbudget: %w", err)

if err != nil {
return false, err
}
if len(pods.Items) > 0 && pods.Items[0].Status.Phase == corev1.PodRunning {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still holds.

},
}
_, err := client.CoreV1().Pods(name).Create(pod)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just return err

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@soltysh
Copy link
Contributor

soltysh commented Jan 16, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jan 16, 2020
@sallyom
Copy link
Contributor Author

sallyom commented Jan 22, 2020

/retest

3 similar comments
@sallyom
Copy link
Contributor Author

sallyom commented Jan 24, 2020

/retest

@sallyom
Copy link
Contributor Author

sallyom commented Jan 26, 2020

/retest

@sallyom
Copy link
Contributor Author

sallyom commented Jan 26, 2020

/retest

@sallyom
Copy link
Contributor Author

sallyom commented Jan 28, 2020

/retest

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 31, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sallyom, soltysh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@soltysh
Copy link
Contributor

soltysh commented Jan 31, 2020

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 45aabef into openshift:master Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants