From eb3252beca3491cb74bea58b3122cc801376f682 Mon Sep 17 00:00:00 2001 From: Pedro Gameiro Date: Wed, 8 Jul 2026 09:28:53 +0100 Subject: [PATCH] fix: remove the max batch limit After some practical experience with using the batch feature, it became clear that the overhead of batching is smaller than I expected. With no measurable increase of latency even for big values. --- charts/kuberpult/values.yaml | 3 +-- services/manifest-repo-export-service/pkg/cmd/server.go | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/charts/kuberpult/values.yaml b/charts/kuberpult/values.yaml index 45b0c44db3..b97216120c 100644 --- a/charts/kuberpult/values.yaml +++ b/charts/kuberpult/values.yaml @@ -267,8 +267,7 @@ manifestRepoExport: # its single push must finish comfortably within `networkTimeoutSeconds` above (NOT # `git.networkTimeout`, which governs the cd-service). An oversized batch that trips the timeout # forces the whole batch to reprocess, which is strictly worse than not - # batching. Must be between 1 and 100 (inclusive); the service rejects values - # above 100. This is a hard guard against having a excessive configuration. + # batching. Must be at least 1; there is no upper bound enforced by the service. # For details, view `docs/operators/timeouts.md`. maxExportBatchSize: 1 diff --git a/services/manifest-repo-export-service/pkg/cmd/server.go b/services/manifest-repo-export-service/pkg/cmd/server.go index d9b89fa9fb..03eb8ad67f 100755 --- a/services/manifest-repo-export-service/pkg/cmd/server.go +++ b/services/manifest-repo-export-service/pkg/cmd/server.go @@ -52,9 +52,6 @@ const ( maxReleaseVersionsLimit = 30 maxEslProcessingTimeSeconds int64 = 600 // see eslProcessingIdleTimeSeconds in values.yaml - - // maxExportBatchSizeLimit is a hard upper bound on KUBERPULT_MAX_EXPORT_BATCH_SIZE. - maxExportBatchSizeLimit = 100 ) func RunServer() { @@ -189,9 +186,6 @@ func Run(ctx context.Context) error { if maxExportBatchSize == 0 { return fmt.Errorf("error KUBERPULT_MAX_EXPORT_BATCH_SIZE must be >=1 but was: %v", maxExportBatchSize) } - if maxExportBatchSize > maxExportBatchSizeLimit { - return fmt.Errorf("error KUBERPULT_MAX_EXPORT_BATCH_SIZE must be <=%v but was: %v", maxExportBatchSizeLimit, maxExportBatchSize) - } logging.Info(ctx, "maxExportBatchSize", zap.Uint("maxExportBatchSize", maxExportBatchSize)) networkTimeoutSecondsStr, err := valid.ReadEnvVar("KUBERPULT_NETWORK_TIMEOUT_SECONDS")