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

fix: update test packages to fix tests on macos-latest #1373

Merged
merged 18 commits into from
Apr 26, 2024

Conversation

huxuan
Copy link
Member

@huxuan huxuan commented Apr 25, 2024

  • I have added a news fragment under changelog.d/ (if the patch affects the end users)

Summary of changes

Fix #1372

  1. Update some packages to newer version to install on macos-latest successfully.
  2. Update tests package lists
  3. Update pylint related tests due to metadata change

Test plan

Tested by running

# command(s) to exercise these changes
nox -s tests

@huxuan huxuan changed the title fix: update test packages to fix tests fix: update test packages to fix tests on macos-latest Apr 25, 2024
@huxuan
Copy link
Member Author

huxuan commented Apr 25, 2024

emmm.... Seems updating some packages will not fix the problem, they introduce more failures.

any ideas?

@dukecat0
Copy link
Member

Just fixed it by deleting the caches. 👍

@huxuan
Copy link
Member Author

huxuan commented Apr 26, 2024

Just fixed it by deleting the caches. 👍

Hi @dukecat0, thanks for the help!

Could you explain a little bit why deleting the caches will fix the tests? Actually, I spend almost the whole afternoon trying to find out why the tests keep failing. :-(

@huxuan huxuan marked this pull request as ready for review April 26, 2024 11:52
@huxuan huxuan requested a review from dukecat0 April 26, 2024 12:11
@dukecat0
Copy link
Member

Could you explain a little bit why deleting the caches will fix the tests? Actually, I spend almost the whole afternoon trying to find out why the tests keep failing. :-(

Cached packages are stored at .pipx_tests/package_cache/3.12 and they are reused by Github Actions on every run.

- name: Persistent .pipx_tests/package_cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.pipx_tests/package_cache/${{ matrix.python-version }}
key: pipx-tests-package-cache-${{ runner.os }}-${{ matrix.python-version }}

Since package versions are updated here, those cached packages should be removed so that https://github.com/pypa/pipx/blob/main/scripts/update_package_cache.py will download and use the new ones.

Actually the reason that I had a thought of removing cache files is I ran tests on a clean copy of pipx (without cache files) and everything worked fine, so that reminded me.

However, I think we can make some improvements to avoid this in the future:

@huxuan
Copy link
Member Author

huxuan commented Apr 26, 2024

@dukecat0 Thanks so much for the detailed explanation!

Actually, I do not have a macos so I thought it might be some kind of compatibility issue. You save my day!

Copy link
Member

@dukecat0 dukecat0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dukecat0 dukecat0 merged commit c44d210 into pypa:main Apr 26, 2024
14 checks passed
@huxuan huxuan deleted the xuan.hu/update-test-packages branch April 30, 2024 04:55
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.

Test packages need update to please the new macos-latest.
2 participants