chaojixinren opened a new pull request, #6571:
URL: https://github.com/apache/camel-k/pull/6571
## Summary
This PR addresses #6567 by moving controller action declarations from
reconcile-time to reconciler initialization.
- Introduce `actionFactory` in controller reconcilers and initialize action
factories in `newReconciler(...)`
- Replace inline `[]Action{...}` declarations in `Reconcile(...)` with
`newActions(...)` creation
- Cover all relevant controllers:
- `catalog`
- `integration`
- `integrationkit`
- `integrationplatform`
- `pipe`
- Add/extend unit tests to verify:
- expected action order/types
- fresh action instances are created on each call
- synthetic/non-synthetic branching for integration controller
Closes #6567
## Test Plan
- [x] `go test ./pkg/controller/integration/ ./pkg/controller/catalog/
./pkg/controller/integrationkit/ ./pkg/controller/integrationplatform/
./pkg/controller/pipe/ -run TestNewActions -v`
- [x] `go vet ./pkg/controller/integration/ ./pkg/controller/catalog/
./pkg/controller/integrationkit/ ./pkg/controller/integrationplatform/
./pkg/controller/pipe/`
- [x] `./bin/golangci-lint run --config .golangci.yml --timeout 5m
./pkg/controller/integration/ ./pkg/controller/catalog/
./pkg/controller/integrationkit/ ./pkg/controller/integrationplatform/
./pkg/controller/pipe/`
--
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]