Conversation
…bling DDOS Protection
philippschulte
left a comment
There was a problem hiding this comment.
This looks functionally correct, and the added fixtures/tests for explicit mode are good.
My only concern is backward compatibility: changing Enable(...) to require an EnableInput argument is a breaking API change for existing consumers!
Reverted the breaking change to the 'Enable' func by maintaining the same "default" mode behavior and creating a new 'EnableWithInput' func which can be used to specify a 'mode'.
|
Given the very low number of users of go-fastly, I think a breaking change would be fine, and preferable to having a separate function. For the future, we should probably standardize on all 'action' functions accepting an input structure even if it is empty, so we can add fields to that structure in the future without a breaking change. |
philippschulte
left a comment
There was a problem hiding this comment.
Looks good to me now. Preserving Enable(...) and adding EnableWithInput(...) avoids the breaking API change while still exposing mode. The added tests for explicit mode and verification are great. Thank you!
|
@kpfleming would you prefer if I reverted the secondary function changes at this point and moved forward with the breaking change for the sake of less complexity downstream? |
|
I'm a little concerned about setting a precedent that we'll be asked to continue in the future, that's it. If we can handle the breaking change in our own tools, I suspect that's a better path because it avoids any indication that we'll added secondary/tertiary/etc. functions in the future to avoid breaking changes. |
This reverts commit 969cd5d.
Co-authored-by: Kevin P. Fleming <kpfleming@users.noreply.github.com>
Change summary
This PR adds support for passing the
modeparameter when calling theEnableDDOS Protection endpoint. This was previously missing and only available throughUpdate.All Submissions:
New Feature Submissions:
Changes to Core Features: