Message ID | 20231102153010.3982088-1-numans@ovn.org |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | [ovs-dev] fake-multinode-ci: Use python version '3.11' instead of '3.x'. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | warning | apply and check: warning |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
On 11/2/23 16:30, numans@ovn.org wrote: > From: Numan Siddique <numans@ovn.org> > > With the 'ubuntu-latest' image in github CI, OVS compilation > is failing with the below error: > > --- > python/ovs/tests/test_dns_resolve.py:272:54: E231 missing whitespace after ':' > make[1]: *** [Makefile:6784: flake8-check] Error 1 > --- The robot complained about: "ERROR: Author Numan Siddique <numans@ovn.org> needs to sign off." And that's because of the sets of "---" above. They confuse "git am". With those removed: Acked-by: Dumitru Ceara <dceara@redhat.com> Unrelated, but we setup python 3.9 for the build-dpdk and build osx jobs. Would it make sense to aligned all of them on Python 3.11? Thanks, Dumitru > > Python 3.12 and flake8 version used seems to have some issues. > > Fallback to Python 3.11 as a temporary fix. > Suggested-by: Ilya Maximets <i.maximets@ovn.org> > Signed-off-by: Numan Siddique <numans@ovn.org> > --- > .github/workflows/ovn-fake-multinode-tests.yml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/.github/workflows/ovn-fake-multinode-tests.yml b/.github/workflows/ovn-fake-multinode-tests.yml > index 9a5cd83a65..aa55a1e3f5 100644 > --- a/.github/workflows/ovn-fake-multinode-tests.yml > +++ b/.github/workflows/ovn-fake-multinode-tests.yml > @@ -158,7 +158,7 @@ jobs: > - name: set up python > uses: actions/setup-python@v4 > with: > - python-version: '3.x' > + python-version: '3.11' > > - name: Check out ovn > uses: actions/checkout@v3
On 11/6/23 23:47, Dumitru Ceara wrote: > On 11/2/23 16:30, numans@ovn.org wrote: >> From: Numan Siddique <numans@ovn.org> >> >> With the 'ubuntu-latest' image in github CI, OVS compilation >> is failing with the below error: >> >> --- >> python/ovs/tests/test_dns_resolve.py:272:54: E231 missing whitespace after ':' >> make[1]: *** [Makefile:6784: flake8-check] Error 1 >> --- > > The robot complained about: > > "ERROR: Author Numan Siddique <numans@ovn.org> needs to sign off." > > And that's because of the sets of "---" above. They confuse "git am". > With those removed: > > Acked-by: Dumitru Ceara <dceara@redhat.com> > > Unrelated, but we setup python 3.9 for the build-dpdk and build osx > jobs. Would it make sense to aligned all of them on Python 3.11? It makes sense to pin to a specific version of python to prevent the sort of errors this patch is trying to avoid. I think we should align all of them on the same version. However, whether we use 3.9 or 3.11 is not that important IMO since we don't use any features specific to 3.10 or 3.11. > > Thanks, > Dumitru > >> >> Python 3.12 and flake8 version used seems to have some issues. According to https://stackoverflow.com/questions/77401175/how-to-make-flake8-ignore-syntax-within-strings , if we use flake8 6.1.0 or newer, we shouldn't run into this issue. How is the flake8 version we use determined when running github actions? >> >> Fallback to Python 3.11 as a temporary fix. >> Suggested-by: Ilya Maximets <i.maximets@ovn.org> >> Signed-off-by: Numan Siddique <numans@ovn.org> >> --- >> .github/workflows/ovn-fake-multinode-tests.yml | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/.github/workflows/ovn-fake-multinode-tests.yml b/.github/workflows/ovn-fake-multinode-tests.yml >> index 9a5cd83a65..aa55a1e3f5 100644 >> --- a/.github/workflows/ovn-fake-multinode-tests.yml >> +++ b/.github/workflows/ovn-fake-multinode-tests.yml >> @@ -158,7 +158,7 @@ jobs: >> - name: set up python >> uses: actions/setup-python@v4 >> with: >> - python-version: '3.x' >> + python-version: '3.11' >> >> - name: Check out ovn >> uses: actions/checkout@v3 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
On 11/7/23 22:33, Mark Michelson wrote: > On 11/6/23 23:47, Dumitru Ceara wrote: >> On 11/2/23 16:30, numans@ovn.org wrote: >>> From: Numan Siddique <numans@ovn.org> >>> >>> With the 'ubuntu-latest' image in github CI, OVS compilation >>> is failing with the below error: >>> >>> --- >>> python/ovs/tests/test_dns_resolve.py:272:54: E231 missing whitespace >>> after ':' >>> make[1]: *** [Makefile:6784: flake8-check] Error 1 >>> --- >> >> The robot complained about: >> >> "ERROR: Author Numan Siddique <numans@ovn.org> needs to sign off." >> >> And that's because of the sets of "---" above. They confuse "git am". >> With those removed: >> >> Acked-by: Dumitru Ceara <dceara@redhat.com> >> >> Unrelated, but we setup python 3.9 for the build-dpdk and build osx >> jobs. Would it make sense to aligned all of them on Python 3.11? > > It makes sense to pin to a specific version of python to prevent the > sort of errors this patch is trying to avoid. I think we should align > all of them on the same version. However, whether we use 3.9 or 3.11 is > not that important IMO since we don't use any features specific to 3.10 > or 3.11. > I'm ok with any version, we can align on 3.9, that's fine. >> >> Thanks, >> Dumitru >> >>> >>> Python 3.12 and flake8 version used seems to have some issues. > > According to > https://stackoverflow.com/questions/77401175/how-to-make-flake8-ignore-syntax-within-strings , if we use flake8 6.1.0 or newer, we shouldn't run into this issue. How is the flake8 version we use determined when running github actions? > I tried changing the requirements to install flake8 >= 6.1.0 and I get: ERROR: Cannot install -r utilities/containers/py-requirements.txt (line 2) and flake8>=6.1.0 because these package versions have conflicting dependencies. The conflict is caused by: The user requested flake8>=6.1.0 hacking 6.0.1 depends on flake8~=5.0.1 ... The user requested flake8>=6.1.0 hacking 3.0.0 depends on flake8<4.0.0 and >=3.6.0 So it looks like hacking is forcing us to use an old version of flake8. On the flake8 PyPi page [0] I see: "hacking is a set of flake8 plugins that test and enforce the OpenStack StyleGuide" Which makes me wonder if we really need installing it.. [0] https://pypi.org/project/hacking/ I guess OVS might like to make sure the Python code it exposes follows generally agreed upon coding styles (and the Python IDL is repackaged by OVS). But OVN doesn't expose any Python. So, should we just stop with installing hacking? E.g.: diff --git a/utilities/containers/py-requirements.txt b/utilities/containers/py-requirements.txt index 0d90765c97..8b9357ff1a 100644 --- a/utilities/containers/py-requirements.txt +++ b/utilities/containers/py-requirements.txt @@ -1,5 +1,4 @@ -flake8 -hacking>=3.0 +flake8>=6.1.0 scapy sphinx setuptools >>> >>> Fallback to Python 3.11 as a temporary fix. >>> Suggested-by: Ilya Maximets <i.maximets@ovn.org> >>> Signed-off-by: Numan Siddique <numans@ovn.org> >>> --- >>> .github/workflows/ovn-fake-multinode-tests.yml | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/.github/workflows/ovn-fake-multinode-tests.yml >>> b/.github/workflows/ovn-fake-multinode-tests.yml >>> index 9a5cd83a65..aa55a1e3f5 100644 >>> --- a/.github/workflows/ovn-fake-multinode-tests.yml >>> +++ b/.github/workflows/ovn-fake-multinode-tests.yml >>> @@ -158,7 +158,7 @@ jobs: >>> - name: set up python >>> uses: actions/setup-python@v4 >>> with: >>> - python-version: '3.x' >>> + python-version: '3.11' >>> - name: Check out ovn >>> uses: actions/checkout@v3 >> >> _______________________________________________ >> dev mailing list >> dev@openvswitch.org >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev >> > Regards, Dumitru
On 11/7/23 22:33, Mark Michelson wrote: > On 11/6/23 23:47, Dumitru Ceara wrote: >> On 11/2/23 16:30, numans@ovn.org wrote: >>> From: Numan Siddique <numans@ovn.org> >>> >>> With the 'ubuntu-latest' image in github CI, OVS compilation >>> is failing with the below error: >>> >>> --- >>> python/ovs/tests/test_dns_resolve.py:272:54: E231 missing whitespace after ':' >>> make[1]: *** [Makefile:6784: flake8-check] Error 1 >>> --- >> >> The robot complained about: >> >> "ERROR: Author Numan Siddique <numans@ovn.org> needs to sign off." >> >> And that's because of the sets of "---" above. They confuse "git am". >> With those removed: >> >> Acked-by: Dumitru Ceara <dceara@redhat.com> >> >> Unrelated, but we setup python 3.9 for the build-dpdk and build osx >> jobs. Would it make sense to aligned all of them on Python 3.11? > > It makes sense to pin to a specific version of python to prevent the > sort of errors this patch is trying to avoid. I think we should align > all of them on the same version. However, whether we use 3.9 or 3.11 is > not that important IMO since we don't use any features specific to 3.10 > or 3.11. FWIW, this pinning to python 3.9 came from incompatibility of a version of a meson we used to build DPDK with with newer versions of python. We did move to a newer version of meson last year though, but this python version restriction wasn't re-evaluated. David, do you know if the python version is still a problem? Best regards, Ilya Maximets.
On 11/9/23 22:47, Dumitru Ceara wrote: > On 11/7/23 22:33, Mark Michelson wrote: >> On 11/6/23 23:47, Dumitru Ceara wrote: >>> On 11/2/23 16:30, numans@ovn.org wrote: >>>> From: Numan Siddique <numans@ovn.org> >>>> >>>> With the 'ubuntu-latest' image in github CI, OVS compilation >>>> is failing with the below error: >>>> >>>> --- >>>> python/ovs/tests/test_dns_resolve.py:272:54: E231 missing whitespace >>>> after ':' >>>> make[1]: *** [Makefile:6784: flake8-check] Error 1 >>>> --- >>> >>> The robot complained about: >>> >>> "ERROR: Author Numan Siddique <numans@ovn.org> needs to sign off." >>> >>> And that's because of the sets of "---" above. They confuse "git am". >>> With those removed: >>> >>> Acked-by: Dumitru Ceara <dceara@redhat.com> >>> >>> Unrelated, but we setup python 3.9 for the build-dpdk and build osx >>> jobs. Would it make sense to aligned all of them on Python 3.11? >> >> It makes sense to pin to a specific version of python to prevent the >> sort of errors this patch is trying to avoid. I think we should align >> all of them on the same version. However, whether we use 3.9 or 3.11 is >> not that important IMO since we don't use any features specific to 3.10 >> or 3.11. >> > > I'm ok with any version, we can align on 3.9, that's fine. > >>> >>> Thanks, >>> Dumitru >>> >>>> >>>> Python 3.12 and flake8 version used seems to have some issues. >> >> According to >> https://stackoverflow.com/questions/77401175/how-to-make-flake8-ignore-syntax-within-strings , if we use flake8 6.1.0 or newer, we shouldn't run into this issue. How is the flake8 version we use determined when running github actions? >> > > I tried changing the requirements to install flake8 >= 6.1.0 and I get: > > ERROR: Cannot install -r utilities/containers/py-requirements.txt (line > 2) and flake8>=6.1.0 because these package versions have conflicting > dependencies. > > > The conflict is caused by: > The user requested flake8>=6.1.0 > hacking 6.0.1 depends on flake8~=5.0.1 > ... > The user requested flake8>=6.1.0 > hacking 3.0.0 depends on flake8<4.0.0 and >=3.6.0 > > So it looks like hacking is forcing us to use an old version of flake8. > > On the flake8 PyPi page [0] I see: > "hacking is a set of flake8 plugins that test and enforce the OpenStack > StyleGuide" > > Which makes me wonder if we really need installing it.. > > [0] https://pypi.org/project/hacking/ > > I guess OVS might like to make sure the Python code it exposes follows > generally agreed upon coding styles (and the Python IDL is repackaged by > OVS). But OVN doesn't expose any Python. So, should we just stop with > installing hacking? E.g.: > > diff --git a/utilities/containers/py-requirements.txt > b/utilities/containers/py-requirements.txt > index 0d90765c97..8b9357ff1a 100644 > --- a/utilities/containers/py-requirements.txt > +++ b/utilities/containers/py-requirements.txt > @@ -1,5 +1,4 @@ > -flake8 > -hacking>=3.0 > +flake8>=6.1.0 > scapy > sphinx > setuptools > I actually went ahead and posted this last part as a separate patch. We're hitting this in other places in our CI, e.g., on the 23.06 branch when building RPMs. https://patchwork.ozlabs.org/project/ovn/patch/20231113133337.767803-1-dceara@redhat.com/ Regards, Dumitru
On 11/13/23 14:37, Dumitru Ceara wrote: > On 11/9/23 22:47, Dumitru Ceara wrote: >> On 11/7/23 22:33, Mark Michelson wrote: >>> On 11/6/23 23:47, Dumitru Ceara wrote: >>>> On 11/2/23 16:30, numans@ovn.org wrote: >>>>> From: Numan Siddique <numans@ovn.org> >>>>> >>>>> With the 'ubuntu-latest' image in github CI, OVS compilation >>>>> is failing with the below error: >>>>> >>>>> --- >>>>> python/ovs/tests/test_dns_resolve.py:272:54: E231 missing whitespace >>>>> after ':' >>>>> make[1]: *** [Makefile:6784: flake8-check] Error 1 >>>>> --- >>>> >>>> The robot complained about: >>>> >>>> "ERROR: Author Numan Siddique <numans@ovn.org> needs to sign off." >>>> >>>> And that's because of the sets of "---" above. They confuse "git am". >>>> With those removed: >>>> >>>> Acked-by: Dumitru Ceara <dceara@redhat.com> >>>> >>>> Unrelated, but we setup python 3.9 for the build-dpdk and build osx >>>> jobs. Would it make sense to aligned all of them on Python 3.11? >>> >>> It makes sense to pin to a specific version of python to prevent the >>> sort of errors this patch is trying to avoid. I think we should align >>> all of them on the same version. However, whether we use 3.9 or 3.11 is >>> not that important IMO since we don't use any features specific to 3.10 >>> or 3.11. >>> >> >> I'm ok with any version, we can align on 3.9, that's fine. >> >>>> >>>> Thanks, >>>> Dumitru >>>> >>>>> >>>>> Python 3.12 and flake8 version used seems to have some issues. >>> >>> According to >>> https://stackoverflow.com/questions/77401175/how-to-make-flake8-ignore-syntax-within-strings , if we use flake8 6.1.0 or newer, we shouldn't run into this issue. How is the flake8 version we use determined when running github actions? >>> >> >> I tried changing the requirements to install flake8 >= 6.1.0 and I get: >> >> ERROR: Cannot install -r utilities/containers/py-requirements.txt (line >> 2) and flake8>=6.1.0 because these package versions have conflicting >> dependencies. >> >> >> The conflict is caused by: >> The user requested flake8>=6.1.0 >> hacking 6.0.1 depends on flake8~=5.0.1 >> ... >> The user requested flake8>=6.1.0 >> hacking 3.0.0 depends on flake8<4.0.0 and >=3.6.0 >> >> So it looks like hacking is forcing us to use an old version of flake8. >> >> On the flake8 PyPi page [0] I see: >> "hacking is a set of flake8 plugins that test and enforce the OpenStack >> StyleGuide" >> >> Which makes me wonder if we really need installing it.. >> >> [0] https://pypi.org/project/hacking/ >> >> I guess OVS might like to make sure the Python code it exposes follows >> generally agreed upon coding styles (and the Python IDL is repackaged by >> OVS). But OVN doesn't expose any Python. So, should we just stop with >> installing hacking? E.g.: >> >> diff --git a/utilities/containers/py-requirements.txt >> b/utilities/containers/py-requirements.txt >> index 0d90765c97..8b9357ff1a 100644 >> --- a/utilities/containers/py-requirements.txt >> +++ b/utilities/containers/py-requirements.txt >> @@ -1,5 +1,4 @@ >> -flake8 >> -hacking>=3.0 >> +flake8>=6.1.0 >> scapy >> sphinx >> setuptools >> > > I actually went ahead and posted this last part as a separate patch. > We're hitting this in other places in our CI, e.g., on the 23.06 branch > when building RPMs. > > https://patchwork.ozlabs.org/project/ovn/patch/20231113133337.767803-1-dceara@redhat.com/ > And since we decided to accept the latest version of that patch (https://patchwork.ozlabs.org/project/ovn/patch/20231114113852.886473-1-dceara@redhat.com/) I'm going to mark this one as "Handled Elsewhere" in patchwork. Regards, Dumitru
diff --git a/.github/workflows/ovn-fake-multinode-tests.yml b/.github/workflows/ovn-fake-multinode-tests.yml index 9a5cd83a65..aa55a1e3f5 100644 --- a/.github/workflows/ovn-fake-multinode-tests.yml +++ b/.github/workflows/ovn-fake-multinode-tests.yml @@ -158,7 +158,7 @@ jobs: - name: set up python uses: actions/setup-python@v4 with: - python-version: '3.x' + python-version: '3.11' - name: Check out ovn uses: actions/checkout@v3