wemakecustom / gitlab-composer

Gitlab Composer repository
163 stars 44 forks source link

Fix: is_admin isn't availabe after update to gitlab v9 #26

Closed blankse closed 7 years ago

blankse commented 7 years ago

Since Gitlab v9.1.0 the user has no is_admin property https://gitlab.com/gitlab-org/gitlab-ce/commit/5e1a802b15af4ba991f9ed85a691f1a925cc0edf

lemoinem commented 7 years ago

Thank you very much for the PR.

The point I am mostly concerned with is: "Does this PR break backward compatibility?" As it has been mentioned in another issue, this repo is still using APIv3, which is now deprecated and will be removed with GitLab v9.5.

If you can confirm this will allow us to support GitLab v9.1 to v9.4 while still supporting the previous versions, I will merge it ASAP and tag a new minor release.

Otherwise, I'm not sure restricting the tool to a set so narrow (only GitLab v9.1 to v9.4) is actually productive. If it's impossible to support both GitLab v9.0 and lower AND GitLab v9.1 to v9.4, I'd very much prefer a PR focusing on migrating to a newer version of the API, so we can have support for the foreseeable future (I wouldn't mind breaking backward compatibility in this context).

blankse commented 7 years ago

I think the can_create_group property should also exist in older versions.

That the is_admin property no longer exists in the API is probably a mistake. There is already a issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/33260 We can wait for the result.

AntoninSlejska commented 7 years ago

The APIv3 will be removed with GitLab v9.5. See: https://docs.gitlab.com/ee/api/v3_to_v4.html

lemoinem commented 7 years ago

@AntoninSlejska Thanks for the precision, I updated my comment to reflect this. It doesn't change the bottom-line of my initial answer though.

blankse commented 7 years ago

In the new patch release (9.2.7) the is_admin flag is back in APIv3:

So this change is not required anymore.

But yes, we should go to APIv4 asap :)