-
Notifications
You must be signed in to change notification settings - Fork 106
Description
Description
Currently, there are no restrictions on length for service name & namespace during service creation. We have many internal components (s3 buckets, cloudfront distributions, api paths etc.) that will rely on these two user supplied values. If the user attempts to create services with longer names, some of the internal workflows (bucket/cloudfront creation) might fail during deployment/provisioning time. We can enhance the user experience if we can either detect these during service creation or apply restrictions on the length of these values (we already have restrictions on characters that we can use for service name & namespace). Observed the issue during website creation but similar issues can be reproduced for other service types.
Steps to reproduce
- Login & create a service of type: website
- Provide longer values (30 characters for example) for service name & namespace.
- Service creation will be successful but the first deployment fails during cloudfront creation with message like this - "An error occurred (InvalidArgument) when calling the CreateDistributionWithTags operation: The parameter CallerReference is too big."
If Jazz admin enables dedicated S3 bucket per service, similar error can be reproduced during bucket creation (maximum length allowed for bucket names = 63 characters. Ref: https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html)
Expected behavior:
- If UI is being used for service creation, user shouldn't be allowed to provide longer values for service name & namespace.
- If API is being used for service creation, API should throw input invalidation error when user supplies longer values for service name & namespace.
Actual behavior:
Service gets created successfully but the first deployment fails with message similar to the above.
Reproduces how often:
Always
Additional notes
UI & underlying API should not allow user to use longer values for service names & namespace. Define a maximum limit for the length on these values.