codex/devrel-3152
4 次代码提交
| 作者 | SHA1 | 备注 | 提交日期 | |
|---|---|---|---|---|
|
|
c7657f73f4 |
Refactor agent plan storage, update docs, and release v6 (#2977)
goreleaser / goreleaser (push) Has been cancelled
* test(harness): read agent plan from the scoped store
The store-scoping change moved an agent's plan from the default table
key agent/{name}/plan to its own table (database "agent", table {name},
key "plan"). The plan-delegate harness tests still read the old key and
failed with 'not found'; read through store.Scope(mem, "agent", name)
like the agent does.
* docs: orient agents-first across README, landing, and docs overview
Lead with agents (then services and flows), surface MCP + A2A as the
interop story, and frame agents as services. Landing hero and feature
grid reordered agents-first with an A2A gateway card.
* v6: module path go-micro.dev/v6, TLS secure by default, NewService
Cut v6. Three breaking changes, bundled so the major bump is paid once:
- Module path go-micro.dev/v5 -> go-micro.dev/v6 across all imports + go.mod.
- TLS verification on by default (was off). MICRO_TLS_SECURE removed;
MICRO_TLS_INSECURE=true opts out for self-signed/dev.
- micro.NewService(name, opts...) is the canonical service constructor,
symmetric with NewAgent/NewFlow; micro.New kept as a deprecated alias;
the old name-less NewService(opts...) removed. Generators emit NewService.
Also ports the JWT auth token provider in-module (go-micro.dev/v6/auth/jwt/token
on golang-jwt/jwt/v5), dropping the v5-pinned github.com/micro/plugins/v5/auth/jwt
and the deprecated dgrijalva/jwt-go.
Docs/README/landing updated to v6 and @latest; v5->v6 migration guide added;
CHANGELOG cut as [6.0.0]. Blog posts left at their historical versions.
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
baeb282cf1 |
Enhance cache rate limiting to prevent registry overload during rolling deployments (#2824)
* Initial plan * Enhance cache rate limiting to protect against rolling deployment scenarios Per @asim's feedback, rate limiting now applies to ALL cache refresh attempts (not just error cases) to prevent registry overload during rolling deployments. Changes: - Rate limit ALL refresh attempts using lastRefreshAttempt tracking - Always return stale cache if available (even if expired) when rate limiting - Only return ErrNotFound when no cache exists during rate limit period - Rate limiting happens inside singleflight to avoid race conditions - Update test to reflect new behavior (no retry when stale cache + rate limit) - Enhanced documentation with rolling deployment scenario examples This addresses the scenario where all upstream services expire their cache simultaneously during a downstream rolling deployment, which would previously cause a stampede to the registry under high QPS. Co-authored-by: asim <17530+asim@users.noreply.github.com> * Remove unused failedAttempts and consecutiveFailures fields Per @asim's feedback, these fields are no longer needed since the new rate limiting strategy uses lastRefreshAttempt to track ALL refresh attempts, not just failed ones. Removed: - failedAttempts map[string]time.Time - consecutiveFailures int - All code that sets these fields The rate limiting logic now only uses lastRefreshAttempt, making these fields redundant. All tests continue to pass. Co-authored-by: asim <17530+asim@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: asim <17530+asim@users.noreply.github.com> |
||
|
|
2869cc16d1 |
Add adaptive throttling to registry cache to prevent penetration when no stale cache exists (#2823)
* Initial plan * Add adaptive throttling to prevent cache penetration without stale cache Implement rate limiting mechanism to protect etcd when: - Cache is empty (no stale data available) - Registry is failing/overloaded - Multiple sequential requests arrive Changes: - Add MinimumRetryInterval option (default 5s) - Track last failed attempt time per service - Throttle requests within retry interval when no cache exists - Clear throttling on successful lookup - Add comprehensive tests validating throttling behavior Co-authored-by: asim <17530+asim@users.noreply.github.com> * Fix WaitGroup race condition in events stream tests The WaitGroup.Add() calls were happening after goroutines started, causing a race where Done() could be called before Add(), resulting in "negative WaitGroup counter" panics. Fixes: - Move wg.Add(1) before goroutine in TestConsumeTopic - Move wg.Add(2) before first goroutine in TestConsumeGroup Co-authored-by: asim <17530+asim@users.noreply.github.com> * Update registry cache documentation with adaptive throttling feature Document the new adaptive throttling feature that prevents cache penetration when registry is failing and no stale cache exists. Includes: - Feature overview - Usage examples with configuration options - Explanation of throttling behavior - Example scenario demonstrating protection Co-authored-by: asim <17530+asim@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: asim <17530+asim@users.noreply.github.com> |
||
|
|
dbb66ec938 |
Fix etcd auth overload and cache stampede with KeepAlive channels (#2822)
* Initial plan * Replace KeepAliveOnce with KeepAlive to reduce etcd auth requests Co-authored-by: asim <17530+asim@users.noreply.github.com> * Add tests to verify cache penetration protection via singleflight Co-authored-by: asim <17530+asim@users.noreply.github.com> * Add etcd integration tests to CI workflow Co-authored-by: asim <17530+asim@users.noreply.github.com> * Fix race conditions and improve code quality based on review feedback Co-authored-by: asim <17530+asim@users.noreply.github.com> * Add workflow permissions to fix security scan finding Co-authored-by: asim <17530+asim@users.noreply.github.com> * Add comprehensive documentation for performance improvements Co-authored-by: asim <17530+asim@users.noreply.github.com> * Fix memory store limit/offset bug causing events test failure Co-authored-by: asim <17530+asim@users.noreply.github.com> * Fix memory store to filter before limiting in prefix/suffix reads The previous fix had a logic error where limit/offset were applied before prefix/suffix filtering. This could cause incorrect results when the first N items in the unfiltered list don't match the search criteria. Now filters first to get all matching keys, then applies limit/offset to the filtered results. This ensures ReadLimit(1) always returns 1 matching record if available, regardless of map iteration order. Co-authored-by: asim <17530+asim@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: asim <17530+asim@users.noreply.github.com> |