Repository navigation
Conversation
Signed-off-by: Martin Montes <martin11lrx@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @mmontes11. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@mmontes11 Are you able to test this PR, e2e ? |
|
@mmontes11 We may drop entirely this provider, JSY. see #6877 |
|
@mloiseleur Thanks again for you in-depth review. I don't have a Linode account by hand to test the full e2e changes, I was relying on your extensive test suite to validate the changes. I'm open to leave this open until someone (maybe the community?) is able to test this e2e.
I can imagine the maintenance burden, reusing the same webhook provider will certainly help. |
Consolidate generateCreates/generateUpdates/generateDeletes into a single forEachEndpoint iterator and drop the unreachable empty-slice branches. Helpers take the zone directly instead of a string zone ID, and name-restating doc comments on unexported helpers are removed. Signed-off-by: Martin Montes <martin11lrx@gmail.com>
f1146a7 to
982238b
Compare
|
Review comments addressed:
Verified locally: |
|
no need to go further on this PR if we drop this provider |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
linode provider has been removed. |
|
@mloiseleur: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What does it do ?
Decomposes the Linode provider
ApplyChangesinto small helpers:zoneLookup(zone ID/name maps),
fetchRecordsByZone(existing record fetch), and onegenerate*pair per change kind —generateCreates/createEndpoint,generateUpdates/updateEndpoint/endpointTargetChanges,generateDeletes/deleteEndpoint— which append into a shared*LinodeChanges.ApplyChangeskeeps only the fetch, the three generationsteps and
submitChanges.Cyclomatic complexity of
ApplyChangesdrops from 25 to 6 (helpers are allcc <= 5); the record diffing logic is unchanged.
Motivation
The function mixed zone/record fetching with three per-endpoint
create/update/delete generation loops, each of which had its own matching and
logging branches, making the update path (which can also emit creates and
deletes) hard to follow.
More
New test:
TestLinodeApplyChangesUnsupportedRecordTypepins theconvertRecordTypeerror path (previously untested) — an unsupported typeaborts
ApplyChangeswith the same error.