fasten icon indicating copy to clipboard operation
fasten copied to clipboard

The "Build and push the license feeder/detector" workflows get triggered on *every* push

Open proksch opened this issue 2 years ago • 4 comments

Every push, regardless on which branch it happens, triggers the two workflows "Build and push the license feeder Docker image" and "Build and push the python license detector Docker image". Both do not only take extended time to finish, they also both publish a Docker image. I would expect that the build is only triggered on commits on develop, but from the name it looks like there could be even smarter handling involved as one build only affects Python.

The current handling does not seem to be intended and it wastes a lot of resources in terms of storage and build minutes for the organization.

@michelescarlato Could you please look into this?

proksch avatar May 18 '22 23:05 proksch

Can I have a look at the branches that still trigger the Build and push the license feeder Docker image and Build and push the python license detector Docker image ?

I did a bit of cleanup (removing unmerged branches, as asked by Antoine @amottier), and now it could be handled. But maybe by mistake wrongly declared GH actions have been "dragged" into other branches.

michelescarlato avatar May 20 '22 08:05 michelescarlato

Hello, the root cause of the issue are those 3 lines at the deployment files: https://github.com/fasten-project/fasten/blob/da66973a2a731809ca0b0a2f4fad99c348dd227e/.github/workflows/docker-license-detector-plugin.yml#L13-L15

More specifically, in both Build and push the license detector Docker image, Build and push the license feeder Docker image and Build and push the python license detector Docker image actions, the worflows are configured to be triggered every time a modification is placed on a pull request targeting the develop branch.

Therefore, I would propose removing this configuration and keep triggering the actions only on pushes on specific branches.

gdrosos avatar May 20 '22 15:05 gdrosos

Hello, the root cause of the issue are those 3 lines at the deployment files:

https://github.com/fasten-project/fasten/blob/da66973a2a731809ca0b0a2f4fad99c348dd227e/.github/workflows/docker-license-detector-plugin.yml#L13-L15

More specifically, in both Build and push the license detector Docker image, Build and push the license feeder Docker image and Build and push the python license detector Docker image actions, the worflows are configured to be triggered every time a modification is placed on a pull request targeting the develop branch.

On push or pull_request on develop, the three GH actions that creates the 2 license detectors (the ones that include Scancode) and the Java license feeder, are triggered.

Therefore, I would propose removing this configuration and keep triggering the actions only on pushes on specific branches.

There are no side branches for licensing anymore. All is in develop.

Consider that all these plugins uses the fasten core library.

If any modification on the core is performed, it makes sense that these GH actions run (there may be modifications that breaks the license detectors, as well as the Java license feeder).

michelescarlato avatar May 21 '22 08:05 michelescarlato

Hi there,

I performed the modification suggested by @gdrosos Giorgos.

I merged this branch with the proposed modification.

michelescarlato avatar May 22 '22 10:05 michelescarlato