-
Notifications
You must be signed in to change notification settings - Fork 669
feat: Add play command to project pipeline schedules #1069
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
feat: Add play command to project pipeline schedules #1069
Conversation
Where would I add tests for this? |
fc76496
to
48bc54f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your MR! I've added a few comments
Tests are a bit of a mess right now. You can add your tests here: https://github.com/python-gitlab/python-gitlab/blob/master/gitlab/tests/test_gitlab.py or use the newer structure and create a new file here |
Thanks for the feedback! I will make these changes! |
I am having a tough time getting the tests to execute. Which command should I use? The python functionals tests for v4? When I run I get the following error.
|
You can use tox -e py_func_v4 # for functional tests (will spawn a docker container...)
tox -e py38 # for unit tests |
I've updated the test docs: #1073 |
@twonds the command as Max said above should execute the tests. In your example above, did you remove the private_token from the output or is it empty? That would be an issue. But the (rather cryptic) 404 error suggests something's wrong with the Project or Group Export test (see 404 Not found or has expired). This is unrelated to your changes - the Group Export API is still a bit incomplete so maybe we're not waiting long enough for export creation. Do you consistently get this same error if you re-run tests? |
Thanks! Unit tests work and trying functional tests now. I will implement a test and update this pr |
This time on the functional tests gitlab seemed to come up but the tests did not execute due to a timeout. This timeout could be anything, I have not investigated. What are the minimum resources for running gitlab locally?
|
The Travis builds run on 2 cores with 7.5GB, but the functional tests do fail sometimes. I've also had issues with an 8GB VM with 2 cores. It's actually possible the tests were running but failed somewhere randomly on timeout. Currently there's still not much visibility into what's happening with functional tests unless they explicitly fail on an assert. Is this consistently failing if you retry? |
fix: remove version from setup feat: add pipeline schedule play error exception docs: add documentation for pipeline schedule play
212ea77
to
07b9988
Compare
Yes, same error for each attempt |
I have added a test |
@twonds I think maybe your test was lost in your last force-push 😊 |
Hah, I have been a poor contributor in this pull request. I can not get used to commit lint, causing git rebase screw ups. I also can not get functional tests working. :) |
Not at all, you've been very responsive :) I can't see what you've tried for functional tests, but I just had a look and realized the functional tests would take a bit of scaffolding before you could even add a schedule play test, we'd first need a project with pipelines created and schedules etc, which aren't yet tested atm. So I wouldn't worry about it if it's too convoluted for a first contribution. Since you have unit tests now, I'd just get the pipeline green again (run black with |
Thanks @nejch . @max-wittig I think this is ready. Thanks for your patience! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twonds Thanks for your patience!
I have added a custom play command to the project pipeline schedules.
I made a previous pull request #1068 but the commits were incorrect. I also fixed the lint errors.
Please let me know if I am missing anything else.