phanikumv commented on code in PR #76967:
URL: https://github.com/apache/airflow/pull/76967#discussion_r4679181482
##########
ts-sdk/src/coordinator/arg-binding.ts:
##########
@@ -156,6 +165,35 @@ function checkBindable(binding: TaskArgBinding): void {
);
}
+/**
+ * Fields that resolve an argument per map index, which this SDK does not do
yet.
+ * A literal never carries `map_index` or `element_index`, so one list serves
both kinds.
+ */
+const UNSUPPORTED_FIELDS = [
+ "map_index",
+ "element_index",
+ "apply_map",
+ "kwarg",
+ "fallback",
+] as const;
+
+/** Refuse a binding carrying a field that ignoring would bind to the wrong
value. */
+function checkSupportedFields(binding: XComArgBinding | LiteralArgBinding):
void {
+ const fields: Partial<Record<(typeof UNSUPPORTED_FIELDS)[number], unknown>>
= binding;
+ for (const field of UNSUPPORTED_FIELDS) {
+ const value = fields[field];
+ if (value == null || value === false) continue;
Review Comment:
No existing test covers this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]