Changelog
List of aperture PRs merged since 2.3.0 release. For the full list of changes, see [list of changes][changes]
Fixed typo in aperturectl log (2065)
Bug fix:
- Fixed a minor typo in the log message of cmd/aperturectl/cmd/utils/controller.go
> 🎉 A tiny typo fixed, our code now shines,
> With every letter in its place, it gracefully aligns.
> A small change indeed, but worth the cheer,
> For clarity and precision, we hold so dear. 🌟
Use custom PolicyMessage for passing policies to be wrapped (2064)
**New Feature:**
- Introduced `PolicyMessage` type with custom JSON marshaling and
unmarshaling
- Replaced `syncv1.PolicyWrapper` with `iface.PolicyMessage` for
improved policy handling
> 🎉 A new dawn for policies, we cheer,
> With `PolicyMessage`, the path is clear.
> Farewell to `syncv1.PolicyWrapper`, old friend,
> Embrace the change, as new features ascend! 🚀
global token bucket: decide based on deadline (2063)
![Screenshot 2023-05-30 at 10 35 15
PM](https://github.com/fluxninja/aperture/assets/18579817/5023d125-0c62-4f77-b202-99ebee3de07e)
**New Feature:**
- Added `Deadline` field to `takeNRequest` struct in global-token-bucket
- Implemented deadline-based rejection for token requests exceeding wait
time
> 🎉 A deadline we set, to keep things fair,
> ⏰ No more waiting, when tokens are rare.
> 🚀 With global token bucket's new might,
> ✨ Our rate limiter shines ever so bright!
wfq: refactor locking (2062)
Description of change
Now that we have global token buckets, we need to release locks before
accessing the token bucket in order to unblock parallel requests.
![Screenshot 2023-05-30 at 9 53 45
PM](https://github.com/fluxninja/aperture/assets/18579817/550fed37-6b78-42d6-a2b6-e8f5ec45eb71)
![Screenshot 2023-05-30 at 10 11 03
PM](https://github.com/fluxninja/aperture/assets/18579817/cc7fdaad-f964-4d46-878e-0d628bd7b985)
**Refactor:**
- Updated locking mechanisms in various flow control actuators and
schedulers to unblock parallel requests
- Added `context.Context` parameter to `Limiter`, `RateLimiter`, and
`Scheduler` interfaces for better lock handling
**Test:**
- Modified `MockLimiter`, `MockRateLimiter`, and `MockScheduler` methods
to include a `context.Context` parameter
> 🎉 Parallel requests now fly, 🚀
> Unblocked, soaring through the sky. 🌌
> Locks released with context's grace, 🔓
> Our code performs at a swifter pace! 💨
Allow extensions to modify also dynamic parts of collector config (2041)
Allow extensions to modify also dynamic parts of collector config.
In previous approach, extensions were able to provide their own part of
collector config only based on base config, with no ability to depend on
dynamic parts of config. This was preventing eg. fluxninja extesion to
add fluxninja exporters to custom metric pipelines (infra meters).
This commit reverts the idea of multiple config providers. Extension
now provide their config by "hooks" instead. Hooks are executed on every
config udpate, so now extensions can modify also the dynamically
injected parts of config.
Drive-by:
* Actually wait for collector's shutdown in its stop hook.
* Rename structs in otelcollector/config package to avoid stutter.
* Add some logging to fluxninja extension.
Resolves 2001
Fixed issue of incorrect value of setpoint constant variable (2054)
Ref 2052
Optimization
- Improved performance in `pkg/policies/controlplane/components/variable.go` by adding an early return statement to avoid unnecessary computation.
> 🎉 A leap in code, swift and wise,
> 🚀 With early returns, performance flies!
> 🌟 Optimized, our code now gleams,
> 😄 For better software, we all dream!
[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.3.0...releases/aperture-controller/v2.3.1