- Notifications
You must be signed in to change notification settings - Fork 22
CLOUDP-295785 - Fix multi-arch builds by migrating away from goreleaser #547
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
base: master
Are you sure you want to change the base?
Conversation
MCK 1.6.0 Release NotesNew Features
Bug Fixes
|
8b1dd52 to be74756 Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is inconsistent. Building and downloading the binary use a one-line bash script, while promoting uses run_python.sh. I personally prefer using run_python directly instead of having many one-line scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer run_python directly as well, but the issue with that is we cannot use our context variables directly in such call. For example having:
binary: scripts/dev/run_python.sh scripts/release/kubectl_mongodb/download_kubectl_plugin.py --build-scenario "${BUILD_SCENARIO}" --version "${OPERATOR_VERSION}" ... will not work because BUILD_SCENARIO and OPERATOR_VERSION are not exposed in evergreen and only exported when sourcing the .generated/context.env file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
promote_kubectl_plugin.py is using env variables directly in the code and we can call directly from evg. Other python scripts need bash wrapper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this file's content are not changed, can we mention this here for reviewers help. We can mention that it's already in master we are just moving it to diff location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just read the entire file and it looks like we are changing it slightly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used git mv command and moved the files in the first commit and changed in another, but this didn't help with the GitHub preview :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing only the latest commit helps! 5eb86a9
| logger.info("All artifacts were promoted to release bucket successfully") | ||
| | ||
| | ||
| def is_expected_artifact_for_promotion(file_path: str) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this required because now we have the compressed as well as decompressed file in staging? I am a little sceptical about the idea because it would make things confusing, like we discussed on call.
But if we HAVE to do this, we should add a comment here explaining that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be problematic if run tar locally and don't upload copies or artifacts in S3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this required because now we have the compressed as well as decompressed file in staging?
only in release bucket, in staging we still have only decompressed ones.
if we HAVE to do this, we should add a comment here explaining that
yes, we have to put both compressed as well as decompressed files. Compressed are used for release assets backup while uncompressed are used for e2e testing. I wanted to keep the simple logic when calling download_multi_cluster_binary that is used when building test image and not having to decompress binaries, when downloading from release bucket. It's much simpler to just push both flavours.
.goreleaser.yaml Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep this file for some time, to make sure we can use this to release plugin in case of issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can always revert it back or copy it from git history. If it is unused then lets not keep it in repo
9fc1e5e to 2be716d Compare 2be716d to 5eb86a9 Compare
Summary
Completely removed
goreleaserusage in the project. It was preventing us to build multiarchkubect-mongodbplugin binaries. There were also other reasons to dropgoreleaseri.e. it was only used to build binaries, nothing else was used, but required us to keep additional, static.goreleaser.yamlthat was not compatible withbuild_info.json.This PR also improves quite a lot of other things:
kubectl-mongodbplugin to a separate evergreen taskkubectl-mongodbplugin is now only dowloaded when building test image. This means we need to wait with building test image forkubectl-pluginto be available in s3promote_kubectl_plugin.pynow uses temp_dir instead of hardcoded./artifactsdir. Previously we couldn't re-run the promotion pipeline if the signatures were already present on the machine:Signature already exists. Displaying proofgoreleaserkubectl-mongodbalso pushes binaries to s3 release bucket so they can be used for e2e smoke testskubectl-mongodbis now pushed to staging and released with two new architectures:linux/s390xlinux/ppc64leProof of Work
Passing CI for PR.
Passing CI for smoke arm on staging scenario (with arm smoke tests enabled)
Passing CI for release scenario (
release_kubectl_mongodb_pluginfails on adding assets to GH release, which is expected since there is no releaserc-1.3.0)Checklist
skip-changeloglabel if not needed