Skip to content
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

Check enforcer event consolidation #1005

Conversation

mitchdenny
Copy link
Contributor

This PR is an exploration of one approach to reducing the volume of requests being routed to GitHub from Check Enforcer. It works by deduping messages that are received from EventHubs as a batch. After some experimentation I am not sure that this approach will work that well (the delta reduction is not that great).

We might need to do a more stateful approach.

@mitchdenny mitchdenny self-assigned this Sep 16, 2020
@mitchdenny mitchdenny added EngSys This issue is impacting the engineering system. Check Enforcer labels Sep 16, 2020

var everythingElse = from payload in elligiblePayloads
group payload by payload.CheckRun.HeadSha into payloadGroup
select payloadGroup.Last();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order by "completed_at" to get the most recent one? Might be useful for future caching optimizations.


if (delta > 0)
{
Debugger.Break();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focusing on this delta I think is the most interesting thing. Are we hitting this often enough or do we really need to focus on caching the identical API calls themselves (and off box?).
A drop in distributed cache might be easy enough.

var context = new HandlerContext<T>(deserializedPayload, client);

await HandleCoreAsync(context, cancellationToken);
// TODO: Handle exceptions on deserialization (too big, malformed, shouldn't
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The various failure and retry cases seems like the biggest open question with this implementation. Goes directly to the retry logic in the event-hub and a per/multi message basis.

@kurtzeborn kurtzeborn added the Central-EngSys This issue is owned by the Engineering System team. label Sep 22, 2020
@mitchdenny
Copy link
Contributor Author

Don't need to do this. Dropping neutral events had a massive impact. I think we've got plenty of headroom now.

@mitchdenny mitchdenny closed this Oct 6, 2020
sima-zhu pushed a commit to sima-zhu/azure-sdk-tools that referenced this pull request Dec 3, 2020
* Update the storage readme with concepts

* Update app -> application
Move the context into the options to be consistent with C++ and the context being optional for callers of convenience layer APIs

* Information on how to replace the http stack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team. Check Enforcer EngSys This issue is impacting the engineering system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants