Currently, when a user attempts to enter a job name into ci_builds.name that exceeds 255 characters, the page encounters a 500 error. This is because there is a mismatch between what the frontend allows vs what the backend can accommodate. The initial proposal is to implement add a length validation here.
Proposal
It may be worth matching the validation before the next major release of %15.0 so when we incorporate the breaking change, we will have an even higher level of confidence and near-zero risk of enforcing this limit so the HTTP 500 error can't occur. That way, this is fully covered from any possibility of encountering a job length beyond that many characters.
@lauraX - this is the follow-up issue we discussed to provide more confidence in this change prior to %15.0. I placed it as a candidate14.8 given end of the year and it's well in advance of the next major release. WDYT?
cc: @dhershkovitch - this is a follow-up issue to ensure more confidence/near-zero risk by nudging up that size a little more.
Thanks @lauraX for pointing that out. I had been misinterpreting that label as the intended milestone for it to be worked on but I can tentatively mark this issue's target milestone for 14.8.
This grouppipeline authoring bug has at most 25% of the SLO duration remaining and is ~"approaching-SLO" breach. Please consider taking action before this becomes a ~"missed-SLO" in 14 days (2022-01-10).
@marknuzzo Do you believe we can de-prioritize this issue since we've implemented #342800 (closed) (deprioritize = reduce the ~severity/priority and put this into our backlog)
Hi @dhershkovitch - thanks for the ping here. I think that since we've extended this to 255 characters already, I think it would be ok to deprioritize and reduce priority (your call) and severity for now. @lauraX - please weigh in with your thoughts too. Thank you!
@marknuzzo - I think this is fine. Are we still planning on enforcing database validation in %15.0 though? With 255 or 500 characters, whatever is appropriate, it should be the same thing.
Are we still planning on enforcing database validation in %15.0 though?
Yes, I would feel more comfortable if we still adjusted the character limit from 255 -> 500 as a part of %15.0. Depending on how much lead time is needed here (i.e. weight), we can determine when this can be worked either next month, March or April since 15.0 rolls out in May. WDYT?
@marknuzzo sounds good! I think this should be an easy backend-weight1 , since it only requires a database validation. We can do it all the way in April.
Is there an issue to track this?
@dhershkovitch this could be the issue for it maybe?
Hi @dhershkovitch - yes, this is the issue that we would track the character limit adjustment for %15.0 from 255 -> 500. So we don't lose track of this issue, do you want to change the milestone to 15.0 or add the candidate15.0?
@marknuzzo - As I was doing some cleanup, I realize we can probably do this issue as part of this feature flag rollout cleanup: #344665 (closed).
Also since it's not a breaking change, we can probably just do it sooner rather than later, since the MR is ready anyway. WDYT? If you agree, we can close this issue and I will submit the MR.
Thanks @lauraX - I agree that this appears to be the same thing as that MR that is already ready. We can close this issue since the issue'sMR is already moving. Closing issue now...
@dhershkovitch - this was considered to be more tech debt than a breaking change, but I guess it would be a breaking change if someone has a job name that exceeds 500 characters, like so:
Hello, I am a job name with more than five hundred characters. Perhaps I am just very descriptive? Maybe. I am just long, I'm still typing and haven't even reached two hundred. Today I ate some bread, cheese, and eggs for breakfast. I will probably have some pizza for dinner, but I'm not sure yet. I have been craving a Philly cheesesteak so maybe that will be better, although caramelized onions take a really long time to cook and I am not feeling up for it. Back to the job, we're almost there:
This is VERY unlikely. And we've been enforcing 255 via AR model validation anyway with no issues. 500 is def overkill
@dhershkovitch I'm fine either way! It is mentioned in the description that it might be safer for us to do 500 just in case, although 250 is STILL pretty long. @marknuzzo wdyt - should we keep 255 or go for 500?
@dhershkovitch @lauraX Given other higher priorities at the moment, I'm fine with staying with 255 characters. That would mean we can close this issue as this was only to increase to 500 to completely cover us which technically wouldn't break anything but allow for more characters in the job name. As Laura noted though, I think we're safe. Closing for now.
@marknuzzo - sorry, I should've been more clear, we still need to do the database validation! Right now it's only on the backend (via ActiveRecord) rather than the database. However - this is an easy weight 1, the MR shouldn't take long, we can probably do this between meetings.
@lauraX @marknuzzo If we're proposing to enforce the 500 char limit via DB constraints and we currently return a 500 error for any input of >255 characters, where is the breaking change? (Is it an API call that surpasses some FE form input?)
@cheryl.li - That is a good point. When we first talked about this issue, it was considered a breaking change because we didn't enforce the limit, and at least I wasn't aware of the 500 being returned. So to your point - this is not a breaking change anymore :)
Thanks @lauraX for the additional explanation here around the original intent of breaking change.
Some of the original concern was around by enforcing 500 characters, that would put us in a much safer place but is it possible that a user could have created a job name with 500+ characters, which we then labeled as breaking change. After further consideration and analysis, I think everyone arrived at that having a job name at 500+ characters may be near impossible so the label can be removed, which I have done now.
Hi @lauraX - yes I agree that we should just align it with 255 for enforcing that way the error isn't encountered in the future. I'll update the description now.