Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: removeproject.approvals.set_approvals() method#2333

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 2 commits intomainfromjlvillal/remove_approvers_endpoint
Oct 19, 2022

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovosJohnVillalovos commentedOct 19, 2022
edited
Loading

Theproject.approvals.set_approvals() method used the
/projects/:id/approvers end point. That end point was removed from
GitLab in the 13.11 release, on 2-Apr-2021 in commit
27dc2f2fe81249bbdc25f7bd8fe799752aac05e6 via merge commit
e482597a8cf1bae8e27abd6774b684fb90491835. It was deprecated on
19-Aug-2019.

See merge request:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57473

Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

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

Thanks@JohnVillalovos - was gonna get to this myself but you beat me to it 😅

I think we can now also remove/modify this part and potentially start testing approvals in functional tests:

project.approvals.set_approvers([1], [])
approval=project.approvals.get()
assertapproval.approvers[0]["user"]["id"]==1

However, our project-level approval managers/objects are missing some mixing potentially.
Otherwise I just had some notes on the difference no project/MR-level approvals.

@JohnVillalovosJohnVillalovos marked this pull request as draftOctober 19, 2022 14:41
@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/remove_approvers_endpoint branch from99d27fe to1a5b47cCompareOctober 19, 2022 16:02
@JohnVillalovosJohnVillalovos marked this pull request as ready for reviewOctober 19, 2022 16:02
@JohnVillalovos
Copy link
MemberAuthor

Thanks@JohnVillalovos - was gonna get to this myself but you beat me to it 😅

I think we can now also remove/modify this part and potentially start testing approvals in functional tests:

project.approvals.set_approvers([1], [])
approval=project.approvals.get()
assertapproval.approvers[0]["user"]["id"]==1

I agree we should get the tests working. But I just wanted to remove the non-working endpoint at this stage. Getting the tests working is a separate issue and MR in my mind.

@nejch
Copy link
Member

Thanks@JohnVillalovos - was gonna get to this myself but you beat me to it sweat_smile
I think we can now also remove/modify this part and potentially start testing approvals in functional tests:

project.approvals.set_approvers([1], [])
approval=project.approvals.get()
assertapproval.approvers[0]["user"]["id"]==1

I agree we should get the tests working. But I just wanted to remove the non-working endpoint at this stage. Getting the tests working is a separate issue and MR in my mind.

Ok, makes sense. the xfail is a good indicator anyway that there's something wrong with the code and we should fix it at some point.

Could we maybe do afix: remove dead code in .. or something like that so it shows up in the changelog? I wouldn't consider it a breaking change for something from 13.x but just if someone does still use it, they'll see immediately why it's gone in the release :)

@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/remove_approvers_endpoint branch from1a5b47c to431ae7fCompareOctober 19, 2022 16:36
@JohnVillalovosJohnVillalovos changed the titlechore: removeset_approvals() methodfix: removeproject.approvals.set_approvals() methodOct 19, 2022
The `project.approvals.set_approvals()` method used the`/projects/:id/approvers` end point. That end point was removed fromGitLab in the 13.11 release, on 2-Apr-2021 in commit27dc2f2fe81249bbdc25f7bd8fe799752aac05e6 via merge commite482597a8cf1bae8e27abd6774b684fb90491835. It was deprecated on19-Aug-2019.See merge request:https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57473
@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/remove_approvers_endpoint branch from431ae7f to91f08f0CompareOctober 19, 2022 16:37
@JohnVillalovos
Copy link
MemberAuthor

JohnVillalovos commentedOct 19, 2022
edited
Loading

Could we maybe do afix: remove dead code in .. or something like that so it shows up in the changelog? I wouldn't consider it a breaking change for something from 13.x but just if someone does still use it, they'll see immediately why it's gone in the release :)

Done! 🙂 Good idea!

The `not-callable` error started showing up. Ignore this error asit is invalid. Also `mypy` tests for these issues.Closes:#2334
@JohnVillalovos
Copy link
MemberAuthor

@nejch@lmilbaum I also put a fix for#2334 in this PR.

nejch reacted with thumbs up emoji

@lmilbaum
Copy link

@nejch@lmilbaum I also put a fix for#2334 in this PR.

Cool. Than, I can remove the astroid pinned version in#2320.

nejch reacted with thumbs up emoji

@nejchnejch merged commiteb54adf intomainOct 19, 2022
@nejchnejch deleted the jlvillal/remove_approvers_endpoint branchOctober 19, 2022 16:54
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchnejch approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@JohnVillalovos@nejch@lmilbaum

[8]ページ先頭

©2009-2025 Movatter.jp