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

PHPLIB-1260: Revamp evergreen config #1179

Merged
merged 28 commits into from
Oct 18, 2023

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Sep 28, 2023

PHPLIB-1260

Similar to mongodb/mongo-php-driver#1473, this PR completely changes how we run evergreen builds.

Instead of running tests on various platforms, this only installs the extension on all supported platforms, which translates to testing pecl install mongodb once a stable version is out. We then run tests mostly on Debian 11 and Debian 9.2, although the Atlas and CSFLE tests run on RHEL 8.

When starting a patch build for pull requests, only replica set configurations are tested automatically, while other tests can be enabled in the patch as required.

@alcaeus alcaeus requested review from jmikola and GromNaN September 28, 2023 08:29
@alcaeus alcaeus self-assigned this Sep 28, 2023
@alcaeus
Copy link
Member Author

alcaeus commented Sep 28, 2023

Note that the AWS without credentials already are already failing. I've created PHPLIB-1263 to investigate this separately.

composer.json Outdated
@@ -13,7 +13,7 @@
"php": "^7.4 || ^8.0",
"ext-hash": "*",
"ext-json": "*",
"ext-mongodb": "^1.17.0",
"ext-mongodb": "^1.16.0",
Copy link
Member

Choose a reason for hiding this comment

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

This was updated on-purpose by 1acfab0

Copy link
Member Author

Choose a reason for hiding this comment

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

The commit was there for initial testing and has already been removed locally

@alcaeus alcaeus force-pushed the phplib-1260-revamp-evergreen-config branch from 7685b8e to 310ed92 Compare October 13, 2023 08:42
@alcaeus alcaeus marked this pull request as ready for review October 13, 2023 08:52
tests/TestCase.php Show resolved Hide resolved
.evergreen/config.yml Outdated Show resolved Hide resolved
.evergreen/compile-extension.sh Outdated Show resolved Hide resolved
.evergreen/config/build-variants.yml Show resolved Hide resolved
.evergreen/config/functions.yml Outdated Show resolved Hide resolved
env:
MONGODB_VERSION: '7.0'
args:
- ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh
Copy link
Member

Choose a reason for hiding this comment

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

I noted this defaults MONGODB_VERSION to 6.0. Presumably 7.0 is required because this task group is used for search index testing (see: Setup).

.evergreen/config/test-variants.yml Show resolved Hide resolved
aws_key: ${aws_key}
aws_secret: ${aws_secret}
bucket: mciuploads
# TODO: Use separate folder for the library once it exists
Copy link
Member

Choose a reason for hiding this comment

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

Is this TODO item tracked anywhere?

@@ -0,0 +1,37 @@
#!/bin/sh
set -o errexit # Exit the script with error if any of the commands fail
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
set -o errexit # Exit the script with error if any of the commands fail
set -o errexit # Exit the script with error if any of the commands fail
# Supported environment variables
DEPENDENCIES=${DEPENDENCIES:-} # Specify "lowest" to prefer lowest dependencies
COMPOSER_FLAGS="${COMPOSER_FLAGS:-}" # Optional, additional Composer flags

I suppose you could omit COMPOSER_FLAGS since it's not used anywhere and really just set below when we process $DEPENDENCIES.

I know $PHP_PATH and $PROJECT_DIRECTORY are also referenced below, but $PROJECT_DIRECTORY is always just assumed. I'm not sure where $PHP_PATH comes from as that was originally exported by install-dependencies.sh but now handled by the locate PHP binaries function.

Copy link
Member Author

Choose a reason for hiding this comment

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

$PHP_PATH is set through the add_expansions_to_env setting in the install composer function. locate PHP binaries is responsible for finding the path to PHP binaries and creates the evergreen expansion.

@alcaeus alcaeus requested review from jmikola and GromNaN October 17, 2023 07:40
@alcaeus alcaeus force-pushed the phplib-1260-revamp-evergreen-config branch from cb666b7 to f96762a Compare October 17, 2023 11:44
@alcaeus alcaeus merged commit bf22101 into mongodb:master Oct 18, 2023
13 checks passed
@alcaeus alcaeus deleted the phplib-1260-revamp-evergreen-config branch October 18, 2023 06:52
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.

3 participants