Skip to content

Conversation

@vlktna
Copy link
Member

@vlktna vlktna commented Dec 5, 2025

When validation is enabled and a new invalid route is created, it gets rejected and a metric is emitted. But when the route is later fixed, the old metric is not removed. Once the route is fixed, there is no error, so the corrected route no longer matches the old metric key.

@vlktna vlktna added the bugfix Bug fixes and patches label Dec 5, 2025
@vlktna vlktna force-pushed the remove-invalid-route-metric-delition branch from 285d7f4 to bc7cf9a Compare December 5, 2025 17:08
When validation is enabled and a new invalid route is created, it gets rejected and a metric is emitted. But when the route is later fixed, the old metric is not removed. Once the route is fixed, there is no error, so the corrected route no longer matches the old metric key.

Signed-off-by: Veronika Volokitina <[email protected]>
@vlktna vlktna force-pushed the remove-invalid-route-metric-delition branch from bc7cf9a to 8316d1a Compare December 5, 2025 17:09
// This function is exported to be used by validation webhooks.
func ValidateRoute(o *Options, def *eskip.Route) (*Route, error) {
return processRouteDef(o, mapPredicates(o.Predicates), def)
return processRouteDef(o, mapPredicates(o.Predicates), def) //
Copy link
Member

Choose a reason for hiding this comment

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

cleanup

@szuecs
Copy link
Member

szuecs commented Dec 5, 2025

👍

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

Labels

bugfix Bug fixes and patches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants