Repository navigation
Route53: keep MX priority and SRV weight/port when updating or deleting records - #2224
Open
anishmehta24 wants to merge 1 commit into
Open
anishmehta24 wants to merge 1 commit into
anishmehta24 wants to merge 1 commit into
Conversation
_to_record splits the MX priority and the SRV priority, weight and port out of the stored value. When a record was written back, the multi value update path dropped the MX priority and every path dropped the SRV weight and port, so DELETE did not match the stored values and CREATE sent invalid ones. Rebuild the value with _to_record_value everywhere, and have it restore the SRV weight and port.
anishmehta24
force-pushed
the
route53-mx-srv-record-values
branch
from
November 13, 2026 23:47
02620a5 to
187efb5
Compare
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
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.
Route53: keep MX priority and SRV weight/port when updating or deleting records
Description
_to_recordsplits the MX priority and the SRV priority, weight and port out of the value Route53 stores, but they are not all put back when a record is written:update_recordon a record that is part of a multi value set (e.g. one of the MX values) sends every value without its priority, so the DELETE doesn't match what Route53 stores and the CREATE values are invalid.update_recordanddelete_recordon SRV records sendpriority targetinstead ofpriority weight port target. With thelist_recordsfixture, deleting the SRV record sends1 xmpp-server.example.com.instead of1 10 5269 xmpp-server.example.com..#2177 fixed this for multi value MX deletes. This uses its
_to_record_valuehelper in the update path and in_post_changesetas well, and makes it restore the SRV weight and port.Three new tests check the posted changeset (multi value MX update, multi value SRV delete, single value SRV update), plus an SRV case in
test_to_record_value; they fail on trunk and pass with the fix.libcloud/test/dnspasses (541 tests), and black, isort, flake8 and pylint -E pass. I couldn't run it against real Route53.Status
done, ready for review
Checklist (tick everything that applies)