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

[rapidjson] Fix the indentation in project.yaml. #3290

Merged
merged 1 commit into from
Jan 23, 2020
Merged

Conversation

Dor1s
Copy link
Contributor

@Dor1s Dor1s commented Jan 23, 2020

Detected this while working on #3280.

@TravisBuddy
Copy link

Travis tests have failed

Hey @Dor1s,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

4th Build

View build log

./infra/travis/travis_build.py
Building project rapidjson
Running command: python /home/travis/build/google/oss-fuzz/infra/helper.py build_fuzzers rapidjson --engine libfuzzer --sanitizer address --architecture i386
Running: docker build -t gcr.io/oss-fuzz/rapidjson projects/rapidjson

Step 1/8 : FROM gcr.io/oss-fuzz-base/base-builder
latest: Pulling from oss-fuzz-base/base-builder





















Digest: sha256:50e0936a6eb3c7485bdc64a5397cdc9d6b57f5b5edf33ea13e990d1a71731d1b
Status: Downloaded newer image for gcr.io/oss-fuzz-base/base-builder:latest
 ---> 37e8c597c88d
Step 2/8 : MAINTAINER guidovranken@gmail.com
 ---> Running in 71ccd18ff151
Removing intermediate container 71ccd18ff151
 ---> 9332ab716d6f
Step 3/8 : RUN apt-get update && apt-get install -y make autoconf automake libtool cmake
 ---> Running in 46f51d973282
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [1036 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1408 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1008 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [606 kB]
Fetched 4383 kB in 1s (3356 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
make is already the newest version (4.1-6).
The following additional packages will be installed:
  autotools-dev cmake-data libarchive13 libcurl3 libicu55 libjsoncpp1
  libltdl-dev libltdl7 liblzo2-2 libsigsegv2 libxml2 m4 sgml-base xml-core
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc gettext codeblocks eclipse
  ninja-build lrzip libtool-doc gfortran | fortran95-compiler gcj-jdk
  sgml-base-doc debhelper
The following NEW packages will be installed:
  autoconf automake autotools-dev cmake cmake-data libarchive13 libcurl3
  libicu55 libjsoncpp1 libltdl-dev libltdl7 liblzo2-2 libsigsegv2 libtool
  libxml2 m4 sgml-base xml-core
0 upgraded, 18 newly installed, 0 to remove and 4 not upgraded.
Need to get 14.2 MB of archives.
After this operation, 61.2 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 sgml-base all 1.26+nmu4ubuntu1 [12.5 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 cmake-data all 3.5.1-1ubuntu3 [1121 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 liblzo2-2 amd64 2.08-1.2 [48.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libicu55 amd64 55.1-7ubuntu0.4 [7646 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libxml2 amd64 2.9.3+dfsg1-1ubuntu0.6 [697 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libarchive13 amd64 3.1.2-11ubuntu0.16.04.7 [262 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcurl3 amd64 7.47.0-1ubuntu2.14 [186 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/main amd64 libjsoncpp1 amd64 1.7.2-1 [73.0 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 cmake amd64 3.5.1-1ubuntu3 [2623 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 libsigsegv2 amd64 2.10-4 [14.1 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial/main amd64 xml-core all 0.13+nmu2 [23.3 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/main amd64 autoconf all 2.69-9 [321 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/main amd64 autotools-dev all 20150820.1 [39.8 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 automake all 1:1.15-4ubuntu1 [510 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial/main amd64 libltdl7 amd64 2.4.6-0.1 [38.3 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 libltdl-dev amd64 2.4.6-0.1 [162 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial/main amd64 libtool all 2.4.6-0.1 [193 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 14.2 MB in 1s (11.5 MB/s)
Selecting previously unselected package sgml-base.
(Reading database ... 14801 files and directories currently installed.)
Preparing to unpack .../sgml-base_1.26+nmu4ubuntu1_all.deb ...
Unpacking sgml-base (1.26+nmu4ubuntu1) ...
Selecting previously unselected package cmake-data.
Preparing to unpack .../cmake-data_3.5.1-1ubuntu3_all.deb ...
Unpacking cmake-data (3.5.1-1ubuntu3) ...
Selecting previously unselected package liblzo2-2:amd64.
Preparing to unpack .../liblzo2-2_2.08-1.2_amd64.deb ...
Unpacking liblzo2-2:amd64 (2.08-1.2) ...
Selecting previously unselected package libicu55:amd64.
Preparing to unpack .../libicu55_55.1-7ubuntu0.4_amd64.deb ...
Unpacking libicu55:amd64 (55.1-7ubuntu0.4) ...
Selecting previously unselected package libxml2:amd64.
Preparing to unpack .../libxml2_2.9.3+dfsg1-1ubuntu0.6_amd64.deb ...
Unpacking libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.6) ...
Selecting previously unselected package libarchive13:amd64.
Preparing to unpack .../libarchive13_3.1.2-11ubuntu0.16.04.7_amd64.deb ...
Unpacking libarchive13:amd64 (3.1.2-11ubuntu0.16.04.7) ...
Selecting previously unselected package libcurl3:amd64.
Preparing to unpack .../libcurl3_7.47.0-1ubuntu2.14_amd64.deb ...
Unpacking libcurl3:amd64 (7.47.0-1ubuntu2.14) ...
Selecting previously unselected package libjsoncpp1:amd64.
Preparing to unpack .../libjsoncpp1_1.7.2-1_amd64.deb ...
Unpacking libjsoncpp1:amd64 (1.7.2-1) ...
Selecting previously unselected package cmake.
Preparing to unpack .../cmake_3.5.1-1ubuntu3_amd64.deb ...
Unpacking cmake (3.5.1-1ubuntu3) ...
Selecting previously unselected package libsigsegv2:amd64.
Preparing to unpack .../libsigsegv2_2.10-4_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.10-4) ...
Selecting previously unselected package xml-core.
Preparing to unpack .../xml-core_0.13+nmu2_all.deb ...
Unpacking xml-core (0.13+nmu2) ...
Selecting previously unselected package m4.
Preparing to unpack .../archives/m4_1.4.17-5_amd64.deb ...
Unpacking m4 (1.4.17-5) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../autoconf_2.69-9_all.deb ...
Unpacking autoconf (2.69-9) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../autotools-dev_20150820.1_all.deb ...
Unpacking autotools-dev (20150820.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../automake_1%3a1.15-4ubuntu1_all.deb ...
Unpacking automake (1:1.15-4ubuntu1) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../libltdl7_2.4.6-0.1_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-0.1) ...
Selecting previously unselected package libltdl-dev:amd64.
Preparing to unpack .../libltdl-dev_2.4.6-0.1_amd64.deb ...
Unpacking libltdl-dev:amd64 (2.4.6-0.1) ...
Selecting previously unselected package libtool.
Preparing to unpack .../libtool_2.4.6-0.1_all.deb ...
Unpacking libtool (2.4.6-0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up sgml-base (1.26+nmu4ubuntu1) ...
Setting up cmake-data (3.5.1-1ubuntu3) ...
Setting up liblzo2-2:amd64 (2.08-1.2) ...
Setting up libicu55:amd64 (55.1-7ubuntu0.4) ...
Setting up libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.6) ...
Setting up libarchive13:amd64 (3.1.2-11ubuntu0.16.04.7) ...
Setting up libcurl3:amd64 (7.47.0-1ubuntu2.14) ...
Setting up libjsoncpp1:amd64 (1.7.2-1) ...
Setting up cmake (3.5.1-1ubuntu3) ...
Setting up libsigsegv2:amd64 (2.10-4) ...
Setting up xml-core (0.13+nmu2) ...
Setting up m4 (1.4.17-5) ...
Setting up autoconf (2.69-9) ...
Setting up autotools-dev (20150820.1) ...
Setting up automake (1:1.15-4ubuntu1) ...
update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode
Setting up libltdl7:amd64 (2.4.6-0.1) ...
Setting up libltdl-dev:amd64 (2.4.6-0.1) ...
Setting up libtool (2.4.6-0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Removing intermediate container 46f51d973282
 ---> 4bc4ed8a9e71
Step 4/8 : RUN git clone --depth 1 https://github.com/Tencent/rapidjson.git rapidjson
 ---> Running in 4903b5bafc4d
Cloning into 'rapidjson'...
Removing intermediate container 4903b5bafc4d
 ---> 5255789979bf
Step 5/8 : RUN git clone --depth 1 https://github.com/guidovranken/rapidjson-fuzzers.git rapidjson-fuzzers
 ---> Running in bdb632a3b40e
Cloning into 'rapidjson-fuzzers'...
Removing intermediate container bdb632a3b40e
 ---> dbd34f2dbff6
Step 6/8 : RUN git clone --depth 1 https://github.com/guidovranken/fuzzing-headers.git
 ---> Running in 3162d97c075c
Cloning into 'fuzzing-headers'...
Removing intermediate container 3162d97c075c
 ---> 349cc34d1813
Step 7/8 : WORKDIR rapidjson-fuzzers
 ---> Running in b3336a610d54
Removing intermediate container b3336a610d54
 ---> f88e945dd076
Step 8/8 : COPY build.sh $SRC/
 ---> 2e00c2231780
Successfully built 2e00c2231780
Successfully tagged gcr.io/oss-fuzz/rapidjson:latest
Keeping existing build artifacts as-is (if any).
Running: docker run --rm --privileged -i --cap-add SYS_PTRACE -e FUZZING_ENGINE=libfuzzer -e SANITIZER=address -e ARCHITECTURE=i386 -v /home/travis/build/google/oss-fuzz/build/out/rapidjson:/out -v /home/travis/build/google/oss-fuzz/build/work/rapidjson:/work -t gcr.io/oss-fuzz/rapidjson
---------------------------------------------------------------
Compiling libFuzzer to /usr/lib/libFuzzingEngine.a... ar: creating /usr/lib/libFuzzingEngine.a
 done.
CC=clang
CXX=clang++
CFLAGS=-m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link
CXXFLAGS=-m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++
---------------------------------------------------------------
+ [[ -m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link = *sanitize=memory* ]]
+ [[ -m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link = *sanitize=address* ]]
+ export 'CXXFLAGS=-m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -DASAN'
+ CXXFLAGS='-m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -DASAN'
+ clang++ -m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -DASAN -D_GLIBCXX_DEBUG -I /src/rapidjson/include fuzzer.cpp -fsanitize=fuzzer -o /out/fuzzer
+ cp fuzzer_seed_corpus.zip /out
+ cd /src/fuzzing-headers/tests
+ clang++ -m32 -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -DASAN -std=c++2a -D_GLIBCXX_DEBUG -I /src/rapidjson/include -I ../include rapidjson.cpp -fsanitize=fuzzer -o /out/fuzzer-extended
In file included from rapidjson.cpp:2:
/src/rapidjson/include/rapidjson/document.h:843:58: error: use of overloaded operator '!=' is ambiguous (with operand types 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::MemberIterator' (aka 'rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >') and 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::MemberIterator')
                for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m)
                                                       ~ ^  ~~~~~~~~~~~
rapidjson.cpp:19:30: note: in instantiation of member function 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::~GenericValue' requested here
            rapidjson::Value value;
                             ^
/src/rapidjson/include/rapidjson/document.h:209:10: note: candidate function
    bool operator!=(ConstIterator that) const { return ptr_ != that.ptr_; }
         ^
/src/rapidjson/include/rapidjson/document.h:208:10: note: candidate function
    bool operator==(ConstIterator that) const { return ptr_ == that.ptr_; }
         ^
/src/rapidjson/include/rapidjson/document.h:208:10: note: candidate function (with reversed parameter order)
/src/rapidjson/include/rapidjson/document.h:1288:24: error: use of overloaded operator '!=' is ambiguous (with operand types 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::MemberIterator' (aka 'rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >') and 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::MemberIterator')
        for ( ; member != MemberEnd(); ++member)
                ~~~~~~ ^  ~~~~~~~~~~~
/src/rapidjson/include/rapidjson/document.h:1293:173: note: in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' requested here
    template <typename SourceAllocator> ConstMemberIterator FindMember(const GenericValue<Encoding, SourceAllocator>& name) const { return const_cast<GenericValue&>(*this).FindMember(name); }
                                                                                                                                                                            ^
/src/rapidjson/include/rapidjson/document.h:975:74: note: in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' requested here
                typename RhsType::ConstMemberIterator rhsMemberItr = rhs.FindMember(lhsMemberItr->name);
                                                                         ^
rapidjson.cpp:33:27: note: in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::operator==<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' requested here
            return input1 == input2;
                          ^
/src/rapidjson/include/rapidjson/document.h:209:10: note: candidate function
    bool operator!=(ConstIterator that) const { return ptr_ != that.ptr_; }
         ^
/src/rapidjson/include/rapidjson/document.h:208:10: note: candidate function
    bool operator==(ConstIterator that) const { return ptr_ == that.ptr_; }
         ^
/src/rapidjson/include/rapidjson/document.h:208:10: note: candidate function (with reversed parameter order)
/src/rapidjson/include/rapidjson/document.h:1265:16: error: no viable conversion from returned value of type 'GenericMemberIterator<true, [2 * ...]>' to function return type 'GenericMemberIterator<false, [2 * ...]>'
        return FindMember(n);
               ^~~~~~~~~~~~~
rapidjson.cpp:92:58: note: in instantiation of member function 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::FindMember' requested here
            rapidjson::Value::MemberIterator itr = input.FindMember(name.c_str());
                                                         ^
/src/rapidjson/include/rapidjson/document.h:186:5: note: candidate constructor not viable: no known conversion from 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::ConstMemberIterator' (aka 'rapidjson::GenericMemberIterator<true, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >') to 'const rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::NonConstIterator &' (aka 'const GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > &') for 1st argument
    GenericMemberIterator(const NonConstIterator & it) : ptr_(it.ptr_) {}
    ^
/src/rapidjson/include/rapidjson/document.h:1165:24: error: no viable conversion from 'GenericMemberIterator<true, [2 * ...]>' to 'GenericMemberIterator<false, [2 * ...]>'
        MemberIterator member = FindMember(name);
                       ^        ~~~~~~~~~~~~~~~~
/src/rapidjson/include/rapidjson/document.h:1149:16: note: in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::operator[]<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' requested here
        return (*this)[n];
               ^
rapidjson.cpp:108:17: note: in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::operator[]<const char>' requested here
            dest[key.c_str()] = {};
                ^
/src/rapidjson/include/rapidjson/document.h:186:5: note: candidate constructor not viable: no known conversion from 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::ConstMemberIterator' (aka 'rapidjson::GenericMemberIterator<true, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >') to 'const rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::NonConstIterator &' (aka 'const GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > &') for 1st argument
    GenericMemberIterator(const NonConstIterator & it) : ptr_(it.ptr_) {}
    ^
4 errors generated.
Building fuzzers failed.
Failed projects: rapidjson
TravisBuddy Request Identifier: cadbf9f0-3df4-11ea-8d60-2f6c30a51d00

@Dor1s
Copy link
Contributor Author

Dor1s commented Jan 23, 2020

presubmit has passed, so I'm landing this, although the build itself appears to be broken //cc @guidovranken

@Dor1s Dor1s merged commit 25cb462 into master Jan 23, 2020
@guidovranken
Copy link
Contributor

I will look at it.

@jonathanmetzman jonathanmetzman deleted the rapidjson_yaml branch November 19, 2020 19:04
DaveLak added a commit to DaveLak/oss-fuzz that referenced this pull request Jun 4, 2024
The changes introduced here upgrade Python from 3.8 to 3.10.14 inside
the base-builder and base-runner images.

 ### base-builder changes:

Prior to these changes, base-builder compiled Python 3.8 from source
using sources downloaded from the official release servers at
https://www.python.org/ftp/python/. This updates the compiled version
to 3.10.14 (the latest 3.10 release) instead.

 ### base-runner changes:

Prior to these changes, base-runner installed Python 3.8 from the
default apt repository provided by the Ubuntu 20.04 image it's based
on. These apt repositories do not have a version of Python 3.10
available by default. This updates the base-runner to instead use a
multi-stage build to copy the same Python interpreter compiled by the
base-builder image into the runner image, which ensures both Python
versions remain in-sync while saving build time by re-using a pre-built
version.

 ## Motivation

- Code coverage does not work on Python projects that use Python 3.10+
  syntax, and will not work until this or similar changes are landed
  (see google#11419)
- Upgrading the base-image to use Ubuntu 22.04 (which provides more
  recent Python versions via apt) has been stated as being unlikely to
  happen any time soon (see google#3290)
- Many OSS-Fuzz integrated Python projects no longer support Python 3.8
  and have resorted to implementing ad-hoc workarounds to upgrade to
  newer Python versions, including installing Python from the Dead
  Snakes PPA.
  - This leads to fragmentation and hard to debug issues. Maintenance
    is easier when everyone is using the same version without issue.
- With [Python 3.8 reaching end of life soon (in 2024-10)][python-
  versions-EOL], it is likely that more Python projects will begin
  dropping support for 3.8, further increasing the number of broken
  builds and ad-hoc workarounds.
- Previous attempts at upgrading Python have stalled.

 ## Known & Expected Issues

Several project Dockerfiles and build scripts contain hard coded
references to python3.8 file system paths, and many more have implanted
ad-hoc workarounds to upgrade to newer Python versions than 3.8
(typically 3.9.) Additional changes are required to each of these
projects to ensure they successfully build after this upgrade to Python
3.10.

 ### Fuzz Introspector Caveat

Fuzz Introspector currently uses Python 3.9. While an upgrade to 3.10 is
not expected to introduce any new issues, it was not tested on these
changes and may require additional work.

 ## Possible Areas of Improvement

Using the base-builder image in a multi-stage build to copy the pre-
compiled Python into base-runner is effective, but feels like a
workaround that may be introducing tech debt. A cleaner approach would
be to extract the Python compilation into a discrete base image similar
to how `base-clang` works, and use that as the multi-stage builder in
images that need it.

---

Fixes:
- google#11419

Supersedes:
- google#9532
- google#11420

[python-versions-EOL]: https://devguide.python.org/versions/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants