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

PHPC-2510 Install evergreen tools using git submodule #1797

Open
wants to merge 4 commits into
base: v1.x
Choose a base branch
from

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Feb 26, 2025

Comment on lines 7 to 10
- package-ecosystem: "gitsubmodule"
directory: "/tests/"
schedule:
interval: "weekly"
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't want dependabot to push updates for libmonc and libmongocrypt.

Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to specify the path to the actual submodule, or does this need to be a level above?

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 try with the submodule path; it should work.

@GromNaN GromNaN marked this pull request as ready for review March 18, 2025 18:12
@GromNaN GromNaN requested a review from Copilot March 18, 2025 18:13

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the installation instructions for evergreen tools to use a Git submodule rather than cloning during the build process.

  • Updated .evergreen/README.md to reflect the new installation method.
  • Changed the description to indicate that the package is installed as a Git submodule in the tests repository.
Files not reviewed (6)
  • .evergreen/config/functions.yml: Language not supported
  • .github/dependabot.yml: Language not supported
  • .github/workflows/tests.yml: Language not supported
  • .github/workflows/windows-tests.yml: Language not supported
  • .gitmodules: Language not supported
  • tests/drivers-evergreen-tools: Language not supported
@GromNaN GromNaN requested review from jmikola, Copilot and alcaeus March 18, 2025 18:14

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the installation instructions for evergreen tools, switching from cloning during the build process to using a Git submodule.

  • Updated README in the .evergreen directory with new installation instructions.
  • Clarified that the evergreen tools package is now installed as a Git submodule in the tests repository.
Files not reviewed (6)
  • .evergreen/config/functions.yml: Language not supported
  • .github/dependabot.yml: Language not supported
  • .github/workflows/tests.yml: Language not supported
  • .github/workflows/windows-tests.yml: Language not supported
  • .gitmodules: Language not supported
  • tests/drivers-evergreen-tools: Language not supported
else
git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
fi
git submodule update --init --depth 1
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 --depth 1 was not in PHPLIB. I can add it also to reduce the Git history that get downloaded.

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 have to revert this change, there is a git checkout inside the libmongoc submodule when LIBMONGOC_VERSION is set (always). Maybe I can fetch the tag directly.

working_dir: "src/src/libmongoc"
add_expansions_to_env: true
script: |
if [ -n "${LIBMONGOC_VERSION}" ]; then
echo "Checking out libmongoc version: ${LIBMONGOC_VERSION}"
git fetch
git checkout ${LIBMONGOC_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 suppose you could initialize the submodules independently by passing their path as an argument to git submodule update, although that would make this more fragile if additional submodules are introduced to the project.

Assuming it works, fetching the tag for libmongoc does seem more resilient, and then you could keep that logic local to the LIBMONGOC_VERSION handling.

@GromNaN
Copy link
Member Author

GromNaN commented Mar 18, 2025

I don't understand the evergreen errors.

[2025/03/18 19:13:21.723] From https://github.com/mongodb/mongo-c-driver
[2025/03/18 19:13:21.723]  * [new tag]         1.30.1     -> 1.30.1
[2025/03/18 19:13:21.727] Checking out libmongoc version: r1.30
[2025/03/18 19:13:21.727] error: pathspec 'r1.30' did not match any file(s) known to git
[2025/03/18 19:13:21.727] Command 'shell.exec' in function 'compile driver' (step 1.1 of 2) failed: shell script encountered problem: exit code 1.
[2025/03/18 19:13:21.727] Finished command 'shell.exec' in function 'compile driver' (step 1.1 of 2) in 504.58684ms.
[2025/03/18 19:16:10.592] 2025-03-18 18:16:10,239 [DEBUG] mongo_orchestration.process:158 - process is not alive
[2025/03/18 19:16:10.592] 2025-03-18 18:16:10,239 [ERROR] mongo_orchestration.servers:389 - Could not start Server. Please find server log below.
[2025/03/18 19:16:10.592] =====================================================
[2025/03/18 19:16:10.592] 2025-03-18 18:16:10,240 [ERROR] mongo_orchestration.servers:393 - {"t":{"$date":"2025-03-18T18:16:10.157+00:00"},"s":"E",  "c":"NETWORK",  "id":23248,   "ctx":"-","msg":"Cannot read certificate file","attr":{"keyFile":"/data/mci/826c701ecd806ff38ce7df3bae7a2e8b/src/tests/drivers-evergreen-tools/.evergreen/x509gen/server.pem","error":"error:02001002:system library:fopen:No such file or directory"}}
[2025/03/18 19:16:10.592] {"t":{"$date":"2025-03-18T18:16:10.157+00:00"},"s":"D1", "c":"-",        "id":23074,   "ctx":"-","msg":"User assertion","attr":{"error":"InvalidSSLConfiguration: Can not set up PEM key file.","file":"src/mongo/util/net/ssl_manager_openssl.cpp","line":2582}}
[2025/03/18 19:16:10.592] {"t":{"$date":"2025-03-18T18:16:10.157+00:00"},"s":"F",  "c":"CONTROL",  "id":20574,   "ctx":"-","msg":"Error during global initialization","attr":{"error":{"code":140,"codeName":"InvalidSSLConfiguration","errmsg":"Can not set up PEM key file."}}}
[2025/03/18 19:16:10.592] 2025-03-18 18:16:10,240 [ERROR] mongo_orchestration.apps:68 - <function sh_create at 0x7f069a36d1b0>

Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

Minor suggestions you can address on your own.

Comment on lines 7 to 10
- package-ecosystem: "gitsubmodule"
directory: "/tests/"
schedule:
interval: "weekly"
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to specify the path to the actual submodule, or does this need to be a level above?

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