Hello everyone, I'm new here, and i just forked the mailman core repo and made a contribution. I pushed my changes to gitlab, and then i get an error that pipeline failed.
This pipeline ran on the contents of the merge request's source branch, not the target branch. How do i go about this
On 3/7/24 1:16 PM, Daniel Azubuine wrote:
This pipeline ran on the contents of the merge request's source branch, not the target branch.
Which is what it's supposed to do.
Go to your MR and click on the Merge request pipeline #1205154779 failed
link. Then click on the failing jobs to see why they failed.
Note that you can run things like
tox -e qa
tox -e py311-diffcov
in your fork (you may need to install tox) to find and fix failures like these before creating/updating your MR.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Plese keep the thread on the list.
On 3/8/24 6:36 AM, Daniel Azubuine wrote:
Sir, I get this error /home/daniel/Documents/repos/mailman/mailman/.tox/qa/bin/python: can't open file '/home/daniel/Documents/repos/mailman/mailman/setup.py': [Errno 2] No such file or directory ERROR: invocation failed (exit code 2)/ _______________________________________________ summary
ERROR: qa: InvocationError for command /home/daniel/Documents/repos/mailman/mailman/.tox/qa/bin/python /home/daniel/Documents/repos/mailman/mailman/setup.py --name (exited with code 2) when i run tox -e qa.
What is your tox version (tox --version)?
You shouldn't need this, but adding
skipdist = True
in the [tox] section of tox.ini may help.
I also get this when i run tox -e py310-diffcov
src/mailman/interfaces/listmanager.py (75.0%): Missing lines 37
Total: 4 lines Missing: 1 line Coverage: 75%
ERROR: InvocationError for command /home/daniel/Documents/repos/mailman/mailman/.tox/py310-diffcov/bin/diff-cover coverage.xml --fail-under=100 --compare-branch origin/master (exited with code 1)
This is expected output in this case. Line 37 in your src/mailman/interfaces/listmanager.py is not covered by any tests. Modifying the test_cannot_create_a_list_twice test in src/mailman/model/tests/test_listmanager.py to use assertRaisesRegex rather than assertRaises may help. See <https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRaisesRegex>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hey,
How did you set up your local machine? The only doc I could find on setting up was this: https://wiki.list.org/DEV/HowToContributeGit
However, a lot of dependencies seem to be missing within files, so I cannot run it. I was checking if there was a requirements.txt and a virtual env I could set up, but no luck. Appreciate your help!
-Usama
On 3/25/24 20:06, Usama Nadeem wrote:
Hey,
How did you set up your local machine? The only doc I could find on setting up was this: https://wiki.list.org/DEV/HowToContributeGit
Follow the doc at https://docs.mailman3.org/en/latest/install/virtualenv.html to create a working Mailman installation on your local machine.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Usama Nadeem writes:
How did you set up your local machine? The only doc I could find on setting up was this: https://wiki.list.org/DEV/HowToContributeGit
As a specific example of setting up a dev environment, I did
mkdir Mailman cd Mailman
then cloned
mailman mailman-web mailman-hyperkitty django-mailman3 mailmanclient postorius hyperkitty
from the GitLab mailman project. Then
python -m venv VENV . VENV/bin/activate python -m pip --upgrade install pip python -m pip install build wheel mkdir DIST for d in $the_repos_above; do pushd $d python -m build -o ../DIST popd done python -m pip install DIST/*.whl
After that you need to do a certain amount of setup, creating files in /etc/mailman3, at least mailman.cfg, settings.py, and gunicorn-conf.py (that last is my preferred name, I forget the exact standard name, which doesn't express that it's just Python code, and tends to draw warnings because it lacks the .py extension).
Something that I don't recall being documented is that "mailman-web compress" expects to be run from Mailman's $var_dir (see mailman.cfg for its definition). Also, recently the django-allauth module which is downloaded from PyPI has been quite unstable (in the sense of API compatibility, AFAIK it works fine once APIs match). The HEAD commits of postorius, hyperkitty, and django-mailman3 should be compatible with the most recent django-allauth, but if you get errors from "mailman-web" subcommands about missing methods or wrong type arguments, there's a good chance it's django-allauth (especially if for some reason you are working with past versions). Feel free to ask on the list about those.
OTOH, if you're at all experienced with Python, they're not hard to debug. If you are thinking about contributing to the mailman-web side of the suite, debugging such errors yourself is a good exercise to dip your toe into the code.
Steve
participants (4)
-
Daniel Azubuine
-
Mark Sapiro
-
Stephen J. Turnbull
-
Usama Nadeem