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

feat: get cached routes to filter out mismatched mixed routes against requested protocol versions #1065

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jsy1218
Copy link
Member

@jsy1218 jsy1218 commented Apr 1, 2025

part 2 is to filter out the cached routes which happens to be mixed route, and when requested protocol versions include MIXED. We need to ensure, when this happens, mixed route needs to have exact requested protocol versions match, e.g. V2,V3, then MIXED routes has to include V2,V3 in protocolsInvolved.

Pending e2e test

Copy link
Member Author

jsy1218 commented Apr 1, 2025

@jsy1218 jsy1218 force-pushed the siyujiang/route-441-in-get-cached-routes-use-protocolsinvolved-to-filter-out branch from 5f82ac7 to df29b9a Compare April 4, 2025 02:07
// requested protocols do not involve MIXED, so there is no need to filter by protocolsInvolved
!protocols.includes(Protocol.MIXED) ||
// we know MIXED is getting requested, in this case, we need to ensure that protocolsInvolved contains at least one of the requested protocols
protocols.includes(record.protocolsInvolved.split(','))
Copy link
Collaborator

Choose a reason for hiding this comment

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

protocols.includes(record.protocolsInvolved.split(','))
shouldn't we here make sure that all protocolsInvolved are in protocols

Copy link
Member Author

Choose a reason for hiding this comment

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

yep changed to protocols.every((protocol) => (record.protocolsInvolved as String).split(',').includes(protocol)). I also realized that after sending out the PR

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.

2 participants