Open swiatekm opened 4 days ago
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)
/test
Issues
0 New issues
1 Fixed issue
0 Accepted issues
Measures
0 Security Hotspots
93.3% Coverage on New Code
0.0% Duplication on New Code
the CI failures are due to
TestOtelAPMIngestion
(#4148) andTestRpmFleetUpgrade
. The last one fails because it doesn't download in time theelastic-agent-8.17.0-SNAPSHOT-x86_64.rpm
artifact with acontext deadline exceeded
(code ref)cc @ycombinator should we create an issue about the latter?
I'm not seeing these tests failing on main
so either something in this PR is causing them to fail (unlikely) or they are flaky.
I just re-ran the integration tests step. If it passes, it means those tests are flaky and we should create an issue for each of them.
What does this PR do?
For all variable provider types, we store mappings as untyped dictionaries and only convert them to AST when we're about to generate actual vars. This means we have to recompute all of it every time there's a change to any of the provider data, even if all the other data is unaffected. For example, if a Kubernetes Pod gains a new label, we need to regenerate vars for all Pods.
Instead, we can store mappings as AST to begin with. Then the only cost of emitting new vars after a change is updating a bunch of references.
Why is it important?
This unnecessary recomputation can be quite expensive when there's a lot of mappings from the dynamic provider. See the benchstat report below:
Checklist
Related issues