fix remove invalid pattern DSL call from IssuesActor#9
fix remove invalid pattern DSL call from IssuesActor#9kbb0118 wants to merge 5 commits intoLegionIO:mainfrom
Conversation
|
Good analysis. A few notes on the pattern DSL to give this full context: The class Issues < Legion::Extensions::Absorbers::Base
pattern :url, 'github.com/**/issues/*'
endThe call On the "absorber never registers with PatternMatcher" impact: The PR fix is correct and complete for what's described. |
There was a problem hiding this comment.
Code review
The diff contains no code change — only a CHANGELOG entry and version bump. The pattern 'github.issues.*' call is still present in absorbers/actor.rb, which is why CI is failing.
Two problems need to be fixed:
-
The actual code change is missing. Remove the
patterncall fromIssuesActor. That line is the entire fix described in #8. -
The CHANGELOG entry misdescribes the fix. It says "use the single-argument form
pattern 'github.issues.*'", implyingActors::Subscriptionaccepts a one-argument variant. It doesn't —patternbelongs toAbsorbers::Baseonly. The entry should say the call was removed entirely.
— from LegionIO
Closes #8
Change
Remove the invalid
pattern 'github.issues.*'call fromIssuesActor.Why
IssuesActorinherits fromActors::Subscription, which does not have apatternclass method. ThepatternDSL belongs toAbsorbers::Basesubclasses only, and takes two arguments:pattern(type, value)— e.g.pattern :url, 'github.com/**/issues/*'. The callpattern 'github.issues.*'was wrong on two levels: wrong base class and wrong argument signature.Removing the call stops the
NoMethodErrorthat fired on class load.IssuesActoris a subscription actor — its routing is driven by queue binding, not pattern registration. TheAbsorbers::Issuesclass registers withPatternMatcherindependently viaBuilders::Absorbersduring boot, and is unaffected by this change.