api7 / api7/api7-ingress-controller
bug: sync_period 0 stops API7 synchronization events and retries
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5
- Forks
- 5
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 10
Description
Problem
API7 Ingress Controller 2.1.0 defaults the api7ee provider to sync_period: 0s. In api7eeProvider.Start, startup synchronization runs, but the method then returns when SyncPeriod < 1 instead of entering the event loop.
Consequently, a zero period disables more than the periodic ticker:
syncChnotifications are no longer consumed. For example,GatewayProxyconfiguration updates can update the cache and callsyncNotifywithout applying the change to the gateway.- retry notifications are no longer consumed.
- startup and delayed-startup synchronization failures do not reliably enter the retry path.
Expected behavior
sync_period: 0s should disable only periodic full synchronization. Explicit synchronization events, retries, and cancellation handling should remain active.
Additional lifecycle risk
The delayed startup synchronization currently uses time.AfterFunc, so it can run concurrently with the main synchronization loop or after Start returns. Synchronization, status handling, and retrier state changes should remain serialized in one loop.
Reference implementation
PR #457 contains a tested candidate fix and regression coverage, but is being closed so the implementation can be owned and reviewed by Ingress Controller engineering.
Validation completed on that patch:
go test -v ./internal/provider/api7eego test ./internal/provider/...go test -race ./internal/provider/api7ee
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at api7eeProvider.Start and review PR #457's tested candidate and regression coverage. Run go test -v ./internal/provider/api7ee, go test ./internal/provider/..., and go test -race ./internal/provider/api7ee; done means sync_period 0 disables only periodic sync while events, retries, cancellation, and delayed startup remain serialized.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100