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

Fixes #23555: When migrating json technique to yaml, canonify parameter name #5090

Conversation

fanf
Copy link
Member

@fanf fanf commented Oct 11, 2023

https://issues.rudder.io/issues/23555

Principal changes:

  • add a variableName in EditorTechnique -> parameters. This is the canonified version of the parameter, the one used in .cf and .ps1 files,
  • remove canonify from NcfId since we now have access to it in technique param directly
  • when we read old technique, do the canonification of name for params, and put the result in variableName
  • map yaml field name to editor variableName, and description to editor name

I didn't touch JResponseObject, they will likely need to be updated to add variableName field etc

@fanf fanf force-pushed the bug_23555/when_migrating_json_technique_to_yaml_canonify_parameter_name branch from 0b22869 to 8fd455f Compare October 11, 2023 15:02
@VinceMacBuche
Copy link
Member

I don't think that what we want. As discussed in our notion with @amousset We'd like to make "name" to be the canonified name of the parameter and "description" be the current name so that we don't create new fields anymore and the mapping to yaml is direct.

So migration from 7.3 should: take the name, use it as description, and canonify it to use it as name

@VinceMacBuche
Copy link
Member

i made a PR : https://github.com/fanf/rudder/pull/15/files

@fanf fanf force-pushed the bug_23555/when_migrating_json_technique_to_yaml_canonify_parameter_name branch from b09b8fa to 7c333da Compare October 12, 2023 13:01
@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 7c333da into Normation:branches/rudder/8.0 Oct 12, 2023
15 checks passed
@fanf fanf deleted the bug_23555/when_migrating_json_technique_to_yaml_canonify_parameter_name branch March 15, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants