@@ -172,11 +172,6 @@ def verify_trust_domain_v2_routes(
172172
173173 for route in routes :
174174 if route .startswith (route_prefix ):
175- # Check for invalid / in the route
176- if "/" in route :
177- raise Exception (
178- f"{ task .label } has invalid route with forward slash: { route } "
179- )
180175 if route in scratch_pad :
181176 raise Exception (
182177 f"conflict between { task .label } :{ scratch_pad [route ]} for route: { route } "
@@ -214,11 +209,6 @@ def verify_routes_notification_filters(
214209
215210 for route in routes :
216211 if route .startswith (route_prefix ):
217- # Check for invalid / in the route
218- if "/" in route :
219- raise Exception (
220- f"{ task .label } has invalid route with forward slash: { route } "
221- )
222212 # Get the filter of the route
223213 route_filter = route .split ("." )[- 1 ]
224214 if route_filter not in valid_filters :
@@ -233,6 +223,25 @@ def verify_routes_notification_filters(
233223 )
234224 )
235225
226+ @verifications .add ("full_task_graph" )
227+ def verify_routes_invalid_slash (
228+ task , taskgraph , scratch_pad , graph_config , parameters
229+ ):
230+ """
231+ This function ensures that routes do not contain forward slashes.
232+ """
233+ if task is None :
234+ return
235+ task_dict = task .task
236+ routes = task_dict .get ("routes" , [])
237+
238+ for route in routes :
239+ # Check for invalid / in the route
240+ if "/" in route :
241+ raise Exception (
242+ f"{ task .label } has invalid route with forward slash: { route } "
243+ )
244+
236245
237246@verifications .add ("full_task_graph" )
238247def verify_dependency_tiers (task , taskgraph , scratch_pad , graph_config , parameters ):
0 commit comments