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

Use unique context for endpoint poller reconcile actions #489

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

hjkatz
Copy link
Contributor

@hjkatz hjkatz commented Nov 6, 2024

What

Describe what the change is solving

Use a unique context so we can control the cancel rather than the ctrl manager.

How

Describe the solution

Breaking Changes

Are there any breaking changes in this PR?

@hjkatz hjkatz requested a review from a team as a code owner November 6, 2024 17:48
@github-actions github-actions bot added the area/controller Issues dealing with the controller label Nov 6, 2024
Copy link
Contributor Author

hjkatz commented Nov 6, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @hjkatz and the rest of your teammates on Graphite Graphite

r.reconcileBoundEndpointAction(ctx, errGroup, toDelete, "delete", func(ctx context.Context, binding bindingsv1alpha1.BoundEndpoint) error {
return r.deleteBinding(ctx, binding)
r.reconcileBoundEndpointAction(reconcileActionCtx, errGroup, toDelete, "delete", func(reconcileActionCtx context.Context, binding bindingsv1alpha1.BoundEndpoint) error {
return r.deleteBinding(reconcileActionCtx, binding)
})

return nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question Do we need an errGroup.Wait() here or are we just using the errgroup to spawn all of them at the same time and relying on the context being canceled? If the latter, it might be clearer if we drop the errgroup and just use goroutines for concurrent processing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I think you're right - I'm mixing up using errGroup and managing the ctx cancel myself. I'll clean this up.

@hjkatz hjkatz force-pushed the hkatz/endpoint-poller-ctx branch from 4751bd3 to 9386161 Compare November 7, 2024 10:43
Copy link
Contributor Author

hjkatz commented Nov 7, 2024

Merge activity

  • Nov 7, 5:44 AM EST: Graphite rebased this pull request as part of a merge.
  • Nov 7, 5:48 AM EST: Graphite rebased this pull request as part of a merge.
  • Nov 7, 5:54 AM EST: A user merged this pull request with Graphite.

@hjkatz hjkatz force-pushed the hkatz/endpoint-poller-ctx branch from 9386161 to eb22aa6 Compare November 7, 2024 10:47
@hjkatz hjkatz merged commit c04b5ec into main Nov 7, 2024
8 checks passed
@hjkatz hjkatz deleted the hkatz/endpoint-poller-ctx branch November 7, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Issues dealing with the controller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants