Skip to content

test(e2e): wait for deployment to exist in csv replacement test#833

Merged
openshift-merge-robot merged 3 commits into
operator-framework:masterfrom
ecordell:fix-e2e
May 1, 2019
Merged

test(e2e): wait for deployment to exist in csv replacement test#833
openshift-merge-robot merged 3 commits into
operator-framework:masterfrom
ecordell:fix-e2e

Conversation

@ecordell
Copy link
Copy Markdown
Member

Fixes a flake I noticed on #830

Might not be the only one, so I'll append more fixes if needed

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 29, 2019
Comment thread test/e2e/csv_e2e_test.go
require.NoError(t, err)

// Wait for new deployment to exist
err = waitForDeployment(t, c, strategyNew.DeploymentSpecs[0].Name)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks like you're missing require.NoError(t, err) below it.

@ecordell
Copy link
Copy Markdown
Member Author

/test unit

Copy link
Copy Markdown

@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
Copy link
Copy Markdown
Collaborator

@soltysh: changing LGTM is restricted to assignees, and only operator-framework/operator-lifecycle-manager repo collaborators may be assigned issues.

Details

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@soltysh
Copy link
Copy Markdown

soltysh commented Apr 30, 2019

/retest

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 30, 2019
@ecordell
Copy link
Copy Markdown
Member Author

/test unit

@ecordell
Copy link
Copy Markdown
Member Author

/retest

deleting namespaces after a test seems to be hanging :/

logger.WithError(err).Debug("error removing from queue")
}

if clusterServiceVersion.IsCopied() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good. One structural thing is that we could close over a var copied *bool initialized to false, set it below when we check clusterServiceVersion.IsCopied(), and use that here to avoid checking again (not that it's very resource intensive).

defer func(csv v1alpha1.ClusterServiceVersion) {
logger.Debug("removing csv from queue set")
a.csvQueueSet.Remove(csv.GetName(), csv.GetNamespace())
if err := a.csvQueueSet.Remove(csv.GetName(), csv.GetNamespace()); err != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! It seems like it was missing from the original, but aren't CSV keys in other queues as well (e.g. csvCopyQueue and csvGCQueue)? Should we handle removing those as well? Could we wrap the delete handlers in our queue abstractions to have them automatically dropped after they return?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These are good ideas for a follow up :)

I was going to add it here but we don't even expose the other queues outside of their indexers, so that would be a bigger change

@ecordell
Copy link
Copy Markdown
Member Author

/retest

@njhale
Copy link
Copy Markdown
Member

njhale commented Apr 30, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2019
@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ecordell, njhale, 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

@ecordell
Copy link
Copy Markdown
Member Author

/retest

2 similar comments
@ecordell
Copy link
Copy Markdown
Member Author

ecordell commented May 1, 2019

/retest

@ecordell
Copy link
Copy Markdown
Member Author

ecordell commented May 1, 2019

/retest

@openshift-merge-robot openshift-merge-robot merged commit a1e7603 into operator-framework:master May 1, 2019
@ecordell ecordell deleted the fix-e2e branch May 1, 2019 17:46
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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants