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

Add clone-dependencies.sh script #5

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

pniedzielski
Copy link
Collaborator

Currently, builds of our Python SDK clone several C++ dependencies directly from the main branch of their canonical git repositories and build them from source. Sometimes, though, main might be broken, causing our nightly builds to spuriously fail. Instead, we should clone from tagged releases of our dependencies, pinning the versions so we know that our builds will not fail due to development issues in our dependencies.

This patch refactors the bin/build-*.sh scripts to enable us to do this more easily. First, it creates a new bin/clone-dependencies.sh script, which specifies the tagged versions of and clones the dependencies bde-tools, bde, ntf-core, and blazingmq. This consolidates the dependency cloning that is common between all the bin/build-*.sh scripts. This script is not intended to be run by users directly; instead, this patch secondarily removes the dependency cloning from each build script, and sources the bin/clone-dependencies.sh script.

The existing dependency cloning logic allows for a user to manually clone these dependencies in the correct location before running the script, and those clones will be used instead. This patch preserves this functionality, which allows users to still build and test the Python SDK against the main branches of these dependencies, at the cost of doing the cloning and checking out themselves.

To update the release tags that the SDK is built against, the environment variables at the top of .bin/clone-dependencies.sh should be modified.

Testing

This patch was tested by building and testing the SDK with the ./bin/build-macos-universal.sh script on an M2 Mac system, and manually ensuring that all dependencies were correctly cloned to the correct tag.

Currently, builds of our Python SDK clone several C++ dependencies directly
from the `main` branch of their canonical git repositories and build them from
source.  Sometimes, though, `main` might be broken, causing our nightly builds
to spuriously fail.  Instead, we should clone from tagged releases of our
dependencies, pinning the versions so we know that our builds will not fail due
to development issues in our dependencies.

This patch refactors the `bin/build-*.sh` scripts to enable us to do this more
easily.  First, it creates a new `bin/clone-dependencies.sh` script, which
specifies the tagged versions of and clones the dependencies `bde-tools`,
`bde`, `ntf-core`, and `blazingmq`.  This consolidates the dependency cloning
that is common between all the `bin/build-*.sh` scripts.  This script is not
intended to be run by users directly; instead, this patch secondarily removes
the dependency cloning from each build script, and sources the
`bin/clone-dependencies.sh` script.

The existing dependency cloning logic allows for a user to manually clone these
dependencies in the correct location before running the script, and those
clones will be used instead.  This patch preserves this functionality, which
allows users to still build and test the Python SDK against the `main` branches
of these dependencies, at the cost of doing the cloning and checking out
themselves.

To update the release tags that the SDK is built against, the environment
variables at the top of `.bin/clone-dependencies.sh` should be modified.

Testing
-------

This patch was tested by building and testing the SDK with the
`./bin/build-macos-universal.sh` script on an M2 Mac system, and manually
ensuring that all dependencies were correctly cloned to the correct tag.

Signed-off-by: Patrick M. Niedzielski <[email protected]>
@pniedzielski pniedzielski added the enhancement New feature or request label Nov 22, 2023
@pniedzielski pniedzielski requested a review from hallfox November 22, 2023 19:27
@pniedzielski pniedzielski requested a review from a team as a code owner November 22, 2023 19:27
This patch brings the `build-macos-universal.sh` script to parity with the
`build-manylinux.sh` script in installing the BlazingMQ broker to `DIR_INSTALL`
after building it.  This is necessary to run integration tests on an OSX GitHub
Actions runner, and better automates the process for running these tests
manually, bringing the process up to line with the process on Linux machines.

Signed-off-by: Patrick M. Niedzielski <[email protected]>
@pniedzielski pniedzielski merged commit f4077d3 into bloomberg:main Nov 30, 2023
9 checks passed
@pniedzielski pniedzielski deleted the pinned-dependencies branch November 30, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants