-
Notifications
You must be signed in to change notification settings - Fork 88
CLOUDP-299544: atlas backup restore start download requires targetProjectId for dedicated cluster
#3620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rojectId for dedicated cluster
gssbzn
reviewed
Feb 10, 2025
|
Coverage Report 📈
|
Comment on lines
+67
to
+69
| if result.GetDeliveryType() == deliveryTypeDownload && len(result.GetDeliveryUrl()) > 0 { | ||
| return true | ||
| } |
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.
dry-by: the watch command hanged forever for download restore with Dedicated Cluster (It works for Flex Cluster). I discovered this by adding a new e2e test.
gssbzn
approved these changes
Feb 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes
Jira ticket: CLOUDP-299544
Bug:
The
atlas backup restore start downloadreturnsMISSING_ATTRIBUTEerror when trying a restore download with a Dedicated Cluster. The reason is that we are wrongly calling the Flex API.This PR updates the command logic to get the cluster first to see if is flex or not, and then call the right API.
atlas backup restore start download --clusterName Cluster0 --snapshotId 67a645ae781f9601bf0925bb -P prod Error: https://cloud.mongodb.com/api/atlas/v2/groups/663268874ddd3b236fd2f107/flexClusters/Cluster0/backup/restoreJobs POST: HTTP 400 Bad Request (Error code: "MISSING_ATTRIBUTE") Detail: The required attribute targetProjectId was not specified. Reason: Bad Request. Params: [targetProjectId], BadRequestDetail:Fix:
./bin/atlas backup restore start download --clusterName Cluster0 --snapshotId 67a645ae781f9601bf0925bb -P prod Restore job '67a64a93781f9601bf0da6c2' successfully startedFor Flex cluster we still see the error:
./bin/atlas backup restore start download --clusterName FlexCluster --snapshotId 67a645ae781f9601bf0925bb -P prod Error: https://cloud.mongodb.com/api/atlas/v2/groups/663268874ddd3b236fd2f107/flexClusters/FlexCluster/backup/restoreJobs POST: HTTP 400 Bad Request (Error code: "MISSING_ATTRIBUTE") Detail: The required attribute targetProjectId was not specified. Reason: Bad Request. Params: [targetProjectId], BadRequestDetail: