William,
On 3/8/22 20:54, William Lallemand wrote:
Honestly I'm confused, it is overcomplicated in my opinion :(
I don't really see the benefits in creating a whole new repository
instead of the few lines in the yaml file.
I believe that having a non-trivial amount of logic in a YAML file will
ultimately result in a hard to understand configuration file.
As an example: YAML doesn't support any kind of syntax highlighting or
autocompletion.
We are talking about doing a new project for just the equivalent of a 5
lines shell script... which really don't need to be tested and
maintained outside of the project.
With your suggested diff you needed to change 4 different locations
within the vtest.yml, growing the file from 152 to 168 lines (+10%). And
none of those lines are specific to HAProxy itself!
By separating out the VTest installation logic all that's needed in
vtest.yml is the following:
- name: Install VTest
uses: haproxy/action-install-vtest@main
with:
branch: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
I think it's pretty obvious what that would do: It installs VTest and
when that step is finished you can simply use vtest.
How this action does this is left to the action, it just promises you to
do the right thing and then the HAProxy repository just needs to worry
about the HAProxy specific parts.
It's really the same like any other programming library. Just like
HAProxy uses libraries (e.g. mjson or SLZ) to perform some task, the CI
can do the same.
I feel like I'm missing something with my simple implementation, we are
already downloading all the SSL libraries, should we stop doing it this
way? What could be the problems with this?
I'd like to simplify the installation of the various SSL libs as well,
but I don't have a good proposal for that.
It seems like you want to do this in a strict github way, which is
probably convenient for a lot of usecase, but it just look really more
complicated that my first proposal.
It sure comes with a bit of initial set-up work, but I'm volunteering to
do that. I'm also volunteering the maintenance of that. As I've said:
This is nothing I just came up with, I'm using that for
haproxy-auth-request since July 2020 and I'm pretty happy with that.
The benefits of this dedicated repository are:
- Fixes and improvements VTest installation no longer require a testing
commit to the HAProxy repository. They can be developed in the dedicated
repository with a specialized CI for VTest installation.
- It uses a proper programming language instead of embedding bash in a YAML.
- The action is also easily reusable by other projects. For testing my
haproxy-auth-request repository I could remove the VTest installation
logic from action-install-haproxy and simply use the existing action.
This might also come in handy to test
https://github.com/haproxytech/haproxy-lua-oauth and other official
extensions.
Best regards
Tim Düsterhus