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 #23352: Import/Export yaml with technique editor #5008

Conversation

VinceMacBuche
Copy link
Member

@VinceMacBuche VinceMacBuche commented Aug 26, 2023

https://issues.rudder.io/issues/23352

Adds a new API to check whether a technique is valid or not (accepts a yaml, returns a json) to use to import a yaml technique

Modify getTechnique api to add a format parameter to return a yaml instead of a json to use to export a technique as yaml

modify the technique editor to use both new api/parameters

@VinceMacBuche VinceMacBuche added WIP Use that label for a Work In Progress PR that must not be merged yet and removed WIP Use that label for a Work In Progress PR that must not be merged yet labels Aug 26, 2023
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_23352/import_export_yaml_with_technique_editor branch from 1b69246 to 22b4e12 Compare August 30, 2023 11:04
@@ -780,7 +816,7 @@ class TechniqueAPIService14(
techniqueRevisions.getTechniqueRevision(name, version).map(_.map(JRRevisionInfo.fromRevisionInfo))
}

def getTechniqueWithData(techniqueName: TechniqueName, version: Option[TechniqueVersion]) = {
def getTechniqueWithData(techniqueName: TechniqueName, version: Option[TechniqueVersion], format: String) = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format should not be a string there

Copy link
Member

@fanf fanf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import seems to work as expected, but export does not. Once corrected and with the format change in a sealed trait/enum, you can self merge.

@fanf
Copy link
Member

fanf commented Aug 30, 2023

OK, actually export works too, elm just needed to be recompiled/reloaded. So just the format thing, and self merge!

@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_23352/import_export_yaml_with_technique_editor branch from 22b4e12 to fbf7f58 Compare August 30, 2023 14:56
@VinceMacBuche VinceMacBuche force-pushed the bug_23352/import_export_yaml_with_technique_editor branch from fbf7f58 to 2831d46 Compare August 30, 2023 14:57
@VinceMacBuche
Copy link
Member Author

OK, merging this PR

@VinceMacBuche VinceMacBuche merged commit b59208e into Normation:branches/rudder/8.0 Aug 30, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants