Merge ~paride/curtin:pylint-explicit-generated-members into curtin:master

Proposed by Paride Legovini
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: 101acb8c274c2de0e4f0a6758aa38bcc4813dca7
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~paride/curtin:pylint-explicit-generated-members
Merge into: curtin:master
Diff against target: 13 lines (+1/-1)
1 file modified
pylintrc (+1/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Dan Bungert Approve
Review via email: mp+402652@code.launchpad.net

Commit message

pylintrc: explicitly list the DISTROS generated-members

For some obscure reason setting

  generated-members=DISTROS\.

in pylintrc makes the pylint run flaky, causing failures like:

curtin/commands/install_grub.py:93:19:
  E1101: Instance of 'Distros' has no 'debian' member (no-member)
curtin/commands/install_grub.py:155:28:
  E1101: Instance of 'Distros' has no 'redhat' member (no-member)

These failures:

 - happen on about 15% of the time, at least on Bionic
 - also happen with the latest stable version of pylint (2.8.2)
 - only happen on install_grub.py (which only refers to debian and redhat)
 - do not seem to happen on Impish.
 - possibly related: https://github.com/PyCQA/pylint/issues/1628

But the truth is I don't understand why generated-members=DISTROS\.
even works some of the time for some generated members. Let's replace
it with the explicit list of the (non auto-detected) generated members,
so it will always work, and we'll know why it does.

To post a comment you must log in.
Revision history for this message
Paride Legovini (paride) wrote :

See the commit message for rationale and reasoning.

I'd be very happy to amend the last paragraph if anybody can explain why

  generated-members=DISTROS\.

kind of works.

Revision history for this message
Dan Bungert (dbungert) wrote :

I am able to repro the issue as listed (approx 15%) with a loop around "tox -e py3-pylint" with a host machine amd64 hirsute.

The attached change works around that flakiness reliably for me.

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:101acb8c274c2de0e4f0a6758aa38bcc4813dca7

No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want jenkins to rebuild you need to trigger it yourself):
https://code.launchpad.net/~paride/curtin/+git/curtin/+merge/402652/+edit-commit-message

https://jenkins.ubuntu.com/server/job/curtin-ci/123/
Executed test runs:
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-amd64/123/
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-arm64/123/
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-ppc64el/123/
    FAILURE: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-s390x/123/

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/curtin-ci/123//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Paride Legovini (paride) wrote :

It hit a timeout on vmtests.test_basic.FocalTestScsiBasic on s390x :(

https://paste.ubuntu.com/p/kDGGx4qsVv/

Retriggering.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:101acb8c274c2de0e4f0a6758aa38bcc4813dca7

No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want jenkins to rebuild you need to trigger it yourself):
https://code.launchpad.net/~paride/curtin/+git/curtin/+merge/402652/+edit-commit-message

https://jenkins.ubuntu.com/server/job/curtin-ci/124/
Executed test runs:
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-amd64/124/
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-arm64/124/
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-ppc64el/124/
    FAILURE: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-s390x/124/

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/curtin-ci/124//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:101acb8c274c2de0e4f0a6758aa38bcc4813dca7

No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want jenkins to rebuild you need to trigger it yourself):
https://code.launchpad.net/~paride/curtin/+git/curtin/+merge/402652/+edit-commit-message

https://jenkins.ubuntu.com/server/job/curtin-ci/125/
Executed test runs:
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-amd64/125/
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-arm64/125/
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-ppc64el/125/
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-s390x/125/

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/curtin-ci/125//rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/pylintrc b/pylintrc
2index 67a4e01..1b5fa1a 100644
3--- a/pylintrc
4+++ b/pylintrc
5@@ -7,7 +7,7 @@ jobs=0
6 # List of members which are set dynamically and missed by pylint inference
7 # system, and so shouldn't trigger E1101 when accessed. Python regular
8 # expressions are accepted.
9-generated-members=DISTROS\.
10+generated-members=redhat,centos,fedora,debian,suse,opensuse,sles,arch,ubuntu,rhel,freebsd,gentoo
11
12 # List of module names for which member attributes should not be checked
13 # (useful for modules/projects where namespaces are manipulated during runtime

Subscribers

People subscribed via source and target branches