diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 269c576d882512e0cb2f358657e002b6936343f7..67ae5a0efa7d465c1510dd617de16047da0fa861 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -97,9 +97,11 @@ = render 'projects/errors' = gitlab_ui_form_for @project do |f| .form-group - %p - %span.gl-font-weight-bold= _("Be careful. Renaming a project's repository can have unintended side effects.") - = _('You will need to update your local repositories to point to the new location.') + %ul + %li= _("Be careful. Renaming a project's repository can have unintended side effects.") + %li= _('You will need to update your local repositories to point to the new location.') + - if Feature.enabled?(:renaming_project_with_tags, @project) + %li= s_('ContainerRegistry|While the rename is in progress, new uploads to the container registry are blocked. Ongoing uploads may fail and need to be retried.') - if @project.deployment_platform.present? %p= _('Your deployment services will be broken, you will need to manually fix the services after renaming.') = f.label :path, _('Path'), class: 'label-bold' diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 9d3c2b135ea5a02262579fc1c6d8ff58b422ae8a..470d9f4cace0f579d492c24837abe68d04b67f4d 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -13393,6 +13393,9 @@ msgstr "" msgid "ContainerRegistry|We are having trouble connecting to the Container Registry. Please try refreshing the page. If this error persists, please review %{docLinkStart}the troubleshooting documentation%{docLinkEnd}." msgstr "" +msgid "ContainerRegistry|While the rename is in progress, new uploads to the container registry are blocked. Ongoing uploads may fail and need to be retried." +msgstr "" + msgid "ContainerRegistry|With the Container Registry, every project can have its own space to store its Docker images. %{docLinkStart}More Information%{docLinkEnd}" msgstr "" diff --git a/spec/views/projects/edit.html.haml_spec.rb b/spec/views/projects/edit.html.haml_spec.rb index 8c1a8cf21d06eaa4c2a58a16a99abc1bcd858c95..69eba01687ff98377cf8ceea4e1df9f1a620610b 100644 --- a/spec/views/projects/edit.html.haml_spec.rb +++ b/spec/views/projects/edit.html.haml_spec.rb @@ -111,4 +111,24 @@ expect(rendered).to have_content(_('GitLab Pages has moved')) end end + + describe 'notifications on renaming the project path' do + it 'displays the warning regarding the container registry' do + render + + expect(rendered).to have_content('new uploads to the container registry are blocked') + end + + context 'when the feature renaming_project_with_tags is disabled' do + before do + stub_feature_flags(renaming_project_with_tags: false) + end + + it 'does not display the warning regarding the container registry' do + render + + expect(rendered).not_to have_content('new uploads to the container registry are blocked') + end + end + end end