Skip to content
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

Remove 'warm' build steps from the template pipelines #1223

Closed
wants to merge 6 commits into from
Closed

Remove 'warm' build steps from the template pipelines #1223

wants to merge 6 commits into from

Conversation

gitlon
Copy link
Contributor

@gitlon gitlon commented Jul 19, 2023

Remove 'warm' build steps from the template pipelines, because they don't have any effect in the new vCurrent build agent queues.

These queues don't run steps on the same EC2 instance so there is warming, pre-launching or other time-saved, only an uneccessary cost to run these.

This change does not change Skuba functionality, nor the build-compile of Skuba iteself.

@gitlon gitlon requested review from a team as code owners July 19, 2023 04:10
@changeset-bot
Copy link

changeset-bot bot commented Jul 19, 2023

⚠️ No Changeset found

Latest commit: 7991fed

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines -33 to -39
- label: 🧖‍♀️ Warm Prod
command: ':'
key: warm-prod
plugins:
- *aws-sm
- *private-npm
- *docker-ecr-cache
Copy link
Member

@72636c 72636c Jul 19, 2023

Choose a reason for hiding this comment

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

The intent here was to bake the Docker build image and upload it to ECR once, rather than doing it twice on Test & Lint and Build & Package. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah in my team's repo we call the step build cache

Copy link
Contributor Author

@gitlon gitlon Jul 19, 2023

Choose a reason for hiding this comment

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

Yes of course that is still valid.

How about serialising the two steps, so it gets done only once - putting the shortest step first (which I think will be Build & Package)? Or am I just wrong, and the warm step should remain.

Copy link
Contributor

@samchungy samchungy Jul 19, 2023

Choose a reason for hiding this comment

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

If both run at the same time there would be a chance we would get a cache miss right? The build cache step takes a little while

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By "serialise" I meant adding a dependency so that one step always runs after the other, so no chance of a cache miss

Copy link
Contributor

@samchungy samchungy Jul 19, 2023

Choose a reason for hiding this comment

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

Not to mention it might fail while quicker while running both lint and build at the same time = faster feedback

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am investigating / gathering stats.

Copy link
Contributor

@samchungy samchungy Jul 21, 2023

Choose a reason for hiding this comment

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

Right, as of the new build vCurrent strategy it looks like each step has to do the pull image step, so the question is whether that pull image step is quicker than running the commands on a single step?

Copy link
Contributor

@AaronMoat AaronMoat Jul 21, 2023

Choose a reason for hiding this comment

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

It would be nice if we could somehow lock the ecr cache plugin to only run once per build at a time, then the first one that runs will build + the others will pull once it's finished pushing the image, no need for a warm step. Though I suppose this wouldn't actually save any time (the agent would just have to idle), right?

Copy link
Contributor

@samchungy samchungy Sep 5, 2023

Choose a reason for hiding this comment

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

This definitely helps in UI repos, given the UI images are typically alot bigger.

It takes on average 1 min 30 seconds to pull the image on one of our UI repos so moving all the commands to the single step has sped it up a bit

@gitlon
Copy link
Contributor Author

gitlon commented Sep 22, 2023

Per the discussion, this isn't the right change. Sam made a better change by updating the docker-ecr-cache plugin and using the new skip-pull-from-cache here.

@gitlon gitlon closed this Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants