micafer commented on code in PR #2177:
URL: https://github.com/apache/libcloud/pull/2177#discussion_r4023600473
##########
libcloud/dns/drivers/route53.py:
##########
@@ -199,7 +199,39 @@ def create_record(self, name, zone, type, data,
extra=None):
extra=extra,
)
+ def _with_record_set_metadata(self, record):
+ # ``_multi_value`` / ``_other_records`` are attached by
``_to_records``,
+ # so records which did not come from ``list_records`` / ``get_record``
+ # (e.g. the ones returned by ``create_record`` or
+ # ``ex_create_multi_value_record``, or user constructed ones) carry no
+ # information about the rest of their record set. Re-fetch the record
+ # set in that case so multi value updates and deletes work regardless
+ # of how the record was obtained.
+
+ if "_multi_value" in record.extra:
+ return record
+
+ try:
+ fetched = self.list_records(zone=record.zone)
+ except Exception:
Review Comment:
This exception may hide networking, an API error, or another unexpected
issue, silently.
I will probably cause an error later in the delele_record funcion.
May be is better not add this try, and let the errror be raised.
What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]