-
Notifications
You must be signed in to change notification settings - Fork 19
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
Support dynamic backup location #341
Support dynamic backup location #341
Conversation
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.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
Passed | Infrastructure as Code | 0 0 0 0 | View in Orca |
Passed | Secrets | 0 0 0 0 | View in Orca |
Passed | Vulnerabilities | 0 0 0 0 | View in Orca |
@antas-marcin atm I am using this pattern for adding query parameters to the request: String path = String.format("/backups/%s/%s/restore", UrlEncoder.encodePathParam(backend), UrlEncoder.encodePathParam(backupId));
try {
path = new URIBuilder(path)
.addParameter("bucket", bucket)
.addParameter("path", this.path)
.toString();
} catch (URISyntaxException e) {
}
return sendRequest(path, ...) Here, if adding these parameters fails we would send the request without them. "It should never happen in practice" is the underlying assumption here and it's true as long as the initial Still, I think that maybe we should throw a UPD: moved away from using |
Great to see you again! Thanks for the contribution. |
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.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
Passed | Infrastructure as Code | 0 0 0 0 | View in Orca |
Passed | SAST | 0 0 0 0 | View in Orca |
Passed | Secrets | 0 0 0 0 | View in Orca |
Passed | Vulnerabilities | 0 0 0 0 | View in Orca |
This PR extends sync/async clients to accept
bucket
andpath
parameters in backup operations.As query parameters: create status, restore status, cancel.
As request body parameters: create, restore.
How is this tested?
New tests case in
BackupTestSuite
. It's only limitation is that it doesn't verify that the bucket was set correctly, becausebucket
is irrelevant for"filesystem"
backend, which we use in the tests.We do pass this parameter in all requests.