Skip to content

Reduce vault E2E test sleep times by ~80s#21662

Closed
prashantkumar1982 wants to merge 5 commits intodevelopfrom
vault-test-speedup
Closed

Reduce vault E2E test sleep times by ~80s#21662
prashantkumar1982 wants to merge 5 commits intodevelopfrom
vault-test-speedup

Conversation

@prashantkumar1982
Copy link
Copy Markdown
Contributor

@prashantkumar1982 prashantkumar1982 commented Mar 24, 2026

Summary

  • Remove redundant 30s "Vault DON ready" sleep — OCR3 is already warm after the preceding 15s registry syncer wait + DKG polling, making this extra delay unnecessary.
  • Reduce registry syncer propagation wait from 30s → 15s — the registrySyncer polls every 12s (defaultTickInterval), so one tick + margin is sufficient.
  • Reduce allowlist propagation sleep from 10s → 6s per call — the WorkflowRegistrySyncer polls allowlisted requests every 5s (defaultTickIntervalForAllowlistedRequests), so one tick + margin is sufficient. With 9 calls in the test, this saves ~36s alone.

Measured speedup

Metric Before After
Fixed sleep time ~150s ~69s
Vault E2E wall clock (local) ~355s ~275s

…etrieval tests

Remove the `vault.secrets.get` method from the gateway surface entirely:
- Remove `GetSupportedMethods()` dev-build conditional that exposed the method
- Remove `handleSecretsGet()` and `getEncryptionKeys()` from the gateway handler
- Remove the `MethodSecretsGet` case from the gateway-side handler and aggregator
- Remove the now-unused `capRegistry` field from `GatewayHandler`

Replace the commented-out gateway-based get test with a WASM workflow that calls
`runtime.GetSecret()`, and add cross-namespace E2E coverage proving that secrets
with the same ID in different namespaces are fully independent (create, get,
update, list, delete all scoped to their namespace).

Made-with: Cursor
- In the vaultsecret WASM workflow, check that the GetSecret error
  specifically contains "key does not exist" instead of accepting any
  error as proof the secret was deleted. This prevents config-propagation,
  transport, or decryption failures from masking real bugs.
- In updateVaultCapabilityConfigInRegistry, replace the fire-and-sleep
  pattern with sethClient.WaitMined + receipt status assertion so a
  reverted or stuck tx fails the test immediately instead of causing
  a downstream workflow flake.

Made-with: Cursor
- Fix goimports import ordering in v2_vault_don_test.go
- Add vaultsecret module to go.md dependency graph
- Fix updateVaultCapabilityConfigInRegistry to dynamically find the DON
  that has vault@1.0.0 instead of hardcoding "workflow-don", which fails
  in the workflow-gateway-capabilities topology where vault lives on
  "capabilities-don"

Made-with: Cursor
…n in multi-DON topology

In the workflow-gateway-capabilities topology, the vault capability runs
on a separate capabilities-don. Without MethodConfigs, the launcher
treats vault as a V1 capability and passes nil transmissionConfig. Since
secrets.go doesn't set Config on the CapabilityRequest, the V1 fallback
path fails with "cannot unwrap nil values.Map" when extracting
transmission config.

Adding RemoteExecutableConfig for the vault.secrets.get method ensures
the V2 Don2Don framework is used, which sets transmissionConfig from the
on-chain registry config rather than requiring it per-request.
- Remove redundant 30s "Vault DON ready" sleep (OCR3 already warm
  after registry syncer wait)
- Reduce registry syncer propagation wait from 30s to 15s (syncer
  polls every 12s; one tick + margin)
- Reduce allowlist propagation sleep from 10s to 6s per call (syncer
  polls every 5s; 9 calls × 4s saved = 36s)
Validated locally: all vault E2E tests pass in ~275s (down from ~355s).
@github-actions
Copy link
Copy Markdown
Contributor

👋 prashantkumar1982, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions
Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@cl-sonarqube-production
Copy link
Copy Markdown

@trunk-io
Copy link
Copy Markdown

trunk-io bot commented Mar 24, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@prashantkumar1982
Copy link
Copy Markdown
Contributor Author

This was superceded with #21660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants