Skip to content

Restore custom distutils handling for resolving paths to submodules. #1386

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
merged 15 commits into from
Feb 27, 2022

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented Feb 9, 2022

Steps

  • For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

I understand @DanielNoord wants to bisect before evaluating a path forward. But this test case fails without these changes, so it could be a sufficient way forward.

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes pylint-dev/pylint#5645

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.10.0 milestone Feb 10, 2022
@Pierre-Sassoulas Pierre-Sassoulas added Enhancement ✨ Improvement to a component Bug 🪳 and removed Enhancement ✨ Improvement to a component labels Feb 10, 2022
@DanielNoord DanielNoord requested a review from cdce8p February 11, 2022 14:42
@DanielNoord
Copy link
Collaborator

I wonder how we can fully test this..
This does seem like it would work though.

@cdce8p What do you think? Try this and see if the problems go away?

@jacobtylerwalls
Copy link
Member Author

I wonder how we can fully test this..

I mean, we could add the CI step in this PR if we really want to have an extra workflow that only runs one corner case!

@jacobtylerwalls jacobtylerwalls changed the title [proof of concept] Restore custom distutils handling for resolving paths to submodules. Restore custom distutils handling for resolving paths to submodules. Feb 19, 2022
@jacobtylerwalls jacobtylerwalls marked this pull request as ready for review February 19, 2022 17:41
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Thank you @jacobtylerwalls. We just need to remove the temporary CI job before merging, right ?

Co-authored-by: Pierre Sassoulas <[email protected]>
@DanielNoord
Copy link
Collaborator

Do we though? Won't the CI job be a nice test to see this actually works?

@jacobtylerwalls
Copy link
Member Author

Fine with me. I added caching to make it more efficient.

Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

The change looks like it should work! I'm just not sure that we should run the CI job for every time. It's excellent to have but maybe better as part of an optional CI suite?

What do you guys think about moving it to a separate workflow file and using the workflow_dispatch event to trigger it whenever we need to? For that case, it would make sense to add a small comment in the code mentioning the workflow and that it can be run manually. Lastly, the caching could probably be removed. Although slightly more efficient, it can also create unexpected issues. If only run on request, there likely won't be any cache which can be restored to begin with.
https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow

An alternative would be to add if: false to the job. It would also be trivial to change it to true whenever we need to work on it (which itself shouldn't be all too often).

After writing this, I'm just slightly leaning towards the latter option.

@jacobtylerwalls
Copy link
Member Author

I'm thinking along the lines of the former option: what about creating a "release testing" CI workflow with on: workflow_dispatch, and then adding a reminder to the release.md checklist to remember to run it before releases?

@cdce8p
Copy link
Member

cdce8p commented Feb 26, 2022

I'm thinking along the lines of the former option: what about creating a "release testing" CI workflow with on: workflow_dispatch, and then adding a reminder to the release.md checklist to remember to run it before releases?

Had another idea after reading "release testing", why not trigger on push of tags and workflow_dispatch?

@Pierre-Sassoulas
Copy link
Member

why not trigger on push of tags and workflow_dispatch?

The issue is then that we can tag buggy commit and have nothing released. Removing or renaming a tag and its associated milestone, then fixing the issue and doing another tag if something fail is more complicated than just launching locally.

@cdce8p
Copy link
Member

cdce8p commented Feb 26, 2022

The issue is then that we can tag buggy commit and have nothing released.

The idea was to have run automatically for every release. I still wanted to keep the manual trigger.
You do have a point though that deleting a tag is quite some work. Let's do just the workflow_dispatch trigger then with a note in release.md as suggested.

@cdce8p cdce8p merged commit 62aa3bb into pylint-dev:main Feb 27, 2022
@cdce8p
Copy link
Member

cdce8p commented Feb 27, 2022

Thanks @jacobtylerwalls 🐬

@jacobtylerwalls jacobtylerwalls deleted the revert-distutils branch February 27, 2022 13:59
@DanielNoord
Copy link
Collaborator

@ everybody, do we want to test this as well in pylint? I don't think so right? (Seeing the difficulty of doing so in astroid). If not we can also close the pylint issue I think.

@cdce8p
Copy link
Member

cdce8p commented Feb 27, 2022

@ everybody, do we want to test this as well in pylint? I don't think so right? (Seeing the difficulty of doing so in astroid). If not we can also close the pylint issue I think.

Yeah, let's close the pylint issue. The test here should be enough.

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

Successfully merging this pull request may close these issues.

[2.12.x] false positives: no-name-in-module, import-error
4 participants