Skip to content

Commit

Permalink
fix: service name collision error message (#1863)
Browse files Browse the repository at this point in the history
The previous message was confusing and left @barnabasbusa bewildered.
This is much more clearer and comes with a recommendation
  • Loading branch information
h4ck3rk3y authored Nov 29, 2023
1 parent c760e9c commit 164b316
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func validateSingleService(validatorEnvironment *startosis_validator.ValidatorEn
}

if validatorEnvironment.DoesServiceNameExist(serviceName) == startosis_validator.ComponentCreatedOrUpdatedDuringPackageRun {
return startosis_errors.NewValidationError("There was an error validating '%s' as service '%s' was created inside this package. Adding the same service twice in the same package is not allowed", AddServiceBuiltinName, serviceName)
return startosis_errors.NewValidationError("There was an error validating '%s' as service with the name '%s' already exists inside the package. Adding two different services with the same name isn't allowed; we recommend prefixing/suffixing the two service names or using two different names entirely.", AddServiceBuiltinName, serviceName)
}
if serviceConfig.GetFilesArtifactsExpansion() != nil {
for _, artifactName := range serviceConfig.GetFilesArtifactsExpansion().ServiceDirpathsToArtifactIdentifiers {
Expand Down

0 comments on commit 164b316

Please sign in to comment.