Skip to content
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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bRitch022
Copy link

Related issues:

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

@xmunoz xmunoz self-requested a review May 20, 2022 23:30
@xmunoz
Copy link
Owner

xmunoz commented May 23, 2022

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.

@bRitch022
Copy link
Author

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
Copy link
Author

bRitch022 commented May 23, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide support to skip pre-migrated issues
2 participants