[Openvpn-devel,S] Change in openvpn[master]: GHA: do not trigger builds in openvpn-build anymore

Message ID a43a224fa7e170bc6ebf8e347440fa7c80db5745-HTML@gerrit.openvpn.net
State Superseded
Headers show
Series [Openvpn-devel,S] Change in openvpn[master]: GHA: do not trigger builds in openvpn-build anymore | expand

Commit Message

flichtenheld (Code Review) Sept. 5, 2023, 1:12 p.m. UTC
flichtenheld has uploaded this change for review. ( http://gerrit.openvpn.net/c/openvpn/+/328?usp=email )


Change subject: GHA: do not trigger builds in openvpn-build anymore
......................................................................

GHA: do not trigger builds in openvpn-build anymore

We do this via explicit PRs now, generated by renovate.
This allows much better control over what state of the
code gets built.

Change-Id: I8b00d7d79a26ad4aaae529cb496e125398169b50
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
---
M .github/workflows/build.yaml
1 file changed, 0 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/28/328/1

Comments

Gert Doering Sept. 5, 2023, 5:22 p.m. UTC | #1
Hi,

On Tue, Sep 05, 2023 at 01:12:10PM +0000, flichtenheld (Code Review) wrote:
> GHA: do not trigger builds in openvpn-build anymore
> 
> We do this via explicit PRs now, generated by renovate.
> This allows much better control over what state of the
> code gets built.

Can you elaborate on this a bit more?  I see lots of things flying by,
but do not understand any of it...

gert
Frank Lichtenheld Sept. 5, 2023, 7:04 p.m. UTC | #2
On Tue, Sep 05, 2023 at 07:22:46PM +0200, Gert Doering wrote:
> Hi,
> 
> On Tue, Sep 05, 2023 at 01:12:10PM +0000, flichtenheld (Code Review) wrote:
> > GHA: do not trigger builds in openvpn-build anymore
> > 
> > We do this via explicit PRs now, generated by renovate.
> > This allows much better control over what state of the
> > code gets built.
> 
> Can you elaborate on this a bit more?  I see lots of things flying by,
> but do not understand any of it...

Sure.

We have the renovate GHA at
https://github.com/OpenVPN/openvpn-build/actions/workflows/renovate.yaml
That runs regularly and checks whether all of the dependencies of openvpn-build
can be updated.

There are three primary inputs for renovate (its "state"):
1) The openvpn-build git repository
2) The PRs in the openvpn-build github repository
3) The "Dependency Dashboard" issue in openvpn-build github repository
   (https://github.com/OpenVPN/openvpn-build/issues/386)

In 3) you can see a list of dependencies renovate has detected.
From 1) renovate will determine which dependencies are out-of-date.
It will then check 2) whether it has already created a branch and PR
to update this dependency. It respects closed PRs. So if it created a
PR previously and the PR was closed without merging it, it will not
be recreated.

So for example if you push something into OpenVPN/openvpn, then renovate
will determine on the next run that the src/openvpn submodule in
openvpn-build is out of date and open a PR to fix that. renovate
tracks both master and release/2.6 and through the information in the
.gitmodules knows which branch of OpenVPN/openvpn to look at. So if
you push into both master and release/2.6, it will create two PRs,
against master and release/2.6 in openvpn-build, respectively.

So as a result, we get PRs (and through that PR builds) for every push
into any of the dependent repositories. That gives us a much more detailed
picture than we had before, when we just inside the GHA updated all of the
repositories to their latest state and hoped that they work together.

Hope this helps,

Patch

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 1b75a1a..58fbc29 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -290,19 +290,6 @@ 
             !${{ github.workspace }}/out/**/CMakeFiles/**
             !${{ github.workspace }}/out/**/vcpkg_installed/**
 
-  trigger_openvpn_build:
-    runs-on: windows-latest
-    needs: [checkuncrustify, mingw, ubuntu, ubuntu-clang-asan, macos, msvc]
-    if: ${{ github.event_name != 'pull_request' && github.repository == 'openvpn/openvpn' && github.ref == 'refs/heads/master' }}
-
-    steps:
-    - name: Repository Dispatch
-      uses: peter-evans/repository-dispatch@v2
-      with:
-        token: ${{ secrets.OPENVPN_BUILD_REPO_DISPATCH }}
-        repository: openvpn/openvpn-build
-        event-type: openvpn-commit
-
   libressl:
     strategy:
       fail-fast: false