Skip to content

feat(validate): use Konnect bulk config validation when available - #2326

Draft
GGabriele wants to merge 1 commit into
mainfrom
feat/bulk-config-validate
Draft

GGabriele wants to merge 1 commit into
mainfrom
feat/bulk-config-validate

Conversation

@GGabriele

Copy link
Copy Markdown
Collaborator

In Konnect mode, deck gateway validate sends a probe to the
/config/validate endpoint of the control plane. If it returns 404, decK
uses the per-entity validation as before.

Otherwise decK sends the configuration in chunks, one at a time. Each
chunk contains the entities that its entities refer to. Entities that can
conflict share a chunk. The new --config-chunk-size flag sets the maximum
chunk size in MB. The default is 5. A slower network may need a smaller size.
Bulk requests use a timeout of at least 30 seconds.

When a chunk fails, decK reports the error of each entity that the
endpoint returns. If the endpoint returns only part of the errors, decK
tells how many more there are.

Custom plugins, plugins with partials and entity types that the endpoint
does not support use the per-entity validation.

Also, this validation is going to be more "complete" than the existing
one:

  • report duplicate unique values that the per-entity validation cannot
    find, for example the plugin instance_name
  • get the schema of a cloned plugin from the plugin it clones

In Konnect mode, `deck gateway validate` sends a probe to the
/config/validate endpoint of the control plane. If it returns 404, decK
uses the per-entity validation as before.

Otherwise decK sends the configuration in chunks, one at a time. Each
chunk contains the entities that its entities refer to. Entities that can
conflict share a chunk. The new `--config-chunk-size` flag sets the maximum
chunk size in MB. The default is 5. A slower network may need a smaller size.
Bulk requests use a timeout of at least 30 seconds.

When a chunk fails, decK reports the error of each entity that the
endpoint returns. If the endpoint returns only part of the errors, decK
tells how many more there are.

Custom plugins, plugins with partials and entity types that the endpoint
does not support use the per-entity validation.

Also, this validation is going to be more "complete" than the existing
one:
- report duplicate unique values that the per-entity validation cannot
  find, for example the plugin instance_name
- get the schema of a cloned plugin from the plugin it clones
@GGabriele
GGabriele force-pushed the feat/bulk-config-validate branch from 40fa945 to 5f0de43 Compare November 12, 2026 14:04
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.56146% with 111 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.34%. Comparing base (387ed97) to head (5f0de43).

Files with missing lines Patch % Lines
validate/config_plan.go 75.94% 51 Missing ⚠️
validate/config_validate.go 77.00% 43 Missing ⚠️
cmd/gateway_validate.go 56.52% 10 Missing ⚠️
validate/config_chunk.go 96.99% 4 Missing ⚠️
cmd/common_konnect.go 90.00% 2 Missing ⚠️
validate/validate.go 96.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2326      +/-   ##
==========================================
+ Coverage   39.32%   43.34%   +4.02%     
==========================================
  Files          82       85       +3     
  Lines        7337     7923     +586     
==========================================
+ Hits         2885     3434     +549     
- Misses       4452     4489      +37     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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