• Alejandro Rodríguez's avatar
    Fix mirrored projects allowing empty import urls · 0774b69f
    Alejandro Rodríguez authored
    Because of missing validations in the projects model, you could
    create a new project with a nil or empty import_url with mirror=true.
    This would cause exceptions when
    RepositoryUpdateMirrorWorker::UpdateMirrorError ran and attempted to
    update one of these projects. This was made easier by the fact that
    you could show the "Mirror repository" checkbox in the UI, check it,
    hide it, and still have its value considered.
    
    The missing validations have been added, and minor adjustments have
    been made to the UI to improve the previous behaviour. A migration
    was also added to update mirror=false in all projects with a nil or
    empty import url that exists because of the described bug.
    0774b69f
project_spec.rb 54.8 KB