Skip to content

Add regression test for server.signingWorker being fully optional - #2321

Open
ayushsingh82 wants to merge 1 commit into
canton-network:mainfrom
ayushsingh82:ayush/signing-worker-optional-2176
Open

Add regression test for server.signingWorker being fully optional#2321
ayushsingh82 wants to merge 1 commit into
canton-network:mainfrom
ayushsingh82:ayush/signing-worker-optional-2176

Conversation

@ayushsingh82

Copy link
Copy Markdown
Contributor

Summary

server.signingWorker (wallet-gateway/remote/src/config/Config.ts) is already wrapped in z.preprocess((val) => val ?? {}, ...), with pollInterval defaulting to 5000. That already makes the whole signingWorker block optional, with a sane default, exactly as #2176 asks for at the config-schema level -- it just had no direct test coverage, so a regression here would be easy to miss. This PR adds that coverage.

I could not find a helm chart in this repo (grep -rn signingWorker -- *.yaml *.yml turns up nothing), so the "propagate to the helm chart" part of the issue doesn't apply here -- it most likely refers to a different/deployment repo, or the chart has since moved/been removed. Flagging this in case a maintainer wants to redirect that part of the issue elsewhere or close it as already resolved.

Fixes #2176

Test plan

  • Verified the exact zod mechanics in isolation (z.preprocess(val => val ?? {}, z.object({ pollInterval: z.number().int().positive().default(5000) })) parsed against {} in this repo's actual zod version) produce { pollInterval: 5000 }, matching the new test's assertion
  • Could not run the full vitest suite locally in a fresh worktree -- a sibling package (core-token-standard) requires Daml-generated codegen artifacts not available outside the full dev environment; unrelated to this change

server.signingWorker (wallet-gateway/remote/src/config/Config.ts) is
already wrapped in z.preprocess((val) => val ?? {}, ...) with
pollInterval defaulting to 5000, so the whole block can already be
omitted from config.yaml/json. That behavior had no direct test
coverage, so add one.

Note: this repo has no helm chart, so the "propagate to the helm
chart" part of canton-network#2176 doesn't apply here -- it likely refers to a
different/deployment repo.

Fixes canton-network#2176

Signed-off-by: ayushsingh82 <ayushsinghmi711@gmail.com>
@ayushsingh82

Copy link
Copy Markdown
Contributor Author

@rukmini-basu-da whenever you have a chance, would appreciate a look at this one.

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.

make wallet gateway server.signingWorker config block fully optional

1 participant