[libnbd PATCH] ci: Enable python code style
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- ci/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/build.sh b/ci/build.sh index 7d62a84a5d4b..4ea3fec7d512 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -8,6 +8,7 @@ main() { autoreconf -if CONFIG_ARGS="\ +--enable-python-code-style \ --enable-gcc-warnings \ --enable-fuse \ --enable-ocaml \ -- 2.32.0
On Tue, Jun 22, 2021 at 03:38:13PM +0200, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- ci/build.sh | 1 + 1 file changed, 1 insertion(+)
ACK. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
On Tue, Jun 22, 2021 at 9:20 PM Martin Kletzander <mkletzan@redhat.com> wrote:
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- ci/build.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/ci/build.sh b/ci/build.sh index 7d62a84a5d4b..4ea3fec7d512 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -8,6 +8,7 @@ main() { autoreconf -if
CONFIG_ARGS="\ +--enable-python-code-style \
I think this is intentionally optional since the version of flake8 or installed plugins can cause build failures. See: https://mail.google.com/mail/u/0/#inbox Python code style should not be part of the build. This is should be used in CI environment or by developers locally, but not when building packages (in case this script is used for building packages). To enable flake8 (and similar tools) the build environment must enforce specific version of the tool. Otherwise you may get unexpected failures when flake8 folks change the rules from version to version. We solve this in ovirt using tox, installing a specific version of flake8: https://github.com/oVirt/vdsm/blob/d7057084fe51dc26811c1ec0ee738ad2314e90fd/... https://github.com/oVirt/ovirt-imageio/blob/master/daemon/tox.ini#L26
--enable-gcc-warnings \ --enable-fuse \ --enable-ocaml \ -- 2.32.0
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
On Tue, Jun 22, 2021 at 10:36:54PM +0300, Nir Soffer wrote:
On Tue, Jun 22, 2021 at 9:20 PM Martin Kletzander <mkletzan@redhat.com> wrote:
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- ci/build.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/ci/build.sh b/ci/build.sh index 7d62a84a5d4b..4ea3fec7d512 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -8,6 +8,7 @@ main() { autoreconf -if
CONFIG_ARGS="\ +--enable-python-code-style \
I think this is intentionally optional since the version of flake8 or installed plugins can cause build failures.
I guess that was a masked link =)
Python code style should not be part of the build. This is should be used in CI environment or by developers locally, but not when building packages (in case this script is used for building packages).
It is not for building a package, it is a script used in CI and possibly being used by developers to check the status of their worktree, locally or in a container.
To enable flake8 (and similar tools) the build environment must enforce specific version of the tool. Otherwise you may get unexpected failures when flake8 folks change the rules from version to version.
We solve this in ovirt using tox, installing a specific version of flake8: https://github.com/oVirt/vdsm/blob/d7057084fe51dc26811c1ec0ee738ad2314e90fd/... https://github.com/oVirt/ovirt-imageio/blob/master/daemon/tox.ini#L26
I see. I was just reacting to the e-mail from Rich where he showed how he checks the package before release. I do not think he pins it to a specific version. You can do that when installing from pip, e.g. in a virtualenv, but not when just checking locally with a distro-provided package (at least not on binary distributions that do not offer older package versions). Anyway, it was just a quick reaction, we can keep it like it is and improve upon it later on. I just distracted myself from other, more important things anyway =)
--enable-gcc-warnings \ --enable-fuse \ --enable-ocaml \ -- 2.32.0
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
On Wed, Jun 23, 2021 at 3:56 PM Martin Kletzander <mkletzan@redhat.com> wrote:
On Tue, Jun 22, 2021 at 10:36:54PM +0300, Nir Soffer wrote:
On Tue, Jun 22, 2021 at 9:20 PM Martin Kletzander <mkletzan@redhat.com> wrote:
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- ci/build.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/ci/build.sh b/ci/build.sh index 7d62a84a5d4b..4ea3fec7d512 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -8,6 +8,7 @@ main() { autoreconf -if
CONFIG_ARGS="\ +--enable-python-code-style \
I think this is intentionally optional since the version of flake8 or installed plugins can cause build failures.
I guess that was a masked link =)
Sorry, I don't know how this happened, the actual link: https://gitlab.com/nbdkit/libnbd/-/issues/4
Python code style should not be part of the build. This is should be used in CI environment or by developers locally, but not when building packages (in case this script is used for building packages).
It is not for building a package, it is a script used in CI and possibly being used by developers to check the status of their worktree, locally or in a container.
To enable flake8 (and similar tools) the build environment must enforce specific version of the tool. Otherwise you may get unexpected failures when flake8 folks change the rules from version to version.
We solve this in ovirt using tox, installing a specific version of flake8: https://github.com/oVirt/vdsm/blob/d7057084fe51dc26811c1ec0ee738ad2314e90fd/... https://github.com/oVirt/ovirt-imageio/blob/master/daemon/tox.ini#L26
I see. I was just reacting to the e-mail from Rich where he showed how he checks the package before release. I do not think he pins it to a specific version. You can do that when installing from pip, e.g. in a virtualenv, but not when just checking locally with a distro-provided package (at least not on binary distributions that do not offer older package versions).
Anyway, it was just a quick reaction, we can keep it like it is and improve upon it later on. I just distracted myself from other, more important things anyway =)
--enable-gcc-warnings \ --enable-fuse \ --enable-ocaml \ -- 2.32.0
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
On Tue, Jun 22, 2021 at 03:38:13PM +0200, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- ci/build.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/ci/build.sh b/ci/build.sh index 7d62a84a5d4b..4ea3fec7d512 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -8,6 +8,7 @@ main() { autoreconf -if
CONFIG_ARGS="\ +--enable-python-code-style \ --enable-gcc-warnings \ --enable-fuse \ --enable-ocaml \
It's OK as long as "someone" is going to chase up and fix the new failures whenever flake8 changes, or we could do something like what Nir suggests and pin a version of flake8. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
On Wed, Jun 23, 2021 at 12:31:14PM +0100, Richard W.M. Jones wrote:
On Tue, Jun 22, 2021 at 03:38:13PM +0200, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- ci/build.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/ci/build.sh b/ci/build.sh index 7d62a84a5d4b..4ea3fec7d512 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -8,6 +8,7 @@ main() { autoreconf -if
CONFIG_ARGS="\ +--enable-python-code-style \ --enable-gcc-warnings \ --enable-fuse \ --enable-ocaml \
It's OK as long as "someone" is going to chase up and fix the new failures whenever flake8 changes, or we could do something like what Nir suggests and pin a version of flake8.
This isn't all that much different from GCC where new releases inevitably trigger new compiler warnings. As long as you have a nightly CI job that is running Fedora rawhide, you'll detect the problems quicky and be able to fix or ignorelist them before it has a negative impact. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
On Wed, Jun 23, 2021 at 12:36:00PM +0100, Daniel P. Berrangé wrote:
On Wed, Jun 23, 2021 at 12:31:14PM +0100, Richard W.M. Jones wrote:
On Tue, Jun 22, 2021 at 03:38:13PM +0200, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- ci/build.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/ci/build.sh b/ci/build.sh index 7d62a84a5d4b..4ea3fec7d512 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -8,6 +8,7 @@ main() { autoreconf -if
CONFIG_ARGS="\ +--enable-python-code-style \ --enable-gcc-warnings \ --enable-fuse \ --enable-ocaml \
It's OK as long as "someone" is going to chase up and fix the new failures whenever flake8 changes, or we could do something like what Nir suggests and pin a version of flake8.
This isn't all that much different from GCC where new releases inevitably trigger new compiler warnings.
As long as you have a nightly CI job that is running Fedora rawhide, you'll detect the problems quicky and be able to fix or ignorelist them before it has a negative impact.
One other option would be to just enable this on Fedora rawhide (or some other particular distro), keeping it enabled for one only.
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (5)
-
Daniel P. Berrangé -
Eric Blake -
Martin Kletzander -
Nir Soffer -
Richard W.M. Jones