Skip to content

Reduce parallelism and use supported machine type for makestage - #189

Merged
cert-manager-prow[bot] merged 2 commits into
cert-manager:masterfrom
wallrj:7307-reduce-parallelism
Oct 4, 2024
Merged

cert-manager-prow[bot] merged 2 commits into
cert-manager:masterfrom
wallrj:7307-reduce-parallelism

Conversation

@wallrj

@wallrj wallrj commented Sep 26, 2024 •

Copy link
Copy Markdown
Member

Fixes: cert-manager/cert-manager#7307

Assuming that the build failures are caused by OOM so testing whether reducing the parallelism might reduce the peak memory.

Testing

I ran cmrel makestage with this version of the cloudbuild.yaml file, and it succeeded.

Total build time: 2 min 52 sec

$ cmrel makestage --ref=v1.16.0-beta.0
2024/09/26 10:52:01 Root options:
2024/09/26 10:52:01   Debug: false
2024/09/26 10:52:01 Stage options:
2024/09/26 10:52:01   Bucket: "cert-manager-release"
2024/09/26 10:52:01   Org: "cert-manager"
2024/09/26 10:52:01   Repo: "cert-manager"
2024/09/26 10:52:01   Ref: "v1.16.0-beta.0"
2024/09/26 10:52:01   CloudBuildFile: "./gcb/makestage/cloudbuild.yaml"
2024/09/26 10:52:01   Project: "cert-manager-release"
2024/09/26 10:52:01   PublishedImageRepo: "quay.io/jetstack"
2024/09/26 10:52:01   SigningKMSKey: "projects/cert-manager-release/locations/europe-west1/keyRings/cert-manager-release/cryptoKeys/cert-manager-release-signing-key/cryptoKeyVersions/1"
2024/09/26 10:52:01 ---
2024/09/26 10:52:01 Staging build for cert-manager/[email protected]
2024/09/26 10:52:01 DEBUG: Loading cloudbuild.yaml file from "./gcb/makestage/cloudbuild.yaml"
2024/09/26 10:52:01 DEBUG: building google cloud build API client
2024/09/26 10:52:01 Submitting GCB build job...
2024/09/26 10:52:02 DEBUG: decoding build operation metadata
2024/09/26 10:52:02 ---
2024/09/26 10:52:02 Submitted build with name: "8811ffbb-3ed0-46d1-8ffa-8c32fe5ab0a5"
2024/09/26 10:52:02   View logs at: https://console.cloud.google.com/cloud-build/builds/8811ffbb-3ed0-46d1-8ffa-8c32fe5ab0a5?project=1021342095237
2024/09/26 10:52:02   Log bucket: gs://1021342095237.cloudbuild-logs.googleusercontent.com
2024/09/26 10:52:02 ---
2024/09/26 10:52:02 Waiting for build to complete, this may take a while...
...
2024/09/26 10:55:43 Release build complete for cert-manager/[email protected]

@cert-manager-prow cert-manager-prow Bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 26, 2024
cert-manager/cert-manager#7307

Assuming that the build failures are caused by OOM so testing whether reducing the parallelism might reduce the peak memory.

Signed-off-by: Richard Wall <[email protected]>
# https://cert-manager.io/docs/contributing/release-process/

## Clone & checkout the cert-manager repository
timeout: 2700s # 45m

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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


## Build release artifacts and push to a bucket
- name: 'eu.gcr.io/jetstack-build-infra-images/bazelbuild:${_BUILDER_IMAGE_TAG}'
- name: 'europe-west1-docker.pkg.dev/cert-manager-tests-trusted/cert-manager-infra-images/make-dind:${_BUILDER_IMAGE_TAG}'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

_KMS_KEY: "projects/cert-manager-release/locations/europe-west1/keyRings/cert-manager-release/cryptoKeys/cert-manager-release-signing-key/cryptoKeyVersions/1"
_RELEASE_TARGET_BUCKET: "cert-manager-release"
_BUILDER_IMAGE_TAG: "20220629-ee75d11-4.2.1"
_BUILDER_IMAGE_TAG: "20240422-6b43e85-bookworm"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

machineType: n1-highcpu-32
# https://cloud.google.com/build/docs/optimize-builds/increase-vcpu-for-builds
# https://cloud.google.com/build/pricing
machineType: E2_HIGHCPU_32

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

N1_HIGHCPU_32 is still supported, but the official list of machine types suggests E2_HIGHCPU_32 instead.

@wallrj
wallrj requested a review from inteon September 26, 2024 11:53

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this file is an exact copy of the config in cert-manager/cert-manager, could you add that in a comment?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's not an exact copy. The Git checkout part is simpler in cert-manager/cert-manager,
I assume that's because GCB can know which repo and branch to use based on a webhook request from GitHub?

I will update the comment to explain that this is a slightly modified version of the other file.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@cert-manager-prow cert-manager-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 4, 2024
@wallrj
wallrj requested a review from inteon October 4, 2024 08:30

@inteon inteon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/approve
/lgtm

@cert-manager-prow cert-manager-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 4, 2024
@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 4, 2024
@cert-manager-prow
cert-manager-prow Bot merged commit ef5cc58 into cert-manager:master Oct 4, 2024
@wallrj
wallrj deleted the 7307-reduce-parallelism branch October 4, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failures during cert-manager release process: cmrel makestage fails intermittently with "compile: signal: killed"

2 participants