Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only search gitlab:import:repos on repos on subdir [failure unrelated][can be updated] #8140

Closed

Conversation

cirosantilli
Copy link
Contributor

of type repos_path/group/repo.git.

Before this, any other location like repos_path/repo.git
or repos_path/group/XXX/repo.git does generate new projects, but
these projects are empty since no copy is done.

Fix https://github.com/gitlabhq/gitlabhq/issues/4137

This behavior probably exists to support the old global repositories, but since it is broken already, I propose we remove support for that once and for all here. Let users put their repositories on the regular repository structure only which is less confusing and easier to maintain.

Implementation notes:

  • group_name == '.' is not possible since glob does not expand to ., so that logic was removed.

@TeatroIO
Copy link

I've prepared a stage. Click to open.

@cirosantilli cirosantilli changed the title Only allow gitlab:import:repos on repos on subdir Only search gitlab:import:repos on repos on subdir Oct 22, 2014
@cirosantilli cirosantilli force-pushed the forbid-invalid-import branch 2 times, most recently from d80b720 to 37c597c Compare October 23, 2014 22:21
group = Group.new(:name => group_name)
group.path = group_name
group.owner = user
if group.save
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want validations to run here? i.e. save!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC .save already does validations and returns false on fail: the difference is that save! would raise: http://guides.rubyonrails.org/active_record_validations.html#when-does-validation-happen-questionmark

@jvanbaarsen
Copy link
Contributor

@cirosantilli Can you please make this mergeable again?

of type `repos_path/group/repo.git`.

Before this, any other location like `repos_path/repo.git`
or `repos_path/group/XXX/repo.git` does generate new projects, but
these projects are empty since no copy is done.
@cirosantilli cirosantilli changed the title Only search gitlab:import:repos on repos on subdir [WIP] Only search gitlab:import:repos on repos on subdir Dec 29, 2014
@cirosantilli cirosantilli changed the title [WIP] Only search gitlab:import:repos on repos on subdir Only search gitlab:import:repos on repos on subdir [failure unrelated] Dec 30, 2014
@cirosantilli
Copy link
Contributor Author

@jvanbaarsen updated. Cannot reproduce error locally.

@jvanbaarsen
Copy link
Contributor

Hm the weird thing is, one built is successful, and the other is not.. Can you rebase? Maybe it works after that :)

@jvanbaarsen
Copy link
Contributor

This merge request has been closed because a request for more information has not been reacted to for more than 2 weeks. If you respond and conform to the merge request guidelines in our contributing guidelines we will reopen this merge request.

@jvanbaarsen jvanbaarsen closed this Apr 8, 2015
@cirosantilli cirosantilli changed the title Only search gitlab:import:repos on repos on subdir [failure unrelated] Only search gitlab:import:repos on repos on subdir [failure unrelated][can be updated] Apr 9, 2015
@jantman
Copy link

jantman commented Jul 16, 2015

Is this just being ignored now? I just spent half an hour going through the MANY wiki articles and google results trying to figure out why the repositories that I imported [per the docs|https://github.com/gitlabhq/gitlabhq/blob/master/lib/tasks/gitlab/import.rake] were empty, before I found this PR.

@cirosantilli
Copy link
Contributor Author

@jantman GitLab ignores PRs if we don't update them in 2 weeks after request. They took too long to review and I had lost interest when they requested update.

Feel free to pull this, make it mergeable and a new PR. If you make this mergeable, there is some chance that it will get merged.

I think it's not a very good GitLab policy... if something is worth being reviewed and merged by gitlab, it is also worth being rebased by gitlab.

:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants