Commit 5027a3f
committed
fix(eval): route eval-run/eval-set-run API calls by AgentId
The SDK's StudioWebProgressReporter was using UIPATH_PROJECT_ID for
both the API URL (/api/execution/agents/{id}/evalRun) and the file
fetch context. For local-workspace runs those are different IDs:
file source is the cloud debug project's GUID, agent is the user's
logical agent.
Honoring the AgentId in API calls so the route URL reflects the real
logical agent. File fetching (UiPathConfig.project_id, used by
StudioClient/ResourceOverwritesContext in cli_eval.py) keeps using
the file-source project, since that is where the worker's package
files live.
Changes:
- StudioWebProgressReporter now exposes self._agent_id (UIPATH_AGENT_ID
with fallback to self._project_id). Every API URL construction and
the agentId payload field now use _agent_id.
- self._project_id is preserved for the file-source semantic (env-var
fallback for AgentId resolution); no remaining read sites in the
reporter, but kept as the explicit "if file source ever needs
callbacks" hook.
Tests added in TestAgentIdRouting (test_progress_reporter.py):
- _agent_id used in URL when both UIPATH_AGENT_ID and UIPATH_PROJECT_ID set
- agentId payload field carries _agent_id, not file source
- Falls back to project_id (file source) when UIPATH_AGENT_ID unset
1826 reporter tests pass (3 new).
Refs: AE-13961 parent fedbfa2 commit 5027a3f
2 files changed
Lines changed: 90 additions & 10 deletions
File tree
- packages/uipath
- src/uipath/_cli/_evals
- tests/cli/eval
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
1133 | 1134 | | |
1134 | 1135 | | |
1135 | 1136 | | |
1136 | | - | |
| 1137 | + | |
1137 | 1138 | | |
1138 | 1139 | | |
1139 | 1140 | | |
| |||
1181 | 1182 | | |
1182 | 1183 | | |
1183 | 1184 | | |
1184 | | - | |
| 1185 | + | |
1185 | 1186 | | |
1186 | 1187 | | |
1187 | 1188 | | |
| |||
1253 | 1254 | | |
1254 | 1255 | | |
1255 | 1256 | | |
1256 | | - | |
| 1257 | + | |
1257 | 1258 | | |
1258 | 1259 | | |
1259 | 1260 | | |
| |||
1283 | 1284 | | |
1284 | 1285 | | |
1285 | 1286 | | |
1286 | | - | |
| 1287 | + | |
1287 | 1288 | | |
1288 | 1289 | | |
1289 | 1290 | | |
| |||
1309 | 1310 | | |
1310 | 1311 | | |
1311 | 1312 | | |
1312 | | - | |
| 1313 | + | |
1313 | 1314 | | |
1314 | 1315 | | |
1315 | 1316 | | |
| |||
1374 | 1375 | | |
1375 | 1376 | | |
1376 | 1377 | | |
1377 | | - | |
| 1378 | + | |
1378 | 1379 | | |
1379 | 1380 | | |
1380 | 1381 | | |
| |||
1406 | 1407 | | |
1407 | 1408 | | |
1408 | 1409 | | |
1409 | | - | |
| 1410 | + | |
1410 | 1411 | | |
1411 | 1412 | | |
1412 | 1413 | | |
1413 | 1414 | | |
1414 | | - | |
| 1415 | + | |
1415 | 1416 | | |
1416 | 1417 | | |
1417 | 1418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
0 commit comments