Skip to content

Commit e12d3db

Browse files
committed
revert(pipeline): drop two hunks that change no output (DeusData#2768)
calls_emit_unresolved_service order: resolve_single_call already emits every callee-matched HTTP/ASYNC call with a URL argument before it reaches the empty-resolution fallback, and the global fetch has no route suffix, so the order inside the fallback never decides an edge. route_edge_visitor method fallback: every HTTP_CALLS emitter writes "method" exactly when cbm_service_pattern_http_method(callee) finds a verb, so recomputing it from the stored callee always yields NULL there. Both files return to their main versions. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 22a7dff commit e12d3db

2 files changed

Lines changed: 5 additions & 13 deletions

File tree

‎src/pipeline/pass_calls.c‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -939,20 +939,15 @@ static int calls_emit_unresolved_service(cbm_pipeline_ctx_t *ctx, const CBMCall
939939
const char **imp_keys, const char **imp_vals,
940940
int imp_count, const char *route_mount, CBMLanguage lang,
941941
CBMCallEvidence *evidence) {
942-
cbm_svc_kind_t svc = cbm_service_pattern_match(call->callee_name);
943-
if (svc == CBM_SVC_NONE && cbm_service_pattern_is_global_fetch(call->callee_name)) {
944-
svc = CBM_SVC_HTTP;
945-
}
946-
if (svc == CBM_SVC_HTTP || svc == CBM_SVC_ASYNC) {
947-
if (calls_emit_service_call(ctx, call, source_node, svc, NULL, evidence)) {
948-
return SKIP_ONE;
949-
}
950-
}
951942
if (calls_emit_route_call(ctx, call, source_node, module_qn, imp_keys, imp_vals, imp_count,
952943
route_mount, lang, evidence)) {
953944
return SKIP_ONE;
954945
}
955-
return 0;
946+
cbm_svc_kind_t svc = cbm_service_pattern_match(call->callee_name);
947+
if (svc == CBM_SVC_NONE && cbm_service_pattern_is_global_fetch(call->callee_name)) {
948+
svc = CBM_SVC_HTTP;
949+
}
950+
return calls_emit_service_call(ctx, call, source_node, svc, NULL, evidence);
956951
}
957952

958953
/* Apply the field-call policy after a registry target has been found. */

‎src/pipeline/pass_route_nodes.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ static void route_edge_visitor(const cbm_gbuf_edge_t *edge, void *userdata) {
113113
json_extract(edge->properties_json, "method", method_buf, sizeof(method_buf));
114114
const char *broker =
115115
json_extract(edge->properties_json, "broker", broker_buf, sizeof(broker_buf));
116-
if (!method && strcmp(edge->type, "HTTP_CALLS") == 0 && callee) {
117-
method = cbm_service_pattern_http_method(callee);
118-
}
119116

120117
/* Build Route QN */
121118
char route_qn[CBM_ROUTE_QN_SIZE];

0 commit comments

Comments
 (0)