Skip to content

Conversation

@alcaeus
Copy link
Member

@alcaeus alcaeus commented Jan 10, 2020

This allows us to later switch to always test against dev driver versions until the RC phase of the extension, saving us the trouble of releasing alpha builds of the driver for internal testing purposes.

@alcaeus alcaeus requested a review from jmikola January 10, 2020 12:40
@alcaeus alcaeus self-assigned this Jan 10, 2020
@alcaeus alcaeus force-pushed the test-dev-driver-version branch from 42f16e3 to ffc8a9a Compare January 10, 2020 13:08
php: "7.1"
before_install: []
before_script:
- pecl install -f mongodb-${DRIVER_VERSION}
Copy link
Member

Choose a reason for hiding this comment

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

I actually don't recall why we stopped using the tpecl command, which caches the install. It looks like it was removed in 8774590.

.travis.yml still has the tpecl definition, but it looks like it's no longer being used since that commit. Do you want to try relocating it to install-extension.sh and use it when installing based on $DRIVER_VERSION? Otherwise, I suppose we should just delete it entirely (can do so in a separate issue/PR).

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll change it back to using tpecl, makes sense to cache it when possible.

@@ -0,0 +1,23 @@
#!/bin/sh

if [ "x${DRIVER_VERSION}" != "x" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

As a sanity check, I think it would make sense to raise an error at the top of this script if both $DRIVER_VERSION and $DRIVER_BRANCH are non-empty. As-is, we're likely to compile the driver twice and end up with the branch version (last one wins).

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll change this around to use an else if and give precedence to a branch build. This allows us to omit setting DRIVER_VERSION="" in the env for branch builds. If none of the drivers can be installed, the following php --ri call will fail, but I can also exit with a non-zero code in this script to break the build earlier.

@alcaeus alcaeus force-pushed the test-dev-driver-version branch 3 times, most recently from aa31ce9 to 614b086 Compare January 15, 2020 08:46
@alcaeus alcaeus force-pushed the test-dev-driver-version branch from 614b086 to 672c34e Compare January 15, 2020 08:49
@alcaeus alcaeus requested a review from jmikola January 15, 2020 09:23
alcaeus added a commit that referenced this pull request Jan 16, 2020
@alcaeus alcaeus merged commit 672c34e into mongodb:master Jan 16, 2020
@alcaeus alcaeus deleted the test-dev-driver-version branch January 16, 2020 07:37
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.

2 participants