Message ID | 20200309144007.261265-1-i.maximets@ovn.org |
---|---|
State | Changes Requested |
Headers | show |
Series | [ovs-dev] travis: Fix using DPDK build from master branch cache. | expand |
On Mon, Mar 9, 2020 at 3:40 PM Ilya Maximets <i.maximets@ovn.org> wrote: > > If no cache available for current branch, Travis CI uses cache from > the default (master) branch. This causes build failures on older > OVS branches if cache was cleared because DPDK builds from master > branch are not compatible. > > For example, we removed pdump support on master, but branch 2.13 > explicitly requests pdump being enabled and fails while using > cached DPDK from the master branch. > > Adding the branch name to the version file to avoid using incompatible > DPDK builds. > > Signed-off-by: Ilya Maximets <i.maximets@ovn.org> > --- > .travis/linux-build.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh > index 359f7773b..dbaabaa60 100755 > --- a/.travis/linux-build.sh > +++ b/.travis/linux-build.sh > @@ -98,7 +98,7 @@ function install_dpdk() > else > if [ -f "${VERSION_FILE}" ]; then > VER=$(cat ${VERSION_FILE}) > - if [ "${VER}" = "${DPDK_VER}" ]; then > + if [ "${VER}" = "${DPDK_VER}-${TRAVIS_BRANCH}" ]; then > EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-dir/build" > echo "Found cached DPDK ${VER} build in $(pwd)/dpdk-dir" > return > @@ -128,7 +128,7 @@ function install_dpdk() > EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=$(pwd)/build" > echo "Installed DPDK source in $(pwd)" > popd > - echo "${DPDK_VER}" > ${VERSION_FILE} > + echo "${DPDK_VER}-${TRAVIS_BRANCH}" > ${VERSION_FILE} > } > > function configure_ovs() Having a bit of trouble to parse the commit title. How about: travis: Fix DPDK cache for non master branches. Anyway, the fix lgtm. Acked-by: David Marchand <david.marchand@redhat.com> -- David Marchand
Ilya Maximets <i.maximets@ovn.org> writes: > If no cache available for current branch, Travis CI uses cache from > the default (master) branch. This causes build failures on older > OVS branches if cache was cleared because DPDK builds from master > branch are not compatible. > > For example, we removed pdump support on master, but branch 2.13 > explicitly requests pdump being enabled and fails while using > cached DPDK from the master branch. > > Adding the branch name to the version file to avoid using incompatible > DPDK builds. > > Signed-off-by: Ilya Maximets <i.maximets@ovn.org> > --- Does it make sense to remove the .config file before stamping the version instead? I guess either way will accomplish what you're after. I don't see much difference between them, and I guess it is just a different color for the bike shed, so: Acked-by: Aaron Conole <aconole@redhat.com> On this note, I've set the bot to also rebuild it's master branch every Sunday (which should help with each series build time).
On 3/11/20 4:13 PM, Aaron Conole wrote: > Ilya Maximets <i.maximets@ovn.org> writes: > >> If no cache available for current branch, Travis CI uses cache from >> the default (master) branch. This causes build failures on older >> OVS branches if cache was cleared because DPDK builds from master >> branch are not compatible. >> >> For example, we removed pdump support on master, but branch 2.13 >> explicitly requests pdump being enabled and fails while using >> cached DPDK from the master branch. >> >> Adding the branch name to the version file to avoid using incompatible >> DPDK builds. >> >> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> >> --- > > Does it make sense to remove the .config file before stamping the > version instead? I guess either way will accomplish what you're after. How this supposed to help? We're no building DPDK at all if version file matches. Am I missing something? It might make sense to prepare dpdk config file and check if it's equal to the config file in the cache. But this sounds too complex. > I don't see much difference between them, and I guess it is just a > different color for the bike shed, so: > > Acked-by: Aaron Conole <aconole@redhat.com> > > On this note, I've set the bot to also rebuild it's master branch > every Sunday (which should help with each series build time). But with this patch applied series_* branches will not be able to use cache from the master.
Ilya Maximets <i.maximets@ovn.org> writes: > On 3/11/20 4:13 PM, Aaron Conole wrote: >> Ilya Maximets <i.maximets@ovn.org> writes: >> >>> If no cache available for current branch, Travis CI uses cache from >>> the default (master) branch. This causes build failures on older >>> OVS branches if cache was cleared because DPDK builds from master >>> branch are not compatible. >>> >>> For example, we removed pdump support on master, but branch 2.13 >>> explicitly requests pdump being enabled and fails while using >>> cached DPDK from the master branch. >>> >>> Adding the branch name to the version file to avoid using incompatible >>> DPDK builds. >>> >>> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> >>> --- >> >> Does it make sense to remove the .config file before stamping the >> version instead? I guess either way will accomplish what you're after. > > How this supposed to help? We're no building DPDK at all if version > file matches. Am I missing something? Oops. I misread the install_dpdk() function. > It might make sense to prepare dpdk config file and check if it's > equal to the config file in the cache. But this sounds too complex. See below. >> I don't see much difference between them, and I guess it is just a >> different color for the bike shed, so: >> >> Acked-by: Aaron Conole <aconole@redhat.com> >> >> On this note, I've set the bot to also rebuild it's master branch >> every Sunday (which should help with each series build time). > > But with this patch applied series_* branches will not be able to use > cache from the master. Hrrm... I'd prefer a solution that doesn't have this side effect. Maybe it's possible to do this in an alternative fashion (like comparing .config files mentioned above in addition to the existing version number check)? That way we can preserve the per-branch settings, and also let the bot take advantage of the weekly master-branch build for dpdk builds. It should still be pulling the cache for the non-dpdk builds, so it's still useful for that (the ENV settings will match).
On 3/11/20 6:06 PM, Aaron Conole wrote: > Ilya Maximets <i.maximets@ovn.org> writes: > >> On 3/11/20 4:13 PM, Aaron Conole wrote: >>> Ilya Maximets <i.maximets@ovn.org> writes: >>> >>>> If no cache available for current branch, Travis CI uses cache from >>>> the default (master) branch. This causes build failures on older >>>> OVS branches if cache was cleared because DPDK builds from master >>>> branch are not compatible. >>>> >>>> For example, we removed pdump support on master, but branch 2.13 >>>> explicitly requests pdump being enabled and fails while using >>>> cached DPDK from the master branch. >>>> >>>> Adding the branch name to the version file to avoid using incompatible >>>> DPDK builds. >>>> >>>> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> >>>> --- >>> >>> Does it make sense to remove the .config file before stamping the >>> version instead? I guess either way will accomplish what you're after. >> >> How this supposed to help? We're no building DPDK at all if version >> file matches. Am I missing something? > > Oops. I misread the install_dpdk() function. > >> It might make sense to prepare dpdk config file and check if it's >> equal to the config file in the cache. But this sounds too complex. > > See below. > >>> I don't see much difference between them, and I guess it is just a >>> different color for the bike shed, so: >>> >>> Acked-by: Aaron Conole <aconole@redhat.com> >>> >>> On this note, I've set the bot to also rebuild it's master branch >>> every Sunday (which should help with each series build time). >> >> But with this patch applied series_* branches will not be able to use >> cache from the master. > > Hrrm... I'd prefer a solution that doesn't have this side effect. Maybe > it's possible to do this in an alternative fashion (like comparing > .config files mentioned above in addition to the existing version number > check)? That way we can preserve the per-branch settings, and also let > the bot take advantage of the weekly master-branch build for dpdk > builds. It should still be pulling the cache for the non-dpdk builds, > so it's still useful for that (the ENV settings will match). > OK. For now I cleared cache on master branch and pushed one new commit in a branch backward order, so branch-2.13 will build it's own cache and work fine after that until the new cache clearing which is unlikely. Meanwhile, I'll work on config checking solution. Best regards, Ilya Maximets.
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh index 359f7773b..dbaabaa60 100755 --- a/.travis/linux-build.sh +++ b/.travis/linux-build.sh @@ -98,7 +98,7 @@ function install_dpdk() else if [ -f "${VERSION_FILE}" ]; then VER=$(cat ${VERSION_FILE}) - if [ "${VER}" = "${DPDK_VER}" ]; then + if [ "${VER}" = "${DPDK_VER}-${TRAVIS_BRANCH}" ]; then EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-dir/build" echo "Found cached DPDK ${VER} build in $(pwd)/dpdk-dir" return @@ -128,7 +128,7 @@ function install_dpdk() EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=$(pwd)/build" echo "Installed DPDK source in $(pwd)" popd - echo "${DPDK_VER}" > ${VERSION_FILE} + echo "${DPDK_VER}-${TRAVIS_BRANCH}" > ${VERSION_FILE} } function configure_ovs()
If no cache available for current branch, Travis CI uses cache from the default (master) branch. This causes build failures on older OVS branches if cache was cleared because DPDK builds from master branch are not compatible. For example, we removed pdump support on master, but branch 2.13 explicitly requests pdump being enabled and fails while using cached DPDK from the master branch. Adding the branch name to the version file to avoid using incompatible DPDK builds. Signed-off-by: Ilya Maximets <i.maximets@ovn.org> --- .travis/linux-build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)