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(api): delete invalid 'project-runner get' command#1628

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

Conversation

@lgatellier
Copy link
Contributor

@lgatellierlgatellier commentedOct 9, 2021
edited by nejch
Loading

Deletes the 'project-runner get' command which does'nt match any existing Gitlab API resource.

Closes#1608.

@codecov-commenter
Copy link

codecov-commenter commentedOct 9, 2021
edited
Loading

Codecov Report

Merging#1628 (d989c9b) intomain (4170dbe) willnot change coverage.
The diff coverage is100.00%.

@@           Coverage Diff           @@##             main    #1628   +/-   ##=======================================  Coverage   91.92%   91.92%           =======================================  Files          74       74             Lines        4295     4295           =======================================  Hits         3948     3948             Misses        347      347
FlagCoverage Δ
cli_func_v481.93% <100.00%> (ø)
py_func_v480.95% <100.00%> (ø)
unit83.74% <100.00%> (ø)

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
gitlab/v4/objects/runners.py98.18% <100.00%> (ø)

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.

Thank you very much@lgatellier!

You are right that the group runner should only inherit fromListMixin. Whether you'd like to add this here - or open a new PR - is up to you :)

@lgatellierlgatellierforce-pushed thefix/delete-project-runner-get branch from3514b2b to06ef25dCompareOctober 9, 2021 12:47
@nejch
Copy link
Member

Funny, looks like there were actually some unit tests written that mocked POST/DELETE responses to the group runner. I'll check if this might be an undocumented API in gitlab already..

@nejch
Copy link
Member

Funny, looks like there were actually some unit tests written that mocked POST/DELETE responses to the group runner. I'll check if this might be an undocumented API in gitlab already..

@lgatellier I think you can safely delete the following to make it pass:

https://github.com/python-gitlab/python-gitlab/blob/master/tests/unit/objects/test_runners.py#L255-L256

and

https://github.com/python-gitlab/python-gitlab/blob/master/tests/unit/objects/test_runners.py#L266-L270

as real GitLab servers would not work with this.

@lgatellier
Copy link
ContributorAuthor

I removed the 2 test cases.
I think mocked responses related to enabling/disabling runner should be changed to remove "groups" from URI pattern.
Can you confirm that ?

@pytest.fixturedefresp_runner_enable():withresponses.RequestsMock()asrsps:pattern=re.compile(r".*?(projects|groups)/1/runners")@pytest.fixturedefresp_runner_disable():withresponses.RequestsMock()asrsps:pattern=re.compile(r".*?/(groups|projects)/1/runners/6")

@nejch
Copy link
Member

I removed the 2 test cases. I think mocked responses related to enabling/disabling runner should be changed to remove "groups" from URI pattern. Can you confirm that ?

@pytest.fixturedefresp_runner_enable():withresponses.RequestsMock()asrsps:pattern=re.compile(r".*?(projects|groups)/1/runners")@pytest.fixturedefresp_runner_disable():withresponses.RequestsMock()asrsps:pattern=re.compile(r".*?/(groups|projects)/1/runners/6")

That's right@lgatellier, thank you!

@nejch
Copy link
Member

@lgatellier would you mind rebasing this onto themain branch?

@lgatellierlgatellierforce-pushed thefix/delete-project-runner-get branch fromdffa8a3 tod989c9bCompareOctober 17, 2021 17:01
@lgatellier
Copy link
ContributorAuthor

@nejch all done, mocked responses are fixed, and branch is rebased !

@nejchnejch merged commit905781b intopython-gitlab:mainOct 17, 2021
@nejch
Copy link
Member

Thanks again@lgatellier!

@lgatellierlgatellier deleted the fix/delete-project-runner-get branchOctober 17, 2021 17:21
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.

'project-runner get' command should not exist

3 participants

@lgatellier@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp