Skip to content

Add validation length to job name

Laura Montemayor requested to merge add-validation-lenght-to-job-name into master

What does this MR do and why?

Enforces a 255 character limit on job names via Config::Entry. This is being done because the database config for ci_builds.name name is not the same for development and production. We do not know why. For GitLab.com we accept at most 255 characters and everything that exceeds is presented with an 500 error.

We are doing these changes under a feature flag that is enabled by default to be mindful about self-managed. After this release (14.5), we will remove the flag code and add a database limit (14.6).

Screenshots or screen recordings

You can verify the behavior by using a job name that's longer than 255 characters.

Sample text (255 characters): test string that has more than two hundred and fifty five characters, wow this is a really long job name, I wonder if there are actually any job names this long maybe if they are generated but here we are not yet at the limit we need a few more words here

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

#342800 (closed)

Edited by Laura Montemayor

Merge request reports