On Fri, Apr 28, 2023 at 11:36 AM David Marchand
<david.march...@redhat.com> wrote:
> > > +    - name: create ci signature file for the dpdk cache key
> > > +      # This will collect most of DPDK related lines, so hash will be 
> > > different
> > > +      # if something changed in a way we're building DPDK including 
> > > DPDK_VER.
> > > +      # This also allows us to use cache from any branch as long as 
> > > version
> > > +      # and a way we're building DPDK stays the same.
> > > +      run:  |
> > > +        grep -irE 'RTE_|DPDK|meson|ninja' .ci/dpdk-* > dpdk-ci-signature
> > > +        grep -rwE 'DPDK_GIT|DPDK_VER' .github/ >> dpdk-ci-signature
> > > +        if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
> > > +            git ls-remote --heads $DPDK_GIT $DPDK_VER >> 
> > > dpdk-ci-signature
> > > +        fi
> > > +        cat dpdk-ci-signature
> >
> > Should we move this into a separate small script file?
> > It's duplicated in two places now and bacame a bit more complex.
>
> Good idea.

I'm going back on this.

I had in my list of things to fix, the fact that querying the branch
state is racy: if a dpdk commit happens while a OVS job is running
(for dpdk-latest) we may generate two different keys => *boom*.

So I think I should generate the DPDK key once and for all, expose it
as an "output" in GHA, and have the build-ovs depending job call for
this "output" for the cache key.
As a bonus, this method will avoid setting the DPDK_VER in multiple
places in GHA yml.

Wdyt?


-- 
David Marchand

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to