Aperture-py

Latest version: v2.26.0

Safety actively analyzes 688674 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 25 of 53

2.5.0

Changelog

List of aperture PRs merged since 2.4.0 release. For the full list of changes, see [list of changes][changes]

Filter out high cardinality platform metrics (2159)

To decrease load on Prometheus in large scale this makes pushing high cardinality platform metrics optional.

Add Retry-After header when Rate Limiter rejects flow (2156)

Every limiter now optionally returns recommended wait time when
rejecting the flow (this is implemented only for Rate Limiters for now).
Maximum wait time reported by limiters is stored as a (new) WaitTime
field in CheckResponse.

Envoy Authorization and CheckHttp services translate this wait time into
Retry-After header. So all http integrations should have support for
this new header with no further changes.

Note: This works in practice only with global token bucket ratelimiter,
lazy sync ratelimiter usually doesn't report wait time.

Resolves 2056

Simplify scheduler priority and remove fairness key (2142)

Description of change

![screencapture-localhost-3000-d-1cafa24eadc87e0eeb9217b9179e31473bcfa21d-aperture-service-protection-2023-06-13-09_09_40](https://github.com/fluxninja/aperture/assets/1553055/b4d60b4f-e184-40a4-afc6-0553e86b9669)

**New Feature:**
- Simplified scheduler priority by removing fairness key and changing
priority level to an unbounded positive integer
- Introduced `workload` struct to hold workload information, including
inverse priority
- Updated `Scheduler` struct with a `defaultWorkload` field
- Modified `Decide` function to use inverse priority of matched workload

**Refactor:**
- Added new package `utils` with LCM and GCD functions for uint64 arrays
and pairs

**Documentation:**
- Updated flowcontrol.proto and spec.md to reflect changes in scheduler
priority and removal of fairness key

> 🎉 A simpler way to prioritize,
> With fairness key now gone,
> Inverse priority we utilize,
> As our scheduler marches on! 🚀

Remove default kubelet scraper (2151)

We don't want to collect any metrics which are not directly needed by a policy.

Normalized priorities (2127)

Description of change

![screencapture-localhost-3000-d-1cafa24eadc87e0eeb9217b9179e31473bcfa21d-aperture-service-protection-2023-06-12-12_51_40](https://github.com/fluxninja/aperture/assets/1553055/5136dee0-d56b-447d-85b1-c1ec42676ac6)

**New Feature:**
- Added new metrics and counters for incoming and accepted token rate
- Introduced `Request` struct to manage request metadata in controlled
delay and queue limits
- Implemented `SetLoadDecisionValues` function to set load multiplier
based on input value

> 🎉 A new dawn for metrics we see,
> Counters and tokens, they dance with glee.
> Requests now structured, decisions made clear,
> Load multipliers set, as we cheer! 🚀

Rename Regulator to Sampler (2140)

Description of change

<img width="1624" alt="Screenshot 2023-06-12 at 10 39 32 AM"
src="https://github.com/fluxninja/aperture/assets/1553055/f0977e55-fdfd-48fd-bf31-bb88b61c8248">

**Refactor:**
- Renamed `RegulatorInfo` to `SamplerInfo` in protobuf messages
- Renamed `Regulator` component to `Sampler` throughout the codebase

**Documentation:**
- Updated all references and documentation related to the renaming of
the `Regulator` component to `Sampler` in Aperture

> 🎉 Sampler's here, Regulator's gone,
> A new era, a fresh dawn! 🌅
> With clarity we stride ahead,
> Embracing change, no fear or dread. 😄

add blueprint dashboard for the components (2067)

Description of change
Adding dashboards for components in dashboards directory

Remove `--keep-spec-order` and update deps (2123)

**Refactor:**
- Removed `--keep-spec-order` flag and updated dependencies
- Changed command to flatten OpenAPI spec file from YAML to JSON and
back to YAML
- Updated `swagger generate markdown` command to use the updated YAML
file
- Removed intermediate JSON file

> 🎉 A change so smooth, a refactor so fine,
> Flattening specs, in a new design.
> Dependencies updated, commands refined,
> A PR like this, truly one of a kind! 🚀

rename envoy category to istio (2124)


Fixed the destination service name issue in gateways integration (2125)

Nginx:

![image](https://github.com/fluxninja/aperture/assets/34568645/4130ab6c-d2c5-46e1-93b7-247318e58970)

Kong:

![image](https://github.com/fluxninja/aperture/assets/34568645/84c0fcb5-edfb-480e-8bf5-749ca16063d7)

**New Feature:**
- Added integration documentation for Aperture with Gateways

**Bug fix:**
- Fixed issues with destination service name in gateways integration
- Simplified server address and port logic
- Updated plugin's configuration schema

**Refactor:**
- Removed unused imports and variables in gateways integration
- Replaced `destination_hostname` and `destination_port` with hardcoded
values

> 🎉 A gateway shines, the traffic flows,
> Integrations fixed, our confidence grows.
> Unused code gone, simplicity shows,
> With each update, our software glows! 🌟

---------

Co-authored-by: Hasit Mistry <hasitfluxninja.com>

remove top level flow control hierarchy (2121)



[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.4.0...releases/aperture-controller/v2.5.0

2.5.0rc.2

Changelog

List of aperture PRs merged since 2.4.0 release. For the full list of changes, see [list of changes][changes]

Filter out high cardinality platform metrics (2159)

To decrease load on Prometheus in large scale this makes pushing high cardinality platform metrics optional.

Add Retry-After header when Rate Limiter rejects flow (2156)

Every limiter now optionally returns recommended wait time when
rejecting the flow (this is implemented only for Rate Limiters for now).
Maximum wait time reported by limiters is stored as a (new) WaitTime
field in CheckResponse.

Envoy Authorization and CheckHttp services translate this wait time into
Retry-After header. So all http integrations should have support for
this new header with no further changes.

Note: This works in practice only with global token bucket ratelimiter,
lazy sync ratelimiter usually doesn't report wait time.

Resolves 2056

Simplify scheduler priority and remove fairness key (2142)

Description of change

![screencapture-localhost-3000-d-1cafa24eadc87e0eeb9217b9179e31473bcfa21d-aperture-service-protection-2023-06-13-09_09_40](https://github.com/fluxninja/aperture/assets/1553055/b4d60b4f-e184-40a4-afc6-0553e86b9669)

**New Feature:**
- Simplified scheduler priority by removing fairness key and changing
priority level to an unbounded positive integer
- Introduced `workload` struct to hold workload information, including
inverse priority
- Updated `Scheduler` struct with a `defaultWorkload` field
- Modified `Decide` function to use inverse priority of matched workload

**Refactor:**
- Added new package `utils` with LCM and GCD functions for uint64 arrays
and pairs

**Documentation:**
- Updated flowcontrol.proto and spec.md to reflect changes in scheduler
priority and removal of fairness key

> 🎉 A simpler way to prioritize,
> With fairness key now gone,
> Inverse priority we utilize,
> As our scheduler marches on! 🚀

Remove default kubelet scraper (2151)

We don't want to collect any metrics which are not directly needed by a policy.

Normalized priorities (2127)

Description of change

![screencapture-localhost-3000-d-1cafa24eadc87e0eeb9217b9179e31473bcfa21d-aperture-service-protection-2023-06-12-12_51_40](https://github.com/fluxninja/aperture/assets/1553055/5136dee0-d56b-447d-85b1-c1ec42676ac6)

**New Feature:**
- Added new metrics and counters for incoming and accepted token rate
- Introduced `Request` struct to manage request metadata in controlled
delay and queue limits
- Implemented `SetLoadDecisionValues` function to set load multiplier
based on input value

> 🎉 A new dawn for metrics we see,
> Counters and tokens, they dance with glee.
> Requests now structured, decisions made clear,
> Load multipliers set, as we cheer! 🚀

Rename Regulator to Sampler (2140)

Description of change

<img width="1624" alt="Screenshot 2023-06-12 at 10 39 32 AM"
src="https://github.com/fluxninja/aperture/assets/1553055/f0977e55-fdfd-48fd-bf31-bb88b61c8248">

**Refactor:**
- Renamed `RegulatorInfo` to `SamplerInfo` in protobuf messages
- Renamed `Regulator` component to `Sampler` throughout the codebase

**Documentation:**
- Updated all references and documentation related to the renaming of
the `Regulator` component to `Sampler` in Aperture

> 🎉 Sampler's here, Regulator's gone,
> A new era, a fresh dawn! 🌅
> With clarity we stride ahead,
> Embracing change, no fear or dread. 😄

add blueprint dashboard for the components (2067)

Description of change
Adding dashboards for components in dashboards directory

Remove `--keep-spec-order` and update deps (2123)

**Refactor:**
- Removed `--keep-spec-order` flag and updated dependencies
- Changed command to flatten OpenAPI spec file from YAML to JSON and
back to YAML
- Updated `swagger generate markdown` command to use the updated YAML
file
- Removed intermediate JSON file

> 🎉 A change so smooth, a refactor so fine,
> Flattening specs, in a new design.
> Dependencies updated, commands refined,
> A PR like this, truly one of a kind! 🚀

rename envoy category to istio (2124)


Fixed the destination service name issue in gateways integration (2125)

Nginx:

![image](https://github.com/fluxninja/aperture/assets/34568645/4130ab6c-d2c5-46e1-93b7-247318e58970)

Kong:

![image](https://github.com/fluxninja/aperture/assets/34568645/84c0fcb5-edfb-480e-8bf5-749ca16063d7)

**New Feature:**
- Added integration documentation for Aperture with Gateways

**Bug fix:**
- Fixed issues with destination service name in gateways integration
- Simplified server address and port logic
- Updated plugin's configuration schema

**Refactor:**
- Removed unused imports and variables in gateways integration
- Replaced `destination_hostname` and `destination_port` with hardcoded
values

> 🎉 A gateway shines, the traffic flows,
> Integrations fixed, our confidence grows.
> Unused code gone, simplicity shows,
> With each update, our software glows! 🌟

---------

Co-authored-by: Hasit Mistry <hasitfluxninja.com>

remove top level flow control hierarchy (2121)



[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.4.0...releases/aperture-controller/v2.5.0-rc.2

2.5.0rc.1

Changelog

List of aperture PRs merged since 2.4.0 release. For the full list of changes, see [list of changes][changes]

Optimize pre-commit execution time on CI for faster PR validation (2113)

Remove `--keep-spec-order` and update deps (2123)

**Refactor:**
- Removed `--keep-spec-order` flag and updated dependencies
- Changed command to flatten OpenAPI spec file from YAML to JSON and
back to YAML
- Updated `swagger generate markdown` command to use the updated YAML
file
- Removed intermediate JSON file

> 🎉 A change so smooth, a refactor so fine,
> Flattening specs, in a new design.
> Dependencies updated, commands refined,
> A PR like this, truly one of a kind! 🚀

rename envoy category to istio (2124)


Fixed the destination service name issue in gateways integration (2125)

Nginx:

![image](https://github.com/fluxninja/aperture/assets/34568645/4130ab6c-d2c5-46e1-93b7-247318e58970)

Kong:

![image](https://github.com/fluxninja/aperture/assets/34568645/84c0fcb5-edfb-480e-8bf5-749ca16063d7)

**New Feature:**
- Added integration documentation for Aperture with Gateways

**Bug fix:**
- Fixed issues with destination service name in gateways integration
- Simplified server address and port logic
- Updated plugin's configuration schema

**Refactor:**
- Removed unused imports and variables in gateways integration
- Replaced `destination_hostname` and `destination_port` with hardcoded
values

> 🎉 A gateway shines, the traffic flows,
> Integrations fixed, our confidence grows.
> Unused code gone, simplicity shows,
> With each update, our software glows! 🌟

---------

Co-authored-by: Hasit Mistry <hasitfluxninja.com>

remove top level flow control hierarchy (2121)


[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.4.0...releases/aperture-controller/v2.5.0-rc.1

2.4.0

Changelog

List of aperture PRs merged since 2.3.0 release. For the full list of changes, see [list of changes][changes]

Add diagrams for each use case (2090)

- Add mermaid for each use case with explanation below
- Add overview sessions to give high level explanation of use-case
- Add high-level real-world use-case scenario for each use-case
- rename basic service protection to protection
- rename workload-prioritization to prioritization
- fix broken links

**Documentation:**
- Updated and improved use case documentation
- Added diagrams, explanations, and real-world scenarios
- Fixed broken links and renamed files

> 🎉 A new dawn for docs, we've made them shine,
> With diagrams and use cases, they're now so fine.
> Broken links are fixed, and files renamed,
> Our users' understanding will never be the same! 🚀

---------

Co-authored-by: Tanveer Gill <tanveer.gillfluxninja.com>

docs: fix controller API docs (2114)

Description of change

Fix API docs generation

Move service protection escalations into base to enable arbitrary combinations (2061)

**New Feature:**
- Enable arbitrary combinations of service protection escalations and
auto-scaling
- Refactor service protection escalations into the base
- Update documentation for `policy.auto_scaling` section

**Refactor:**
- Remove unused functions in `dashboard.libsonnet` and
`policy.libsonnet`

**Documentation:**
- Add link to auto-scaling base documentation in `README.md`

**Style:**
- Improve rendering of boolean values in `parameterComponents.js`

> 🎉 A new era dawns, with scaling refined, 🚀
> Service protection and auto-scaling combined! 🤝
> Docs updated, code refactored too, 📚
> Celebrate these changes, they're here for you! 🥳

Fixed the API generate issue (2103)


Support policies metadata for policies created by api (2098)

**New Feature:**
- Added support for policy metadata in API-created policies
- Modified `UpsertPolicy` and `DeletePolicy` functions in
policy-service.go to handle policy metadata in etcd
- Updated provider.go to retrieve policy metadata from etcd if not
present in the policy message

> 🎉 A new feature's here, so grand,
> Policy metadata now at hand! 📜
> Upsert, delete, and provide,
> With etcd by our side. 🌟

Do not get stats in ProvideDistCache (2096)

![screencapture-localhost-3000-d-1271a5153713edf320f070459528f54dee4fcd78-aperture-quota-scheduler-2023-06-01-12_10_17](https://github.com/fluxninja/aperture/assets/1553055/4722537e-1dc9-4085-997d-1f23b347a469)


Bug fix:
- Removed unnecessary call to `dc.client.Stats` in `ProvideDistCache` function
- Added deferred call to `utils.Shutdown` for proper Olric instance shutdown



> 🎉 A bug we found, a fix we made,
> In the cache provider, improvements laid.
> Stats call removed, shutdown ensured,
> Our code's performance and health secured. 🚀

Fix DistCache timeout error (2095)

- Added timeout to DistCache client status check
- Introduced configurable service name for ServiceDiscovery

global token bucket: remove key lock (2091)


Update olric to fluxninja-0.5 (2068)

![screencapture-localhost-3000-d-1271a5153713edf320f070459528f54dee4fcd78-aperture-quota-scheduler-2023-05-31-15_39_22](https://github.com/fluxninja/aperture/assets/1553055/94eaee68-a399-4dbd-bbcf-50b76865b061)

**New Feature:**
- Updated DistCache to use an embedded client and improved GetStats
response
- Added context parameter to rate-limiter and flowcontrol functions
- Upgraded Olric library to fluxninja-0.5 in global-token-bucket

**Refactor:**
- Removed unnecessary arguments from newRateLimiterOptions function
- Modified WFQScheduler struct and updated test cases

> 🎉 A leap forward, with changes so grand,
> Contexts and clients, go hand in hand.
> Olric upgraded, token buckets refined,
> Performance and logic, now well-aligned. 🚀

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.4.0

2.4.0rc.2

Changelog

List of aperture PRs merged since 2.3.0 release. For the full list of changes, see [list of changes][changes]

Add diagrams for each use case (2090)

- Add mermaid for each use case with explanation below
- Add overview sessions to give high level explanation of use-case
- Add high-level real-world use-case scenario for each use-case
- rename basic service protection to protection
- rename workload-prioritization to prioritization
- fix broken links

**Documentation:**
- Updated and improved use case documentation
- Added diagrams, explanations, and real-world scenarios
- Fixed broken links and renamed files

> 🎉 A new dawn for docs, we've made them shine,
> With diagrams and use cases, they're now so fine.
> Broken links are fixed, and files renamed,
> Our users' understanding will never be the same! 🚀

---------

Co-authored-by: Tanveer Gill <tanveer.gillfluxninja.com>

docs: fix controller API docs (2114)

Description of change

Fix API docs generation

Move service protection escalations into base to enable arbitrary combinations (2061)

**New Feature:**
- Enable arbitrary combinations of service protection escalations and
auto-scaling
- Refactor service protection escalations into the base
- Update documentation for `policy.auto_scaling` section

**Refactor:**
- Remove unused functions in `dashboard.libsonnet` and
`policy.libsonnet`

**Documentation:**
- Add link to auto-scaling base documentation in `README.md`

**Style:**
- Improve rendering of boolean values in `parameterComponents.js`

> 🎉 A new era dawns, with scaling refined, 🚀
> Service protection and auto-scaling combined! 🤝
> Docs updated, code refactored too, 📚
> Celebrate these changes, they're here for you! 🥳

Fixed the API generate issue (2103)


Support policies metadata for policies created by api (2098)

**New Feature:**
- Added support for policy metadata in API-created policies
- Modified `UpsertPolicy` and `DeletePolicy` functions in
policy-service.go to handle policy metadata in etcd
- Updated provider.go to retrieve policy metadata from etcd if not
present in the policy message

> 🎉 A new feature's here, so grand,
> Policy metadata now at hand! 📜
> Upsert, delete, and provide,
> With etcd by our side. 🌟

Do not get stats in ProvideDistCache (2096)

![screencapture-localhost-3000-d-1271a5153713edf320f070459528f54dee4fcd78-aperture-quota-scheduler-2023-06-01-12_10_17](https://github.com/fluxninja/aperture/assets/1553055/4722537e-1dc9-4085-997d-1f23b347a469)


Bug fix:
- Removed unnecessary call to `dc.client.Stats` in `ProvideDistCache` function
- Added deferred call to `utils.Shutdown` for proper Olric instance shutdown



> 🎉 A bug we found, a fix we made,
> In the cache provider, improvements laid.
> Stats call removed, shutdown ensured,
> Our code's performance and health secured. 🚀

Fix DistCache timeout error (2095)

- Added timeout to DistCache client status check
- Introduced configurable service name for ServiceDiscovery

global token bucket: remove key lock (2091)


Update olric to fluxninja-0.5 (2068)

![screencapture-localhost-3000-d-1271a5153713edf320f070459528f54dee4fcd78-aperture-quota-scheduler-2023-05-31-15_39_22](https://github.com/fluxninja/aperture/assets/1553055/94eaee68-a399-4dbd-bbcf-50b76865b061)

**New Feature:**
- Updated DistCache to use an embedded client and improved GetStats
response
- Added context parameter to rate-limiter and flowcontrol functions
- Upgraded Olric library to fluxninja-0.5 in global-token-bucket

**Refactor:**
- Removed unnecessary arguments from newRateLimiterOptions function
- Modified WFQScheduler struct and updated test cases

> 🎉 A leap forward, with changes so grand,
> Contexts and clients, go hand in hand.
> Olric upgraded, token buckets refined,
> Performance and logic, now well-aligned. 🚀

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.4.0-rc.2

2.4.0rc.1

Changelog

List of aperture PRs merged since 2.3.0 release. For the full list of changes, see [list of changes][changes]

Fixed the API generate issue (2103)


Support policies metadata for policies created by api (2098)

**New Feature:**
- Added support for policy metadata in API-created policies
- Modified `UpsertPolicy` and `DeletePolicy` functions in
policy-service.go to handle policy metadata in etcd
- Updated provider.go to retrieve policy metadata from etcd if not
present in the policy message

> 🎉 A new feature's here, so grand,
> Policy metadata now at hand! 📜
> Upsert, delete, and provide,
> With etcd by our side. 🌟

Do not get stats in ProvideDistCache (2096)

![screencapture-localhost-3000-d-1271a5153713edf320f070459528f54dee4fcd78-aperture-quota-scheduler-2023-06-01-12_10_17](https://github.com/fluxninja/aperture/assets/1553055/4722537e-1dc9-4085-997d-1f23b347a469)


Bug fix:
- Removed unnecessary call to `dc.client.Stats` in `ProvideDistCache` function
- Added deferred call to `utils.Shutdown` for proper Olric instance shutdown



> 🎉 A bug we found, a fix we made,
> In the cache provider, improvements laid.
> Stats call removed, shutdown ensured,
> Our code's performance and health secured. 🚀

Fix DistCache timeout error (2095)

- Added timeout to DistCache client status check
- Introduced configurable service name for ServiceDiscovery

global token bucket: remove key lock (2091)


Update olric to fluxninja-0.5 (2068)

![screencapture-localhost-3000-d-1271a5153713edf320f070459528f54dee4fcd78-aperture-quota-scheduler-2023-05-31-15_39_22](https://github.com/fluxninja/aperture/assets/1553055/94eaee68-a399-4dbd-bbcf-50b76865b061)

**New Feature:**
- Updated DistCache to use an embedded client and improved GetStats
response
- Added context parameter to rate-limiter and flowcontrol functions
- Upgraded Olric library to fluxninja-0.5 in global-token-bucket

**Refactor:**
- Removed unnecessary arguments from newRateLimiterOptions function
- Modified WFQScheduler struct and updated test cases

> 🎉 A leap forward, with changes so grand,
> Contexts and clients, go hand in hand.
> Olric upgraded, token buckets refined,
> Performance and logic, now well-aligned. 🚀

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.4.0-rc.1

Page 25 of 53

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.