Skip to content

Use drivers-evergreen-tools for Windows testing #1615

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

Merged
merged 4 commits into from
Jul 24, 2024

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Jul 24, 2024

This PR makes several changes, all related to how we start MongoDB on Windows. Since the previous method of starting MongoDB would often time out, the Windows workflow now uses drivers-evergreen-tools to start clusters. This should be more reliable and as a side effect uses the same configs we use for our Linux testing. As part of this change, I have also re-organised the windows workflows so that tests for a given variant (i.e. the combination of PHP version, architecture, and thread safety) start immediately after the corresponding build has completed, not only after all builds have completed. This yields faster test results.

During testing, I discovered an issue in the tests for ServerHeartbeatFailedEvent, where an expected integer return was actually returned as an Int64 instance on 32-bit platforms. After some investigation I found that this was due to the type being wrong - libmongoc returns an int64_t, while we store a uint64_t. This caused issues when comparing the value to INT32_MAX and INT32_MIN on 32-bit platforms, erroneously returning an Int64 instance which should only happen when the value exceeds the bounds of a 32-bit integer. During that investigation I also found that the same issue affects ServerHeartbeatSucceededEvent, but it didn't get exposed because the duration was not added to the var_dump output. All these issues have been fixed.

@alcaeus alcaeus requested a review from GromNaN July 24, 2024 08:52
@alcaeus alcaeus self-assigned this Jul 24, 2024
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

Smart.

Comment on lines +71 to +72
["durationMicros"]=>
int(%d)
Copy link
Member

Choose a reason for hiding this comment

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

I understand that this value was already exposed with an getDurationMicros method, but now it becomes accessible with var_dump.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's correct :)

@alcaeus alcaeus merged commit 2cd4b43 into mongodb:master Jul 24, 2024
72 checks passed
@alcaeus alcaeus deleted the use-evg-tools-on-windows branch July 24, 2024 11:55
alcaeus added a commit that referenced this pull request Sep 4, 2024
* master: (22 commits)
  PHPC-2434: Add PHP 8.4 to GitHub Actions (#1625)
  PHPC-2421, PHPC-2428: Update bundled dependencies (#1622)
  Don't build libmongoc version in pull requests
  Use drivers-evergreen-tools for Windows testing (#1615)
  PHPC-1957 Add tests for out-of-range UTCDateTime values (#1614)
  PHPC-2286 Implement `UTCDateTime::toDateTimeImmutable` (#1611)
  PHPC-2414, PHPC-2415: Update wire versions for MongoDB 8.0 compatibility (#1610)
  PHPC-2349, PHPC-2411: Deprecate unused exception classes (#1608)
  Fix failing tests on x86 systems (#1609)
  PHPC-2347: Deprecate BSON functions (#1607)
  PHPC-1489: Deprecate integer readPreference constants (#1604)
  Fix version computation for libmongoc development versions (#1599)
  PHPC-2376: Test against MongoDB 8.0 (#1598)
  PHPC-2254: Relax server selection timeout error message pattern (#1587)
  PHPC-2401: Support QEv2 range protocol (#1583)
  PHPC-2398: Use server_id methods for libmongoc 1.28+ (#1582)
  PHPC-2395: Fetch Atlas connectivity URIs from AWS Secrets Manager (#1579)
  Merge v1.19 into master (#1578)
  Revert "Bump mongodb-labs/drivers-github-tools from 1 to 2 (#1568)" (#1571)
  Bump mongodb-labs/drivers-github-tools from 1 to 2 (#1568)
  ...
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