This is an automated email from the ASF dual-hosted git repository. xtsong pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/flink-agents.git
commit 26c5aa58d24ed9b32716a61a120be7ff40f9ad53 Author: WenjinXie <[email protected]> AuthorDate: Mon Sep 22 13:39:25 2025 +0800 [hotfix] Fix register resources in environment. --- api/src/main/java/org/apache/flink/agents/api/Agent.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/apache/flink/agents/api/Agent.java b/api/src/main/java/org/apache/flink/agents/api/Agent.java index 6c7ed5f..c36318c 100644 --- a/api/src/main/java/org/apache/flink/agents/api/Agent.java +++ b/api/src/main/java/org/apache/flink/agents/api/Agent.java @@ -82,7 +82,10 @@ public class Agent { } public void addResourcesIfAbsent(Map<ResourceType, Map<String, Object>> resources) { - resources.forEach(this.resources::putIfAbsent); + for (ResourceType type : resources.keySet()) { + Map<String, Object> typedResources = resources.get(type); + typedResources.forEach(this.resources.get(type)::putIfAbsent); + } } /**
