AsperforMias opened a new pull request, #1171:
URL: https://github.com/apache/dubbo-go-samples/pull/1171

   ## Summary
   
   Add `admin/`, a sample that runs a dubbo-go provider and consumer under 
Dubbo Admin and checks end to end what Admin shows and controls for them:
   
   - applications, instances, services, and method signatures from the metadata 
center;
   - calling a method from Admin's debug page;
   - condition routes, tag routes, and instance traffic disabling created in 
Admin, observed through where real calls go;
   - request metrics and traces, through Admin's PromQL proxy and its Grafana 
and Jaeger dashboards.
   
   `./start.sh` builds the binaries, extracts Admin's Grafana dashboards from 
the pinned commit, and starts Nacos, Dubbo Admin, Prometheus, an OpenTelemetry 
Collector, Jaeger, Grafana, two providers, and a consumer. `docker compose run 
--rm verify` runs the checks through Admin's API:
   
   ```text
   PASS  Admin lists the provider application with two instances
   PASS  Admin lists both provider instances with their IPs
   PASS  Admin shows the service with its version and group
   PASS  Admin shows the Greet method from published metadata
   PASS  Admin invokes Greet on provider-a through its debug API
   PASS  Without rules, calls reach both providers
   PASS  Condition route from Admin pins calls to provider-a
   PASS  Tag route from Admin sends gray calls to provider-b
   PASS  Traffic disable from Admin drains provider-b
   PASS  Admin queries consumer and provider request metrics
   PASS  Traces reach Jaeger and Admin links the trace dashboard
   all 11 checks passed
   ```
   
   The two providers run in separate containers because Admin disables traffic 
per IP. The README in both languages walks through the same steps in the Admin 
UI.
   
   No published Admin image contains these features yet, so Compose builds 
Admin from a pinned dubbo-admin commit. For the same reason the sample is not 
added to `start_integrate_test.sh`: CI would build Admin on every run.
   
   ## Validation
   
   - From a fresh `docker compose down -v`, `./start.sh` followed by `verify` 
passes all checks, repeatedly. A clean clone of this branch also starts and 
passes.
   - Consumers started right after a cold Nacos reach both providers within two 
seconds.
   - `golangci-lint run ./admin/...` reports 0 issues; the license header check 
and `imports-formatter` pass.
   - Locally, Admin was built on the host from the pinned commit, because the 
registry in Admin's `Dockerfile` (`swr.cn-north-4.myhuaweicloud.com`) was 
unreachable from here. Compose's own build path, which uses that `Dockerfile`, 
was not exercised.
   
   ## Notes for reviewers
   
   - The consumer configures a config center with group `dubbo`, where Admin 
writes rules; without it dubbo-go's routers stay disabled.
   - The Nacos Go client registers a new config listener with the server on its 
next listen cycle, and one registered while a cycle is in flight can wait for 
the five-minute full sync. On a cold start this left a consumer without 
providers for five minutes, so the consumer waits for the providers' health 
checks, and `verify` waits one cycle after subscribing before it changes rules.
   - Application-level panels include the Triple health-check watch each 
dubbo-go consumer opens to every provider at startup (about 20 seconds long), 
so the application's response time looks high; the README points to the 
service-level panel.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to