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

Integration test failed - assert nomatch (Arch linux) #632

Open
alan1world opened this issue Nov 4, 2022 · 4 comments
Open

Integration test failed - assert nomatch (Arch linux) #632

alan1world opened this issue Nov 4, 2022 · 4 comments
Labels
infrastructure CI and release pipeline

Comments

@alan1world
Copy link

Describe the bug

Integration tests fail when running the check() function to build the Arch Linux package.

No errors are returned by the build process - only the check().

--------------------------- snapshot report summary ----------------------------
2 snapshots failed. 210 snapshots passed.
=========================== short test summary info ============================
FAILED tests/integration/test_snapshot_option_update.py::test_update_failure_shows_snapshot_diff - Failed:  nomatch: ".*assert snapshot == \\['this', 'will', 'not', 'match'\\]"
=========== 1 failed, 235 passed, 4 xpassed, 297 warnings in 20.44s ============
==> ERROR: A failure occurred in check().
    Aborting...
:: Unable to build python-syrupy - makepkg exited with code: 4

To reproduce

  1. Download the PKGBUILD from the aur into a temp dir (or use an aur helper such as trizen, yay etc.)
  2. Run makepkg against the PKGBUILD
  3. Get a test error returned from the check() function

Expected behavior

Package should pass integration tests.

Environment (please complete the following information):

  • OS: Arch Linux
  • Syrupy Version: 3.0.3-1
  • Python Version: 3.10
@noahnu
Copy link
Collaborator

noahnu commented Nov 4, 2022

We're not going to be able to avoid regressions unless we move the build checks to this repo. I don't have any experience with building packages for arch linux, but if you'd like to open a PR to contribute the relevant workflows, I'll merge it in.

I am also re-considering the use of poetry (still tentative) so the build process may change somewhat (should be PEP compliant).

@noahnu noahnu changed the title Integretion test failed - assert nomatch (Arch linux) Integration test failed - assert nomatch (Arch linux) Nov 4, 2022
@noahnu
Copy link
Collaborator

noahnu commented Nov 4, 2022

We use the poetry-core backend in our pyproject.toml. This is PEP 517 compliant.

@carlosal1015 Could you try the build instructions in poetry-core? I'll likely migrate to build at some point, but in the meantime, a pip install followed by a pip wheel should do the trick.

@noahnu noahnu added the infrastructure CI and release pipeline label Nov 4, 2022
@alan1world
Copy link
Author

It's discouraged to install the wheel directly, but it is possible.

Removing the build() and check() sections from the PKGBUILD and making these changes:

source=(https://files.pythonhosted.org/packages/py3/${_base::1}/$_base/${_base//-/_}-$pkgver-py3-none-any.whl)
sha512sums=('8ccff1caba6b31a3f1abf2ef68add20c79bbca02cc3b81c38a3893067e4a44ff511cb02a8cf9fd855f4adcddc21e5345add627f464cad8470787cb589aad1d1a')

package() {
  python -m installer --destdir="${pkgdir}" ${_base//-/_}-$pkgver-py3-none-any.whl

Results in a built package.

@carlosal1015
Copy link

carlosal1015 commented Nov 5, 2022

We use the poetry-core backend in our pyproject.toml. This is PEP 517 compliant.

@carlosal1015 Could you try the build instructions in poetry-core? I'll likely migrate to build at some point, but in the meantime, a pip install followed by a pip wheel should do the trick.

I am following according to https://wiki.archlinux.org/title/Python_package_guidelines

For Python packages using standard metadata to specify their build backend in pyproject.toml, this can most easily achieved using python-build and python-installer. Old packages might fail to specify that they use setuptools, and only offer a setup.py that has to be invoked manually.

I am often put the the package name build-backend = 'foo' in pyproject.toml as make dependency join with python-build and python-installer and does the trick 100%, with poetry, poetry-core, setuptools, flit-core, etc.

--------------------------- snapshot report summary ----------------------------
2 snapshots failed. 210 snapshots passed.
=========================== short test summary info ============================
FAILED tests/integration/test_snapshot_option_update.py::test_update_failure_shows_snapshot_diff - Failed:  nomatch: ".*assert snapshot == \\['this', 'will', 'not', 'match'\\]"
=========== 1 failed, 235 passed, 4 xpassed, 297 warnings in 20.44s ============
==> ERROR: A failure occurred in check().
    Aborting...

@alan1world I can skip this single test with pytest -k 'not update_failure_shows_snapshot_diff'. if the new release still failing check() function.

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

No branches or pull requests

3 participants