Skip to content

Conversation

@BackendBits
Copy link
Collaborator

Pull Request

Summary

Preserve original data types for parameters that directly reference other parameters, instead of converting them to String.

If a parameter is a simple reference like ${MONGO_DB_PORT} or $MONGO_DB_PORT and the target value is an Integer, Long, or Boolean, the referencing parameter now keeps that type. Existing string/template behavior is unchanged.

Issue

No existing GitHub issue.

This is needed because direct references (e.g. DUMPS_MONGO_PORT: ${MONGO_DB_PORT}) were previously turned into strings, which can break schema validation and consumers expecting numeric/boolean values.

Breaking Change?

  • Yes
  • No

Behavior only changes for simple references to non-String values, and is backwards-compatible for all other cases.

Scope / Project

  • Project: build_effective_set_generator_java
  • Module: parameters-processor
  • Files:
    • parameters-processor/src/main/java/org/qubership/cloud/parameters/processor/expression/ExpressionLanguage.java
    • parameters-processor/src/test/java/org/qubership/cloud/expression/ExpressionLanguageTest.java

Implementation Notes

  • Detect pure parameter references (${VAR}, $VAR, <% VAR %>) and, when they resolve to a non-String value, return a new Parameter wrapping that value without going through template/string processing.
  • Keep all other values (including strings and complex expressions) on the existing Jinjava/Groovy/escaping path.
  • Fix removeEscaping so it only operates on String values, avoiding unintended conversion of numeric/boolean values to strings.

Tests / Evidence

  • Updated/added unit tests in ExpressionLanguageTest to cover:
    • Integer, boolean, and long references using both ${VAR} and $VAR.
    • String references that should not change behavior.
  • All tests in parameters-processor pass (ExpressionLanguageTest and related suites).
  • Effective-set generation manually verified to produce correct numeric/boolean values (e.g. 27017, true, 604800000) instead of quoted strings in the generated deployment-parameters.yaml.

Additional Notes

None.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@BackendBits BackendBits force-pushed the feature/preserve-data-type-on-ref branch from 22d55d1 to a182898 Compare December 8, 2025 11:53
@miyamuraga miyamuraga added the question Further information is requested label Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants