default merged_uri should return the parameter not the attribute #18497
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.
A previous PR changed merged_uri to return the attribute on the object
rather than the passed in parameter. This is incorrect and is changed
herein. Only Swift handles this differently.
Thie method gets called by MiqSchedule.verify_file_depot() which in turn gets called by the UI controller in two different situations - for an AdHoc DB backup, and for a Scheduled DB Backup. We had apparently only tested AdHoc backups previously, which is why this worked. However Scheduled backups were failing because the FileDepot object had not been created in the DB and therefore the URI attribute was nil, which is invalid when the object is subsequently created.
If we return the passed in uri parameter instead of the attribute, both Adhoc and Scheduled DB backups will work correctly.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1678223
@roliveri @h-kataria @NickLaMuro please review. Thanks.
Links