Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt ev2 bicepparam preprocessor to generate any() #905

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

geoberle
Copy link
Collaborator

@geoberle geoberle commented Nov 27, 2024

What this PR does

when a bicepparam file is preprocessed for EV2 with scope binding placeholders, any non-string placeholders needs to be wrapped in the any() bicep type function since the placeholder string would not match the expected type for the respective parameter.

this PR also cleans up several unused functions in the ev2 package that have become obsolete because of pipeline preprocessing. specifically the PreprocessFileForEV2SystemVars, PreprocessFileForEV2ScopeBinding helper functions are of little use now that we have the PrecompilePipelineForEV2 functions. they are also hard to use considering the various contexts file preprocessing involves (e.g. EV2 system variables allowed or not, scope binding vs service config, bicepparam any() or not)

this PR also removed the templatize flag for EV2 preprocessing. since we integrate templatize as a library, there is no need to expose the preprocessing on the CLI as RH will not use it

Jira:
Link to demo recording:

Special notes for your reviewer

when a bicepparam file is preprocessed for EV2 with scope binding placeholders, any non-string placeholders needs to be wrapped in the `any()` bicep type function since the placeholder string would not match the expected type for the respective parameter.

Signed-off-by: Gerd Oberlechner <[email protected]>
remove the PreprocessFileForEV2SystemVars, PreprocessFileForEV2ScopeBinding helper functions
they are of little use now that we have the PrecompilePipelineForEV2 functions

Signed-off-by: Gerd Oberlechner <[email protected]>
@geoberle geoberle force-pushed the pipeline-ev2-precompile-any-params branch from 322a844 to f831649 Compare November 27, 2024 23:36
tooling/templatize/pkg/ev2/mapping.go Outdated Show resolved Hide resolved
Signed-off-by: Gerd Oberlechner <[email protected]>
@geoberle geoberle force-pushed the pipeline-ev2-precompile-any-params branch from 136c277 to 91cdf05 Compare November 28, 2024 07:34
@geoberle geoberle merged commit 43e8e96 into main Nov 28, 2024
18 checks passed
@geoberle geoberle deleted the pipeline-ev2-precompile-any-params branch November 28, 2024 08:44
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.

3 participants