-
Notifications
You must be signed in to change notification settings - Fork 455
[CDRIVER-4640] Remove the Release Archive #1333
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
[CDRIVER-4640] Remove the Release Archive #1333
Conversation
mongo::detail::c_platform is intended to hold usage requirements common to all libraries in the project. This will replace usage of directory-level compile/link options, which do not propagate on the generated libraries when they are installed. This allows one to export/install libmongoc libraries that expose additional usage requirements, such as linking instrumentation runtimes (coverage, sanitizers, etc.) Also: Sanitizers.cmake and ENABLE_COVERAGE now attach their options to the platform-support library. This allows installed libmongoc with sanitizers enabled to "just work," as downstream users will now receive link options for coverage and sanitizers as usage requirements from the libbson and libmongoc libraries. Also: Enable threading on c_platform rather than linking. Fix the bson and mongoc packages to pull Threads::Threads as a dependency This also affects generated pkg-config files automatically.
This removes code that accumulates lists of sources to include in the source dist, as well as the targets which generate it.
mongo::detail::c_platform is intended to hold usage requirements common to all libraries in the project. This will replace usage of directory-level compile/link options, which do not propagate on the generated libraries when they are installed. This allows one to export/install libmongoc libraries that expose additional usage requirements, such as linking instrumentation runtimes (coverage, sanitizers, etc.) Also: Sanitizers.cmake and ENABLE_COVERAGE now attach their options to the platform-support library. This allows installed libmongoc with sanitizers enabled to "just work," as downstream users will now receive link options for coverage and sanitizers as usage requirements from the libbson and libmongoc libraries. Also: Enable threading on c_platform rather than linking. Fix the bson and mongoc packages to pull Threads::Threads as a dependency This also affects generated pkg-config files automatically.
309a6f6
to
be0222e
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.
LGTM with additional comments addressed. The build simplification and removal of the CI bottleneck is much appreciated.
If this change is merged, I expect the C driver 1.25.0 will not release create/sign/upload a tarball. I suggest adding a note to the NEWS file for a new "Unreleased" section noting the removal of the tarball:
libmongoc 1.25.0 (Unreleased)
============================
* The release archive tarball is no longer created. Please instead use the snapshot tarball attached in GitHub for this release tag.
Remove the ## Creating and checking a distribution tarball
section from CONTRIBUTING.md.
The RELEASE environment variable is now used simply to disable debug assertions. We may be safe to remove this task as low-value?
I incorrectly assumed those tasks were building with a release config (e.g. -DCMAKE_BUILD_TYPE=RelWithDebInfo
). Though maybe that does not provide much value either. I support removing the compile-release
tasks.
CMakeLists.txt
Outdated
@@ -548,63 +554,7 @@ if (ENABLE_MONGOC) | |||
set (PACKAGE_PREFIX "mongo-c-driver-${MONGOC_DIST_VERSION}") | |||
set (DIST_FILE "${PACKAGE_PREFIX}.tar.gz") |
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.
set (DIST_FILE "${PACKAGE_PREFIX}.tar.gz") |
I suggest grepping this file for dist
. Several comments and lines look no longer needed.
CMakeLists.txt
Outdated
DEPENDS | ||
${ALL_DIST} ${dist_generated_depends} | ||
) | ||
|
||
if (NOT USE_SYSTEM_LIBBSON AND ENABLE_MAN_PAGES STREQUAL ON AND ENABLE_HTML_DOCS STREQUAL ON) |
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.
Remove unneeded if
and else
.
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.
Minor feedback; otherwise, LGTM.
bash tools/poetry.sh run \ | ||
bash .evergreen/scripts/build-docs.sh |
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.
bash tools/poetry.sh run \ | |
bash .evergreen/scripts/build-docs.sh | |
bash tools/poetry.sh run bash .evergreen/scripts/build-docs.sh |
Avoids messy formatting in the generated config file.
@@ -171,7 +171,7 @@ def __init__( | |||
|
|||
super().__init__( | |||
task_name=task_name, | |||
depends_on=[OD([("name", "make-release-archive"), ("variant", "releng")])], | |||
depends_on=[], |
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.
depends_on=[], |
Now unused; simply remove?
@@ -76,6 +76,7 @@ def days(n: int) -> int: | |||
# Disable the MongoDB legacy shell download, which is not available in 5.0 for u22 | |||
"SKIP_LEGACY_SHELL": "1" | |||
}, | |||
tags=["merge-gate"], |
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.
tags=["merge-gate"], | |
tags=["pr-merge-gate"], |
To make it clearer what "merge" is referring to.
SCRATCH_DIR=$(pwd)/.scratch | ||
rm -rf "$SCRATCH_DIR" | ||
mkdir -p "$SCRATCH_DIR" | ||
cp -vr -- "$SRCROOT"/* "$SCRATCH_DIR" |
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.
Consider using cmake -S . -B "$BUILD_DIR"
and cmake --build "$BUILD_DIR"
instead of copying the source root directory and running CMake commands with relative paths from inside $BUILD_DIR
.
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 was originally going to be overhauling many of these scripts, but had to abandon those changes as they are incredibly fragile, especially in assuming $PWD
. Doing any slight "engoodening" of these scripts ends up cascading into a Gordian Knot. I decided to do the minimum-possible changes to get them working, but I hope to entirely replace them soon (with something hopefully faster and better as well).
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.
The changes look good to me.
I don't think that this has been brought up yet, but remember that this change will also break release.py
in the tools repo. That script uses make dist
for generating the release artifacts. It will require updating, and that probably also means that the document which describes the release steps will require updating.
Refer: CDRIVER-4640
This changeset removes the release archive.
Background
The release archive was implemented as a source distribution method that contained only the relevant files to build the libraries and tests, as well as containing the built documentation.
Why Remove It?
It is currently unclear if any users are particularly dependent upon this exact release format, and if there is significant benefit over a regular snapshot of the repository at the release tag. Maintaining the source distribution required manually listing the constituent files, which led to a lot of redundancy and trivial CMakeLists.txt that only contained these file lists. Forgetting to add/remove items from the listings would result in CI failures upon push.
Notably, the enumerated file listing restricted the inclusion of any generated build results that were not strictly known ahead-of-time. For documentation, this was a problem as Sphinx would change its output with different theme updates. This led to us vendoring in a Sphinx theme that is still used several years later, and it's age is showing 😦.
It was decided that the additional complexity and build constraints are not worth it going forward, so this changeset removes the release archive tasks.
What's Here?
link-sample-...
scripts, which now copy the source tree into their scratch space rather than expand an archive.make-release-archive
task is gone, thelink-...
test tasks now queue much faster and will not bottleneck.**Release Archive Creator
variant has been removed and replaced with aSmoke Tests
variant, since that is what remains within it.make-docs
is defined, which builds and uploads the generated documentation pages. (This was previously done as part ofmake-release-archive
)release-compile
tasks common across most variants no longer uses the release archive. TheRELEASE
environment variable is now used simply to disable debug assertions. We may be safe to remove this task as low-value?