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 #24280: When we clone a technique with resource, the clone does not really have the resource #5453
base: branches/rudder/8.0
Are you sure you want to change the base?
Conversation
authzToken: AuthzToken | ||
): LiftResponse = { | ||
(for { | ||
techniqueId <- restExtractorService.extractString("techniqueId")(req)(Full(_)).toIO.notOptional("category parameter is missing") |
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.
techniqueId <- restExtractorService.extractString("techniqueId")(req)(Full(_)).toIO.notOptional("category parameter is missing") | |
techniqueId <- restExtractorService.extractString("techniqueId")(req)(Full(_)).toIO.notOptional("technique id parameter is missing") |
|
||
IOResult.attempt(s"An error occurred while copying resources of technique ${techniqueId}/${techniqueVersion} to a new draft technique ${draftId}") { | ||
val resourceDir = gitReposProvider.rootDirectory / s"techniques/${category}/${techniqueId}/${techniqueVersion}/resources" | ||
val workspace = gitReposProvider.rootDirectory / s"workspace/${draftId}/${techniqueVersion}" |
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.
please avoid strings for global vars. Ideally they should be services for easier testing, or at lest something provided centrally in an object.
@@ -240,6 +241,7 @@ type Msg = | |||
| UpdateTechnique Technique | |||
| DeleteTechnique (Result (Http.Detailed.Error String) ( Http.Metadata, TechniqueId )) | |||
| GetTechniqueResources (Result (Http.Detailed.Error String) ( Http.Metadata, List Resource )) | |||
| CopyResources (Result (Http.Detailed.Error Bytes) ()) |
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.
I don't get why you have bytes here ? The resources remains in the backend in the case of cloning no ?
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.
because i don't care about the answer and that's how you do in Elm
Can you explain the general idea here ? There's several things I don't get:
|
Commit modified |
345484e
to
ae74ad9
Compare
… not really have the resource
Commit modified |
ae74ad9
to
d909c07
Compare
When I clone a technique with an existing resource, the resource is cloned. But as soons as I try to modify the technique name, I get a lot of error notif in UI, and the following stack trace in logs:
|
https://issues.rudder.io/issues/24280