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

Make pylint work again #5269

Closed

Conversation

VladimirSlavik
Copy link
Contributor

@VladimirSlavik VladimirSlavik commented Oct 19, 2023

Resolves:

  • Running pylint standalone in container is possible
  • New detections are all resolved
  • Pylint runs among other ci tests, same as before

TODO:

  • E0602(undefined-variable):ui/webui/test/check-basic:227,16: TestBasic.testJsErrorHandling: Undefined variable 'time'
  • E1101(no-member):ui/webui/test/helpers/storage.py:414,8: StorageMountPointMapping.select_mountpoint: Instance of 'StorageMountPointMapping' has no 'set_partitioning' member
  • Squash commits in make, it's easier to understand as one change

I'm rather stumped by the last two finds listed above, there's no clear reason how these actually work.

After this is done, we can make another PR where we either make pylint into another gh test alongside unit tests, or put it back with them as it was. I left out this part intentionally, so that we can have the fixes without the other decisions.

@vojtechtrefny
Copy link
Contributor

* [ ]  `E1101(no-member):ui/webui/test/helpers/storage.py:414,8: StorageMountPointMapping.select_mountpoint: Instance of 'StorageMountPointMapping' has no 'set_partitioning' member `

I'm rather stumped by the last two finds listed above, there's no clear reason how these actually work.

StorageMountPointMapping doesn't have the set_partitioning function, but it never actually tries to call it, because StorageMountPointMapping isn't used directly, it is used only as a super class of Storage which also inherits from StorageScenario which is where set_partitioning lives so in the end Storage has access to both StorageMountPointMapping.select_mountpoint and StorageScenario.set_partitioning. Multiple inheritence is fun :-)
I'd recommend moving the select_mountpoint to a different class (probably StorageScenario) -- the function selects the mountpoint assignment scenario on the first storage screen so it doesn't really belong to StorageMountPointMapping anyway.

@pep8speaks
Copy link

pep8speaks commented Oct 23, 2023

Hello @VladimirSlavik! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 72:100: E501 line too long (100 > 99 characters)
Line 153:100: E501 line too long (108 > 99 characters)

Comment last updated at 2024-02-22 08:32:46 UTC

@VladimirSlavik VladimirSlavik marked this pull request as ready for review October 23, 2023 10:57
@VladimirSlavik
Copy link
Contributor Author

/kickstart-test --testtype smoke

@VladimirSlavik
Copy link
Contributor Author

VladimirSlavik commented Oct 23, 2023

Looks like astroid dies on parsing subscription now. Can't reproduce locally. Lovely.

Copy link
Member

@jkonecny12 jkonecny12 left a comment

Choose a reason for hiding this comment

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

Looks great to me. Thanks!

@jkonecny12
Copy link
Member

jkonecny12 commented Oct 24, 2023

Looks like astroid dies on parsing subscription now. Can't reproduce locally. Lovely.

I wonder if you don't have different version of a container image locally?

@VladimirSlavik
Copy link
Contributor Author

VladimirSlavik commented Oct 24, 2023

That's a tricky question, as rebuilds are also stuck due to new dnf breaking tests...

Generally speaking, this can wait a bit.

@VladimirSlavik VladimirSlavik force-pushed the master-pylint-separate branch 3 times, most recently from d2a75e5 to a7cac8d Compare November 7, 2023 13:38
@VladimirSlavik
Copy link
Contributor Author

Still fails here and succeeds locally. I'll try filing the astroid bug implied by the results.

@VladimirSlavik
Copy link
Contributor Author

Rebased. The failure persists. It seems I can reproduce that locally, sporadically: When I rebuild the CI container, the first test run in that container fails, sometimes. Re-running the tests will make them succeed. Rebuilding the container does not seem to negate the success on its own. So it's unpredictable anyway.

Invoking the standalone containerized pylint make target now also:
- propagates error code
- provides logs
@KKoukiou
Copy link
Contributor

Closing in favor of #5486 which has cherry-picked these commits. But at least we can stop spanning Vladimir's account.

@KKoukiou KKoukiou closed this Feb 22, 2024
@VladimirSlavik VladimirSlavik deleted the master-pylint-separate branch March 11, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

6 participants