Skip to content

Bug/missing cryptography mysql #318

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

Merged

Conversation

vindex10
Copy link
Contributor

When installed into a clean environment, testcontainers-mysql requires cryptography package to authenticate with "mock db". This pull requests specifies the requirement for pymysql (which is the reason why cryptography is required):

https://github.com/PyMySQL/PyMySQL/blob/b1399c95bcde8ef73cbc3a6d4e8bf767094bbd9e/pyproject.toml#L31

This happens only for mysql:8, mysql:5 doesn't have this issue.

@pffijt
Copy link
Collaborator

pffijt commented Mar 16, 2023

@vindex10 Thank you for submitting your contribution!

@vindex10
Copy link
Contributor Author

Thank you! It seems tests for mysql passed :)

@pffijt
Copy link
Collaborator

pffijt commented Mar 16, 2023

@vindex10 Indeed the mysql tests are succeeding. I will have look at the other failing tests

@tillahoffmann
Copy link
Collaborator

Thanks for having a look into the other failing tests. Could you also rebuild the requirements files by running make requirements from the root directory?

@vindex10
Copy link
Contributor Author

vindex10 commented Apr 12, 2023

DISREGARD. I had to align with the master branch, now it is in progress

didnt work out of the box

  ERROR: Could not find a version that satisfies the requirement codecov>=2.1.0 (from versions: none)
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
    raise RequirementsConflicted(criterion)
pip._vendor.resolvelib.resolvers.RequirementsConflicted: Requirements conflict: SpecifierRequirement('codecov>=2.1.0')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 93, in resolve
    collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 350, in resolve
    raise ResolutionImpossible(e.criterion.information)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('codecov>=2.1.0'), parent=None)]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/pip-compile", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/piptools/scripts/compile.py", line 592, in cli
    results = resolver.resolve(max_rounds=max_rounds)
  File "/usr/local/lib/python3.7/site-packages/piptools/resolver.py", line 595, in resolve
    compatible_existing_constraints=compatible_existing_constraints,
  File "/usr/local/lib/python3.7/site-packages/piptools/resolver.py", line 628, in _do_resolve
    check_supported_wheels=not self.options.target_dir,
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 101, in resolve
    raise error from e
pip._internal.exceptions.DistributionNotFound: No matching distribution found for codecov>=2.1.0
make: *** [Makefile:70: requirements/3.7.txt] Error 1

@tillahoffmann
Copy link
Collaborator

tillahoffmann commented Apr 12, 2023

#331, which adds a workflow to build requirements files, is now merged will soon be merged. If you can't get it to run locally, rebase on master, and push your changes. The workflow will then build the requirements and you can download them as build artifacts. Bit convoluted but ever so slightly better than fiddling with local installations.

@vindex10 vindex10 force-pushed the bug/missing_cryptography_mysql branch 3 times, most recently from d2af4ae to 6c5862e Compare April 12, 2023 21:12
@vindex10
Copy link
Contributor Author

local build failed. @tillahoffmann please allow workflows :) I rebased on top of #331

@vindex10 vindex10 force-pushed the bug/missing_cryptography_mysql branch from 6c5862e to 33c6be5 Compare April 14, 2023 23:04
@vindex10
Copy link
Contributor Author

@tillahoffmann Hi! I managed to run make requirements now and pushed the new version. could you please trigger the tests?

@vindex10
Copy link
Contributor Author

@tillahoffmann all checks have passed! 🎉

@vindex10 vindex10 force-pushed the bug/missing_cryptography_mysql branch from 2521db0 to 32cba7a Compare June 6, 2023 19:46
@vindex10
Copy link
Contributor Author

vindex10 commented Jun 6, 2023

@tillahoffmann please allow the workflows again, I resolved the conflicts.

I will update the requirements with get_requirements.py if the tests fail

@vindex10
Copy link
Contributor Author

@tillahoffmann all checks have passed! should we merge before it gained more conflicts? :)

@tillahoffmann
Copy link
Collaborator

Thanks @vindex10! Could you please update the requirement files as outlined here?

@vindex10
Copy link
Contributor Author

@tillahoffmann done.
I only did the last step: "python3 get_requirements.py --pr=[]"

I hope it is correct :)

@vindex10
Copy link
Contributor Author

Why were the 12 checks cancelled? is it expected?

@vindex10
Copy link
Contributor Author

@tillahoffmann could you please comment? I see only successful or cancelled checks, no failed.

@tillahoffmann tillahoffmann merged commit 928af5a into testcontainers:main Jun 24, 2023
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.

3 participants