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

groups: avoid %kick-ing empty list of paths #4495

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Mar 6, 2025

Kicking empty list of paths means "kick subscription that triggered this event". This does mean that when constructing a path list of unknown size, you have to catch the empty list case to avoid falling into that specialized behavior.

Here, we check for the empty list, and avoid emitting kicks (or facts) in that case.

(In practice, this resulted in the kick going into clay during an update reload, which failed without providing a clear trace or legible failure reason. Notably, clay's error handling only handles errors on the /drip wire, crashing in other cases. Potentially not the right approach...)

(Note also that the whole "cast" stuff here has been marked as potentially deprecated. So, somewhat surprising this codepath is being hit in the first place. As of yet unclear where/why it originates...)

Kicking empty list of paths means "kick subscription that triggered this
event". This does mean that when constructing a path list of unknown
size, you have to catch the empty list case to avoid falling into that
specialized behavior.

Here, we check for the empty list, and avoid emiting kicks (or facts) in
that case.
@Fang- Fang- added the desk label Mar 6, 2025
Copy link
Member

@jamesacklin jamesacklin left a comment

Choose a reason for hiding this comment

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

Works on my machine!

Copy link
Member

@arthyn arthyn left a comment

Choose a reason for hiding this comment

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

10/10 doctors recommend

@arthyn arthyn merged commit cbddc6c into develop Mar 6, 2025
1 check passed
@arthyn arthyn deleted the m/groups-no-pathless-kick branch March 6, 2025 16:35
@mikolajpp
Copy link
Collaborator

mikolajpp commented Mar 6, 2025

Leaving a comment here for posterity: it is likely these seemingly unused subscriptions were kicked by the migration code in lib-negotiate, which kicks every subscription during +on-load. Since the %groups agent probably never pruned its connections, some ships would carry over the unused subscriptions from a distant past.

Yet another reason to do a thorough cleanup of the %groups agent (on my todo list!)

@jamesacklin jamesacklin removed the desk label Mar 13, 2025
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.

4 participants