fix: ResolveS3UidInAllMapFixed exported + called in RequiredParamsMismatch

This commit is contained in:
“Naeel”
2026-07-19 13:36:40 +04:00
parent 4d14568852
commit 6660008af1
5 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ TOKEN_FILE="secrets/dev.token"
# Release versions
# Version
VERSION="3.1.9"
VERSION="3.1.10"
# Registry/S3 settings
REGISTRY_HOST="registry.kube5s.ru"
+1 -1
View File
@@ -4,7 +4,7 @@ TOKEN_FILE="secrets/prod.token"
# Release versions
# Version
VERSION="2.1.8"
VERSION="2.1.9"
# Registry/S3 settings
REGISTRY_HOST="registry.kube5s.ru"
+1 -1
View File
@@ -3,7 +3,7 @@ NUBES_API_ENDPOINT="https://lk-api-gateway-test.ngcloud.ru/api/v1/svc"
TOKEN_FILE="secrets/test.token"
# Version
VERSION="5.1.11"
VERSION="5.1.12"
# Docs generation — ONLY from docs_gen/<stand>/ (never from docs/)
DOCS_GEN_DIR="provider/docs_gen/test"
+3 -3
View File
@@ -1188,7 +1188,7 @@ func (c *UniversalClient) resolveRefSvcParamValues(ctx context.Context, opParams
}
if len(refById) == 0 {
// Даже без refSvcId — резолвим s3Uid внутри map-fixed (соглашение об именах).
return c.resolveS3UidInAllMapFixed(params, opParams), nil
return c.ResolveS3UidInAllMapFixed(params, opParams), nil
}
resolved := make(map[int]string, len(params))
@@ -1219,10 +1219,10 @@ func (c *UniversalClient) resolveRefSvcParamValues(ctx context.Context, opParams
return resolved, nil
}
// resolveS3UidInAllMapFixed проходит по всем параметрам и для map-fixed
// ResolveS3UidInAllMapFixed проходит по всем параметрам и для map-fixed
// резолвит s3Uid-подобные значения в UUID. Используется когда нет ни одного
// параметра с refSvcId (ранний выход resolveRefSvcParamValues).
func (c *UniversalClient) resolveS3UidInAllMapFixed(params map[int]string, opParams []universalCfsParam) map[int]string {
func (c *UniversalClient) ResolveS3UidInAllMapFixed(params map[int]string, opParams []universalCfsParam) map[int]string {
result := make(map[int]string, len(params))
for paramId, value := range params {
if strings.TrimSpace(value) != "" && value != "{}" && strings.HasPrefix(strings.TrimSpace(value), "{") {
@@ -21,6 +21,8 @@ func RequiredParamsMismatch(ctx context.Context, client *core.UniversalClient, s
return nil, nil
}
desiredParamsByID = client.ResolveS3UidInAllMapFixed(desiredParamsByID, nil)
requiredIDs, err := getServiceRequiredParamIDs(serviceID)
if err != nil {
return nil, err