diff mbox series

[ovs-dev] ci: Use user for pip upgrade on Ubuntu.

Message ID 20240624090050.187847-1-amusil@redhat.com
State Changes Requested
Delegated to: Dumitru Ceara
Headers show
Series [ovs-dev] ci: Use user for pip upgrade on Ubuntu. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Ales Musil June 24, 2024, 9 a.m. UTC
The pip upgrade in Ubuntu started to fail because of missing
RECORD file. Use the --user argument which avoids this error and
allows pip to upgrade itself.

ERROR: Cannot uninstall pip 24.0, RECORD file not found.
Hint: The package was installed by debian.

Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Ales Musil <amusil@redhat.com>
---
 utilities/containers/ubuntu/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dumitru Ceara June 24, 2024, 9:24 a.m. UTC | #1
On 6/24/24 11:00, Ales Musil wrote:
> The pip upgrade in Ubuntu started to fail because of missing
> RECORD file. Use the --user argument which avoids this error and
> allows pip to upgrade itself.
> 
> ERROR: Cannot uninstall pip 24.0, RECORD file not found.
> Hint: The package was installed by debian.
> 
> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
> Signed-off-by: Ales Musil <amusil@redhat.com>
> ---

Thanks, Ales, for fixing the CI!

>  utilities/containers/ubuntu/Dockerfile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utilities/containers/ubuntu/Dockerfile b/utilities/containers/ubuntu/Dockerfile
> index ce7ce16c6..0e71b1a02 100755
> --- a/utilities/containers/ubuntu/Dockerfile
> +++ b/utilities/containers/ubuntu/Dockerfile
> @@ -80,7 +80,7 @@ COPY $CONTAINERS_PATH/py-requirements.txt /tmp/py-requirements.txt
>  ENV PIP_BREAK_SYSTEM_PACKAGES 1
>  
>  # Update and install pip dependencies
> -RUN python3 -m pip install --upgrade pip \
> +RUN python3 -m pip install --upgrade --user pip \
>      && \
>      python3 -m pip install wheel \
>      && \

I think for consistency we should do the same thing for the Fedora
dockerfile.  However, you're changing all that in:

https://patchwork.ozlabs.org/project/ovn/list/?series=411795&state=*

I think it's probably better to do all that at once (to avoid having to
rebase different series) and submit a v2 of the series that moves the
DPDK build into the container.  That series could have as first patch
the --user change for both dockerfiles.

What do you think?

Regards,
Dumitru
Ilya Maximets June 24, 2024, 9:52 a.m. UTC | #2
On 6/24/24 11:24, Dumitru Ceara wrote:
> On 6/24/24 11:00, Ales Musil wrote:
>> The pip upgrade in Ubuntu started to fail because of missing
>> RECORD file. Use the --user argument which avoids this error and
>> allows pip to upgrade itself.
>>
>> ERROR: Cannot uninstall pip 24.0, RECORD file not found.
>> Hint: The package was installed by debian.
>>
>> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
>> Signed-off-by: Ales Musil <amusil@redhat.com>
>> ---
> 
> Thanks, Ales, for fixing the CI!
> 
>>  utilities/containers/ubuntu/Dockerfile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/utilities/containers/ubuntu/Dockerfile b/utilities/containers/ubuntu/Dockerfile
>> index ce7ce16c6..0e71b1a02 100755
>> --- a/utilities/containers/ubuntu/Dockerfile
>> +++ b/utilities/containers/ubuntu/Dockerfile
>> @@ -80,7 +80,7 @@ COPY $CONTAINERS_PATH/py-requirements.txt /tmp/py-requirements.txt
>>  ENV PIP_BREAK_SYSTEM_PACKAGES 1
>>  
>>  # Update and install pip dependencies
>> -RUN python3 -m pip install --upgrade pip \
>> +RUN python3 -m pip install --upgrade --user pip \
>>      && \
>>      python3 -m pip install wheel \
>>      && \
> 
> I think for consistency we should do the same thing for the Fedora
> dockerfile.  However, you're changing all that in:
> 
> https://patchwork.ozlabs.org/project/ovn/list/?series=411795&state=*
> 
> I think it's probably better to do all that at once (to avoid having to
> rebase different series) and submit a v2 of the series that moves the
> DPDK build into the container.  That series could have as first patch
> the --user change for both dockerfiles.
> 
> What do you think?

This also should be done for all 'pip install' calls, not only the
upgrade of a pip itself.

Best regards, Ilya Maximets.
Ales Musil June 24, 2024, 10:11 a.m. UTC | #3
On Mon, Jun 24, 2024 at 11:52 AM Ilya Maximets <i.maximets@ovn.org> wrote:

> On 6/24/24 11:24, Dumitru Ceara wrote:
> > On 6/24/24 11:00, Ales Musil wrote:
> >> The pip upgrade in Ubuntu started to fail because of missing
> >> RECORD file. Use the --user argument which avoids this error and
> >> allows pip to upgrade itself.
> >>
> >> ERROR: Cannot uninstall pip 24.0, RECORD file not found.
> >> Hint: The package was installed by debian.
> >>
> >> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
> >> Signed-off-by: Ales Musil <amusil@redhat.com>
> >> ---
> >
> > Thanks, Ales, for fixing the CI!
> >
> >>  utilities/containers/ubuntu/Dockerfile | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/utilities/containers/ubuntu/Dockerfile
> b/utilities/containers/ubuntu/Dockerfile
> >> index ce7ce16c6..0e71b1a02 100755
> >> --- a/utilities/containers/ubuntu/Dockerfile
> >> +++ b/utilities/containers/ubuntu/Dockerfile
> >> @@ -80,7 +80,7 @@ COPY $CONTAINERS_PATH/py-requirements.txt
> /tmp/py-requirements.txt
> >>  ENV PIP_BREAK_SYSTEM_PACKAGES 1
> >>
> >>  # Update and install pip dependencies
> >> -RUN python3 -m pip install --upgrade pip \
> >> +RUN python3 -m pip install --upgrade --user pip \
> >>      && \
> >>      python3 -m pip install wheel \
> >>      && \
> >
> > I think for consistency we should do the same thing for the Fedora
> > dockerfile.  However, you're changing all that in:
> >
> > https://patchwork.ozlabs.org/project/ovn/list/?series=411795&state=*
> >
> > I think it's probably better to do all that at once (to avoid having to
> > rebase different series) and submit a v2 of the series that moves the
> > DPDK build into the container.  That series could have as first patch
> > the --user change for both dockerfiles.
> >
> > What do you think?
>
> This also should be done for all 'pip install' calls, not only the
> upgrade of a pip itself.
>
> Best regards, Ilya Maximets.
>
>
Sure sounds good, I'll prepare v2 of the DPDK series with this fix included.

Thanks,
Ales
diff mbox series

Patch

diff --git a/utilities/containers/ubuntu/Dockerfile b/utilities/containers/ubuntu/Dockerfile
index ce7ce16c6..0e71b1a02 100755
--- a/utilities/containers/ubuntu/Dockerfile
+++ b/utilities/containers/ubuntu/Dockerfile
@@ -80,7 +80,7 @@  COPY $CONTAINERS_PATH/py-requirements.txt /tmp/py-requirements.txt
 ENV PIP_BREAK_SYSTEM_PACKAGES 1
 
 # Update and install pip dependencies
-RUN python3 -m pip install --upgrade pip \
+RUN python3 -m pip install --upgrade --user pip \
     && \
     python3 -m pip install wheel \
     && \