Skip to content

Build speed: components/supervisor:docker and glitpod-cli #13228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2022

Conversation

mads-hartmann
Copy link
Contributor

@mads-hartmann mads-hartmann commented Sep 23, 2022

Description

This uses the Leeway package version when populating versions.txt - the motivation for this change is to improve build speed. When we use argdeps the package build cache will be invalidated whenever the argument changes. So having an argdeps on version means that we'll rebuild components/gitpod-cli:version and components/gitpod-cli:app on every CI build. Because components/supervisor:docker depends on components/gitpod-cli:app it means we'll rebuild that every time too.

This will reduce our build speeds by 38s (based on the example shown below).

Discussion: I went with using the Leeway package version. We could also use the git commit (__git_commit) or even use version but then just know it will only be bumped when the package is actually modified. We could also include all three.
⬆️ Update: We decided on using the git commit instead here.

Related Issue(s)

Fixes #12823

How to test

With the changes in this PR I triggered two commits to show that it no longer rebuilds components that didn't change. The arrows in the before images indicate what we'll no longer be rebuilding every time.

Before: Logs

Before: Images

After: Logs

After: Images

Release Notes

NONE

Documentation

N/A

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@mads-hartmann
Copy link
Contributor Author

mads-hartmann commented Sep 23, 2022

/werft run

👍 started the job as gitpod-build-mads-hartmann-build-speed-components-12823.2
(with .werft/ from main)

@mads-hartmann mads-hartmann marked this pull request as ready for review September 23, 2022 09:08
@mads-hartmann mads-hartmann requested a review from a team September 23, 2022 09:08
Copy link
Contributor

@iQQBot iQQBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🙏

@mads-hartmann mads-hartmann force-pushed the mads-hartmann/build-speed-components-12823 branch from 18aa309 to 516a607 Compare September 23, 2022 09:23
@roboquat roboquat merged commit 30dcca0 into main Sep 23, 2022
@roboquat roboquat deleted the mads-hartmann/build-speed-components-12823 branch September 23, 2022 09:31
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Sep 23, 2022
@iQQBot iQQBot mentioned this pull request Sep 28, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production release-note-none size/XS team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build speed: components/supervisor:docker and glitpod-cli
3 participants