Revolyssup commented on code in PR #12426:
URL: https://github.com/apache/apisix/pull/12426#discussion_r2244917725


##########
apisix/upstream.lua:
##########
@@ -569,9 +448,9 @@ local function filter_upstream(value, parent)
     if not value then
         return
     end
-
-    value.parent = parent
-
+    value.resource_key = parent and parent.key
+    value.resource_version = ((parent and parent.modifiedIndex) or 
value.modifiedIndex)
+    value.resource_id = ((parent and parent.value.id) or value.id)

Review Comment:
   We already have this problem of special case with maintaining `.parent` 
everywhere. According to me this `.parent` is much less maintainable and spread 
at different places in code.  



-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to