プロジェクト

全般

プロフィール

Vote #76196

完了

Possibility of having 2 (or more) repositories with empty identifier

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
93
issue_org_id:
19400
author_id:
11192
assigned_to_id:
1
comments:
7
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
91
ステータス-->[Closed]

説明

#19260#note-4

This patch (r14050) introduces the possibility of having 2 (or more) repositories with empty identifier.
Is this something intendend?

Maybe a self.save(validate: false) in clear_extra_info_of_changesets would have done the job too? (specially if the repository is about to be deleted)


journals

--------------------------------------------------------------------------------
Maybe I should precise the context : I'm the maintainer of "Redmine Git Hosting":https://github.com/jbox-web/redmine_git_hosting plugin and this patch brings the side effect describe above.

I dug this "issue":http://www.redmine.org/issues/779 and the decision about repository identifier presence is not very clear.
This "comment":http://www.redmine.org/issues/779#note-109 of jpl let me think that only one repository per project can have empty identifier.
Can you confirm (or not) that it's the case?

I've put a screenshot of the issue in attachment.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Hi!

Thanks for your patch! But I think there still an issue... I test Redmine Git Hosting plugin with Travis (as you do) and one the test is still failing : https://travis-ci.org/jbox-web/redmine_git_hosting.

As you can see I test Redmine Git Hosting with Redmine 2.6.2/3.0.0 (from tarball) and 2.6-stable/3.0-stable (from SVN) and both stable branch are broken. (from plugin point of view).

It's about identifier uniqueness.

Here the test :

<pre>
before do
@repository_1 = create_git_repository(project: @project_child, is_default: true) # Create a repo in database with no identifier
end

describe "Test uniqueness" do
context "when blank identifier is already taken by a repository" do
it { expect(build_git_repository(project: @project_child, identifier: '')).to be_invalid } # This one fails
end

context "when set as default and blank identifier is already taken by a repository" do
it { expect(build_git_repository(project: @project_child, identifier: '', is_default: true)).to be_invalid } # This one pass
end

....
</pre>

It seems that depending on the "default status" of a repository you can still create 2 repositories with blank identifier.

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリSCM_3 にセット
  • 対象バージョン2.6.4_93 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0