-
Notifications
You must be signed in to change notification settings - Fork 416
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
fix(api): duplication of same node name is now forbidden #4953
Conversation
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
engine/api/workflow/dao.go
Outdated
nodeNames := make(map[string]struct{}, len(nodes)) | ||
for i := range nodes { | ||
if _, ok := nodeNames[nodes[i].Name]; ok { | ||
return sdk.ErrWorkflowNodeNameDuplicate |
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.
WithStack
sdk/error.go
Outdated
@@ -382,6 +383,7 @@ var errorsAmericanEnglish = map[int]string{ | |||
ErrBadBrokerConfiguration.ID: "Cannot connect to the broker of your event integration. Check your configuration", | |||
ErrInvalidJobRequirementNetworkAccess.ID: "Invalid job requirement: network requirement must contains ':'. Example: golang.org:http, golang.org:443", | |||
ErrWorkflowAsCodeResync.ID: "You cannot resynchronize an as-code workflow", | |||
ErrWorkflowNodeNameDuplicate.ID: "You cannot have same name for different pipeline nodes in your workflow", |
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.
remove nodes
sdk/error.go
Outdated
@@ -563,6 +565,7 @@ var errorsFrench = map[int]string{ | |||
ErrBadBrokerConfiguration.ID: "Impossible de se connecter à votre intégration de type évènement. Veuillez vérifier votre configuration", | |||
ErrInvalidJobRequirementNetworkAccess.ID: "Pré-requis de job invalide: Le pré-requis network doit contenir un ':'. Exemple: golang.org:http, golang.org:443", | |||
ErrWorkflowAsCodeResync.ID: "Impossible de resynchroniser un workflow en mode as-code", | |||
ErrWorkflowNodeNameDuplicate.ID: "Vous ne pouvez pas avoir plusieurs fois le même nom de noeud de pipeline dans votre workflow", |
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.
noeud -> pipeline
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin Coenen 5719034+bnjjj@users.noreply.github.com
@ovh/cds