weave-gitops icon indicating copy to clipboard operation
weave-gitops copied to clipboard

reduce release container image build time and github release should happen after artefacts are ready

Open enekofb opened this issue 2 years ago • 6 comments

Problem

In the previous ticket, we tackled what we thought was the main reason of the impact to users: chart being published before container image.

However, there are a couple of suggestions that are worth follow up on:

  1. Building container image for release takes more than an hour: it matters due to a releaser is a person that is actively dedicating its time to ensure that a release happens successfully. To reduce this time not only frees releaser time to something else but also increases the chances of a successful release which translates in productivity increase.

  2. GitHub release happens before artifacts are available: it matters cause the github release flags the community that a new release exists. Given that weave gitops would be mostly usedin containerized environments this order matters as it could eventually lead to the same experience as we saw in https://github.com/weaveworks/weave-gitops/issues/3907 (but smaller chances of impact)

Solution

  1. Build time -> investigate and implement ways to get this down as much as possible (i.e. https://github.com/weaveworks/weave-gitops/issues/3907#issuecomment-1662227441)

  2. Github release order:

  • Something that seems trivial is to change this order https://github.com/weaveworks/weave-gitops/blob/main/.github/workflows/release.yaml#L104-L106
  • Something that might require more work is to publish github release after helm chart (as they are in different workflows)

Additional context

To be added in case of needed

enekofb avatar Aug 16 '23 07:08 enekofb

enhancement -> build time bug -> release order

enekofb avatar Aug 16 '23 07:08 enekofb

GitHub release happens before artifacts are available: it matters cause the github release flags the community that a new release exists. Given that weave gitops would be mostly usedin containerized environments this order matters as it could eventually lead to the same experience as we saw in https://github.com/weaveworks/weave-gitops/issues/3907 (but smaller chances of impact)

Implementing ordering with the following orchestration

Screenshot 2023-08-30 at 11 40 02

enekofb avatar Aug 30 '23 10:08 enekofb

build time is mostly consumed around yarn build

https://github.com/weaveworks/weave-gitops/actions/runs/6027756317/job/16354189068

Potential actions:

  • take the js build out of the docker build
  • review arm specific build recommendations in github actions
  • https://github.com/weaveworks/weave-gitops/issues/3907#issuecomment-1662227441 (use tonistiigi/xx as fluxcd does) -> i believe that we already have it.

enekofb avatar Sep 06 '23 14:09 enekofb

take the js build out of the docker build

One obvious suggestion (and probably naive) would be to build these once in the native CI environment and copy the JS files to the container. Our FE code is just a bundle of static files, so it shouldn't care about target environment.

jpellizzari avatar Sep 06 '23 15:09 jpellizzari

Release order worked fine yesterday where we released to github after the image was built.

enekofb avatar Sep 14 '23 09:09 enekofb

unassigning to me so anyone else in the team could take it

enekofb avatar Nov 13 '23 11:11 enekofb