Skip to content

Conversation

@muchnik
Copy link
Contributor

@muchnik muchnik commented Nov 11, 2025

I've added all parameters to shortcut field order for CB.
Fixes #3974

@Override
public List<String> shortcutFieldOrder() {
return singletonList(NAME_KEY);
return Arrays.asList(NAME_KEY, FALLBACK_URI_KEY, ROUTE_ID_KEY, STATUS_CODES_KEY, RESUME_WITHOUT_ERROR_KEY);
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this will work. RouteId should be set dynamically, not by a usewr. status codes is a set. I think if you need all these things, you shouldn't use the shortcut.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Spencer,

Thank you for the feedback. Based on your points, it makes sense to exclude routeId from the shortcutFieldOrder() method since it should indeed be set dynamically and not by the user configuration.

To align with this, I suggest the following adjustment to only include parameters suitable for shortcut usage and remove the routeId

@Override
public List<String> shortcutFieldOrder() {
    return Arrays.asList(NAME_KEY, FALLBACK_URI_KEY, STATUS_CODES_KEY, RESUME_WITHOUT_ERROR_KEY);
}

That would work?

Copy link
Member

Choose a reason for hiding this comment

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

Again, statusCodes is a set and will not work in combination with others as a shortcut.

@spencergibb
Copy link
Member

Why not use the long form configuration?

@muchnik
Copy link
Contributor Author

muchnik commented Nov 11, 2025

Why not use the long form configuration?

I will re-check how we are generating parameters from database, maybe we are using generated names and should move to named parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid shortcut field order configuration in circuit breaker filter factory

3 participants