Skip to content

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

Merged
merged 3 commits into from
Aug 14, 2025

Conversation

beautifulentropy
Copy link
Member

@beautifulentropy beautifulentropy commented Jul 28, 2025

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

@beautifulentropy beautifulentropy force-pushed the sfe-zendesk-get-fetch branch 3 times, most recently from 930d7af to b70cc19 Compare July 28, 2025 21:29
@beautifulentropy beautifulentropy marked this pull request as ready for review July 28, 2025 21:29
@beautifulentropy beautifulentropy requested a review from a team as a code owner July 28, 2025 21:29
Copy link
Contributor

@aarongable aarongable left a 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.

@aarongable aarongable requested review from a team and jprenken and removed request for a team August 7, 2025 00:25
Copy link
Contributor

@aarongable aarongable left a 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.

@beautifulentropy beautifulentropy merged commit dbbb545 into main Aug 14, 2025
12 checks passed
@beautifulentropy beautifulentropy deleted the sfe-zendesk-get-fetch branch August 14, 2025 18:07
beautifulentropy added a commit that referenced this pull request Aug 15, 2025
**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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sfe: Add support for storing and loading rate limit override requests in Zendesk + mock Zendesk (OAuth + API) service
3 participants