-
-
Notifications
You must be signed in to change notification settings - Fork 620
sfe/zendesk: Add a Zendesk API client implementation #8320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
930d7af
to
b70cc19
Compare
b70cc19
to
edaac0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't gotten to reviewing zendeskfake yet, but figured I should send the comments I have so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, could totally be landed now. I have just a few mostly-optional comments.
**test/zendeskfake:** Address some optional comments from #8320. **sfe/zendesk:** Address some optional comments from #8320. **ratelimits/overriderequests**: - Remove unused constants that are not yet necessary. - Remove Fundraising from tickets, we'll handle this value at submission time. - Comment the various Create*OverrideTicket functions. - Pass the correct rate limit for the ticket being created. **test/zendesk-test-srv:** Testing the user experience of the entire submission flow will require a non-nil zendeskClient in the SFE. Add a new test-only Zendesk server implementation that allows us to configure and use the Zendesk client in the SFE. **sfe/templates**: In a future PR, new Content Security Policy headers necessary to secure our override request forms will disallow inline CSS. To keep that PR focused (and the CSS diff easier to parse), this change moves the existing CSS to a static file and references it in the existing HTML template. **sfe/sfe:** Configure and assign the zendeskClient in config-next. **cmd/sfe/main.go:** Change AccountID configuration field to match AccountURI present in the form.
sfe/zendesk: Add a Zendesk client implementation that supports all functionality required for storing and loading rate limit override requests.
test/zendeskfake: Add a fake Zendesk server implementation supporting all behavior expected by the sfe/zendesk client.
cmd/sfe: Add configuration to support an optional Zendesk client in the SFE.
sfe: Add the optional Zendesk client to SelfServiceFrontEndImpl and its constructor, NewSelfServiceFrontEndImpl.
ratelimits/overriderequests: Add helpers for creating Zendesk tickets for supported rate limit override requests. Include expected display names for Zendesk custom fields related to override request storage. These match the documentation I've drafted for our SRE team.
Closes #8164