[DX-2917] add a memory leak CRE soak test#21475
Conversation
|
I see you updated files related to
|
|
✅ No conflicts with other open PRs targeting |
There was a problem hiding this comment.
Pull request overview
Risk Rating: MEDIUM
Adds a long-running CRE PoR V2 soak test intended to detect memory/CPU leaks via Prometheus, plus supporting helper refactors and CI wiring to run it on a schedule.
Changes:
- Adds a new CRE PoR memory-leak soak test that registers 20 staggered V2 workflows and checks on-chain updates + Prometheus resource thresholds.
- Refactors/extends CRE PoR smoke-test helpers to support soak usage (shared price provider, per-workflow setup, generated feed IDs).
- Adds
CronScheduleoverride support to the V2 PoR workflow config and introduces a reusable GitHub Actions workflow to run the soak job.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
system-tests/tests/soak/cre/soak_test.go |
New long-running soak test with workflow registration, polling loop, and leak detector checks. |
system-tests/tests/smoke/cre/por_helpers.go |
Exports setup helpers and adds soak-specific workflow setup + feed ID generation. |
system-tests/tests/smoke/cre/por_price_provider.go |
Adds a single shared fake price provider variant for soak runs. |
system-tests/tests/test-helpers/t_helpers.go |
Extends workflow config factory to support PoR v2 config generation and feed ID normalization. |
core/scripts/cre/environment/examples/workflows/v2/proof-of-reserve/cron-based/types/types.go |
Adds CronSchedule to the v2 PoR workflow config. |
core/scripts/cre/environment/examples/workflows/v2/proof-of-reserve/cron-based/main.go |
Uses CronSchedule when provided, otherwise defaults to */30 * * * * *. |
.github/workflows/cre-soak-memory-leak.yml |
New reusable workflow to stand up CRE/observability and run the soak test. |
.github/workflows/docker-build.yml |
Adds a job that invokes the reusable soak workflow (gated by an if). |
system-tests/tests/go.mod |
Adds the missing module requirement for the v2 PoR workflow module (with local replace). |
go.md |
Updates dependency graph docs. |
system-tests/tests/smoke/cre/cre_suite_test.go |
Updates call sites for BeforePoRTest after export. |
.gitignore |
Ignores additional local editor/tooling dirs. |
Areas needing scrupulous human review:
system-tests/tests/soak/cre/soak_test.go: workflow registration loop, on-chain polling logic, and leak-check thresholds/warmup semantics.system-tests/tests/test-helpers/t_helpers.go: v2 PoR feed ID normalization/truncation rules (ensure they match the actual on-chain ID encoding used everywhere)..github/workflows/*: event gating/trigger behavior and AWS/ECR credentials/permissions for scheduled execution.
Reviewer recommendations (from CODEOWNERS):
- CI/workflow changes:
@smartcontractkit/devex-cicd/@smartcontractkit/devex-tooling(covers/.github/**). go.md/ repo-level deps:@smartcontractkit/core/@smartcontractkit/foundations.- No explicit CODEOWNERS entry for
system-tests/orcore/scripts/cre/...was found; fallback ownership applies (@smartcontractkit/foundations/@smartcontractkit/core).
Comments suppressed due to low confidence (1)
system-tests/tests/smoke/cre/por_helpers.go:275
- This loop/function doesn't compile and also appears to generate feed IDs with the wrong length:
for i := range nis invalid becauserangecan't be used on anint.- The format string
"018e16c3%02x0003200000000000000000"produces 36 hex chars (18 bytes), but the comment/doc expects 32 hex chars (16 bytes). This mismatch will break downstream code that assumes 16-byte feed IDs.
Update the loop and format to generate exactly 16 bytes / 32 hex chars.
You can also share your feedback on Copilot code review. Take the survey.
|
|
great idea |




Summary
Changes
soak/cre/soak_test.go— New 5-phase soak test: shared price provider → 20 workflow registrations → timed poll loop → per-workflow update assertions →leak.CLNodesLeakDetectorCPU/memory checksmoke/cre/por_helpers.go— Extracted shared helpers frompor_test.go(now exported). AddsSetupPoRWorkflowForSoakandGenerateSoakFeedIDssmoke/cre/por_price_provider.go— AddsNewFakePriceProviderForSoak— single provider call for all 20 feed IDs, 300 prices per feedsmoke/cre/cre_suite_test.go—beforePoRTest→BeforePoRTest(exported)v2/.../types/types.go— AddsCronSchedule stringfield (omitempty, smoke tests unaffected)v2/.../main.go— Usesconfig.CronSchedulewhen non-empty, defaults to*/30 * * * * *test-helpers/t_helpers.go— AddsporV2types.WorkflowConfigto theWorkflowConfigunion + factory casecre-soak-memory-leak.yml— New reusable CI workflow: ECR login →ctf obs up -f→ start CRE → run test (4h20m timeout) → upload pprofdocker-build.yml— Addssoak-cre-memory-leakjob triggered onscheduleandpushtodevelopgo.mod— Adds missingrequireentry for the v2 PoR module