You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xiaobaicai66695 (via GitHub)" <gi...@apache.org> on 2026/08/14 07:54:39 UTC

[I] [Bug]: v3 dynamic configurator reads the wrong version key and cannot handle empty match [dubbo-go]

xiaobaicai66695 opened a new issue, #3661:
URL: https://github.com/apache/dubbo-go/issues/3661

   ## What happened?
   
   A standard v3 dynamic configurator rule cannot reliably execute the v3 matching path.
   
   Expected:
   
   - The rule-level YAML field `configVersion: v3.0` selects `configureIfMatchV3`.
   - An omitted match or `match: {}` means match-all.
   - A partial match evaluates only the dimensions explicitly configured.
   - Matching parameters such as `loadbalance` are applied to the target URL.
   
   Actual:
   
   - `DefaultConfigurationParser` writes the rule version to the generated URL as `configVersion`.
   - `overrideConfigurator` reads `constant.ConfigVersionKey`, whose value is `config-center.configVersion` and belongs to the config-center component parameter namespace.
   - The version lookup therefore returns empty and the standard v3 rule falls into `configureDeprecated`, bypassing v3 match semantics. Simple rules may still appear to work through the deprecated path, producing a false-positive integration result.
   - When the v3 path is reached, an omitted or empty `ConditionMatch` contains nil pointers. `ConditionMatch.IsMatch` dereferences `Address`, `ProviderAddress`, `Service`, and `App` unconditionally, so match-all and partial matches can panic before parameters are applied.
   
   The version-key collision was introduced when config-center component keys were namespaced from values such as `configVersion` to `config-center.configVersion`; the configurator continued reusing that component constant for the rule schema.
   
   ## How can we reproduce it?
   
   Use a v3 application-scoped dynamic configuration such as:
   
   ```yaml
   configVersion: v3.0
   enabled: true
   key: demo-consumer
   scope: application
   configs:
     - side: consumer
       match: {}
       enabled: true
       parameters:
         loadbalance: roundrobin
   ```
   
   1. Parse the YAML with `DefaultConfigurationParser.ParseToUrls`.
   2. Observe that the generated configurator URL contains `configVersion=v3.0`.
   3. Pass that URL to `overrideConfigurator.Configure`.
   4. The configurator looks for `config-center.configVersion`, does not recognize the v3 rule, and enters the deprecated path.
   5. If version dispatch is corrected independently, evaluating the empty match reaches nil matcher fields and can panic.
   
   A non-matching application constraint also demonstrates the incorrect dispatch: the parameter is applied by the deprecated path even though the v3 match should reject the target URL.
   
   This blocks an end-to-end assertion of the intended chain:
   
   ```text
   Admin rule -> config center data -> v3 parser/configurator -> target URL parameters -> invocation behavior
   ```
   
   ## Environment
   
   - dubbo-go: `develop` at `a10df2f7`
   - Go: `go1.25.5`
   - OS: Windows amd64; the issue is platform-independent
   - Config center: ZooKeeper


-- 
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-unsubscribe@dubbo.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug]: v3 dynamic configurator reads the wrong version key and cannot handle empty match [dubbo-go]

Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on issue #3661:
URL: https://github.com/apache/dubbo-go/issues/3661#issuecomment-5303025793

   Please do not push down any further commits or changes regarding this task. We are reserving this feature/project for OSPP 


-- 
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-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug]: v3 dynamic configurator reads the wrong version key and cannot handle empty match [dubbo-go]

Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on issue #3661:
URL: https://github.com/apache/dubbo-go/issues/3661#issuecomment-5314343910

   @AsperforMias help review 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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug]: v3 dynamic configurator reads the wrong version key and cannot handle empty match [dubbo-go]

Posted by "AsperforMias (via GitHub)" <gi...@apache.org>.
AsperforMias commented on issue #3661:
URL: https://github.com/apache/dubbo-go/issues/3661#issuecomment-5314375472

   okay, needs some time for check


-- 
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-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org