bugzilla2gitlab icon indicating copy to clipboard operation
bugzilla2gitlab copied to clipboard

Provides support to allow skipping pre-migrated bugs from bugzilla to…

Open bRitch022 opened this issue 3 years ago • 3 comments

Related issues:

  • This closes #37

Summary of changes:

  • Added a boolean config parameter called gitlab_skip_pre_migrated_issues in config.py
  • Added a check if the bug has been migrated already by sending a GET request to the gitlab api with a search for the proposed issue title.
  • Provided a check prior to saving the new issue in the Migrator, which will not save the issue if it is already migrated
  • Return a boolean from the Migrator::migrate() method to see if any bugs were skipped
  • Added a check to the config tuple to enforce the new parameter in defaults.yml

Testing

** Caveat -- This was tested on a production application and works very successfully. However, I could not get the pytest to successfully execute with pytest nor pytest-3. This is the output: image

bRitch022 avatar May 20 '22 23:05 bRitch022

I can setup CI for PRs. You need to run pip install . before running pytest. This is the test failure that I am getting:

>           raise ConnectionError(e, request=request)
E           requests.exceptions.ConnectionError: HTTPSConnectionPool(host='git.example.com', port=443): Max retries exceeded with url: /api/v4/issues?searchWhat%20are%20the%20Spice%20Girls%20doing%20in%20my%20spice%20dispenser?&in=title (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6960948190>: Failed to establish a new connection: [Errno -2] Name or service not known'))

venv/lib/python3.10/site-packages/requests/adapters.py:519: ConnectionError

If you can get the tests passing, then I'll do a review.

xmunoz avatar May 23 '22 00:05 xmunoz

I can setup CI for PRs. You need to run pip install . before running pytest.

I was sure to run the pip install .

Looks like it was successful as well, but no luck in running the test image

bRitch022 avatar May 23 '22 17:05 bRitch022

I can setup CI for PRs.

If you can get the tests passing, then I'll do a review.

Might not be a bad idea to set up a Gitlab container for this: https://docs.gitlab.com/ee/install/docker.html

I believe the host='git.example.com' is posing an issue. I can't get a passing test even though I have tried:

  • Master branch:
    • Manually executing test_bugzilla2gitlab.py
    • Creating a file with 103 in it, and manually executing `bugzilla2gitlab <buglist.file> tests/test_data/config

bRitch022 avatar May 23 '22 18:05 bRitch022