Skip to content

Enable asynchronous deprovision in TSB#16815

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
jim-minter:tsb-async-delete
Oct 15, 2017
Merged

Enable asynchronous deprovision in TSB#16815
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
jim-minter:tsb-async-delete

Conversation

@jim-minter
Copy link
Contributor

No description provided.

@openshift-ci-robot openshift-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 11, 2017
}

// The OSB API requires this function to be idempotent (restartable). If
// any actual change was made, per the spec, StatusOK is returned, else
Copy link
Contributor

Choose a reason for hiding this comment

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

comment needs to be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, thanks.

g.By("deprovisioning a service")
err := brokercli.Deprovision(context.Background(), cliUser, instanceID)
err := cli.TemplateClient().Template().Templates(cli.Namespace()).Delete(privatetemplate.Name, &metav1.DeleteOptions{})
o.Expect(err).NotTo(o.HaveOccurred())
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the point of deleting the template 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.

What I've implemented is that the test explicitly checks that the namespace is left empty (inasmuch as this is possible). We manually put that template in the namespace earlier (in the BeforeEach), therefore we must manually remove it for the test to succeed.

err := cli.TemplateClient().Template().Templates(cli.Namespace()).Delete(privatetemplate.Name, &metav1.DeleteOptions{})
o.Expect(err).NotTo(o.HaveOccurred())

err = brokercli.Deprovision(context.Background(), cliUser, instanceID)
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't this need to wait until lastoperation returns success? (should have a test for that anyway)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

brokercli (already) handles that internally. What additional test are you looking for?

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I didn't dig into brokercli explicitly. I see now that it already handles both sync and async responses (I was assuming it only handled sync and would need changes to add support for async)

@bparees
Copy link
Contributor

bparees commented Oct 12, 2017

i think this is lgtm but will revisit after #16808 merges, i don't want to merge this beforehand since it's got a cherrypicked commit.

(and ensure that all objects are deleted once the TSB says that deprovision is
finished)
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 13, 2017
@jim-minter
Copy link
Contributor Author

@bparees #16808 has now merged. I rebased this and repushed - just 1 commit showing now.

@bparees
Copy link
Contributor

bparees commented Oct 13, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, jim-minter

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

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2017
@jim-minter
Copy link
Contributor Author

/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
Copy link
Contributor

Automatic merge from submit-queue.

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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants