Support the controller for AnalyticsAccount #5424
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BRIEF Change description
Diffbase #5423
Fixes #5334
Analytics API doesn't have the endpoint to directly create an account. In order to create an Analytics account, user needs to call ProvisionAccountTicket() and then accept the ToS manually after constructing the link using the account ticket ID returned by ProvisionAccountTicket(). More details can be found in the comments in #5334.
To make this workflow work as transparently as possible, here are the customizations I did:
spec.redirectURI
andstatus.observedState.accountTicketID
to support ProvisionAccountTicket() API call.status.externalRef
till we find a matching account in the ListAccounts() in Find.ManualStepNotCompleted
error and make it a "dependency not ready" error. Explicitly asked users to accept the ToS when account ticket ID is found. Also made this error not a blocker for the resource deletion.Picked the GRPC client because the REST client returned the following error repetitively even if I had already done what it suggested:
WHY do we need this change?
Special notes for your reviewer:
Does this PR add something which needs to be 'release noted'?
Additional documentation e.g., references, usage docs, etc.:
Intended Milestone
Please indicate the intended milestone.
Tests you have done
make ready-pr
to ensure this PR is ready for review.