This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Score placeholders follow the Humanitec syntax: https://developer.humanitec.com/platform-orchestrator/reference/placeholders/
This does not support
$$
for escaping the placeholder, rather$\{
.There is a further problem here that if I escape
$${shared.my-var}
it will turn into${shared.my-var}
and so be interpreted as a valid placeholder by Humanitec which it should not. It should still be escaped for Humanitec to deal with in the delta.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$$
->$
is supported right now in all our CLI tools. If we remove this functionality, it may break existing setups, where someone is already using$$
. We are solving a concrete issue in this PR. Lets stick to it and do not add new breaking changes. We can address all other improvements in separate PRs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the second point still stands. You should not unescape yet. What you need to do is convert it into
$\{
so that Humanitec does not read it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the case. Several placeholders in Humanitec does not have their counterparts in Score resources, and this construct is used exactly to pass through the placeholder as is, so Humanitec would handle it properly. For example,
$${pod.status.hostIP}
.Note, that similar mechanism is used in
score-compose
to reference environment variables that should not be substituted by the CLI tool, but they are known tocompose
CLI tool.We can change this behaviour, but again, this would be a breaking change and it does not relate to the issue we are addressing in this PR. A concrete issue is that we want to ignore
$abc
and only react to${abc}
(with brackets).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's open a second issue to straighten up escaping more generally.