Skip to content

PYTHON-3088 [v3.13] Update load balancer tests to support dedicated load balancer port #870

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 14 commits into from
Feb 17, 2022

Conversation

juliusgeo
Copy link
Contributor

PYTHON-3088 Update load balancer tests to support dedicated load balancer port (#866)

(cherry picked from commit 341d489)

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -1770,8 +1772,12 @@ tasks:
commands:
- func: "bootstrap mongo-orchestration"
vars:
VERSION: "latest"
Copy link
Member

@ShaneHarvey ShaneHarvey Feb 15, 2022

Choose a reason for hiding this comment

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

VERSION should not be here. The VERSION gets set in the matrix here:

- matrix_name: "load-balancer"
  matrix_spec:
    platform: ubuntu-18.04
    mongodb-version: ["5.0", "latest"]   <---------- VERSION set here
    auth-ssl: "*"
 ...

We'll need to fix this in master and v4.0 as well.

Copy link
Member

@ShaneHarvey ShaneHarvey Feb 15, 2022

Choose a reason for hiding this comment

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

We also need to change "5.0" to "rapid". We can no longer test load-balancer support against 5.0. The only reason the test passed is because the above bug makes it so that the "5.0" test are actually using "latest".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

pymongo/pool.py Outdated
if self.opts.load_balanced and _MOCK_SERVICE_ID:
process_id = doc.get('topologyVersion', {}).get('processId')
doc.setdefault('serviceId', process_id)
doc = self.command("admin", cmd, publish_events=False, exhaust_allowed=awaitable)
if not self.opts.load_balanced:
doc.pop('serviceId', None)
Copy link
Member

Choose a reason for hiding this comment

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

Should this be removed now too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. And removed another occurrence.

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

Is this PR supposed to be merging into the v3.12 branch or v3.13? The title says v3.13 but the branch is v3.12

@juliusgeo juliusgeo changed the base branch from v3.12 to v3.13 February 16, 2022 21:55
Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

Oh I see, we still need to add "rapid" as a choice for the "mongodb-version" axes.

- func: "run load-balancer"
vars:
LOAD_BALANCER: true
Copy link
Member

Choose a reason for hiding this comment

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

I don't think vars/LOAD_BALANCER is needed for "run load-balancer".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

@ShaneHarvey ShaneHarvey Feb 16, 2022

Choose a reason for hiding this comment

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

LOAD_BALANCER is not needed for "run tests" either is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The ticket states

Drivers must set the LOAD_BALANCER environment variable to "true" in their load balancer test runs and pass the environment variable when invoking run-orchestration.sh.

Which I interpreted as requiring us to set it to true for the test run as well.

Copy link
Member

Choose a reason for hiding this comment

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

LOAD_BALANCER is only needed for run-orchestration.sh. Let's remove it here. Note we can also remove the export LOAD_BALANCER=1 line above.

- func: "run load-balancer"
vars:
LOAD_BALANCER: true
Copy link
Member

@ShaneHarvey ShaneHarvey Feb 16, 2022

Choose a reason for hiding this comment

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

LOAD_BALANCER is not needed for "run tests" either is it?

- func: "run load-balancer"
vars:
LOAD_BALANCER: true
Copy link
Member

Choose a reason for hiding this comment

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

LOAD_BALANCER is only needed for run-orchestration.sh. Let's remove it here. Note we can also remove the export LOAD_BALANCER=1 line above.

@juliusgeo juliusgeo merged commit 1443d76 into mongodb:v3.13 Feb 17, 2022
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Feb 17, 2022
…oad balancer port (mongodb#870)

PYTHON-3088 Update load balancer tests to support dedicated load balancer port (mongodb#866)

(cherry picked from commit 341d489)
(cherry picked from commit 1443d76)
juliusgeo added a commit that referenced this pull request Feb 18, 2022
PYTHON-3088 [v3.13] Update load balancer tests to support dedicated load balancer port (#870)

(cherry picked from commit 1443d76)
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Feb 22, 2022
juliusgeo added a commit that referenced this pull request Feb 22, 2022
PYTHON-3088 [v3.13] Update load balancer tests to support dedicated load balancer port (#870)

(cherry picked from commit 341d489)
blink1073 pushed a commit to blink1073/mongo-python-driver that referenced this pull request Feb 25, 2022
PYTHON-3088 [v3.13] Update load balancer tests to support dedicated load balancer port (mongodb#870)

(cherry picked from commit 341d489)
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Apr 5, 2022
PYTHON-3088 [v3.13] Update load balancer tests to support dedicated load balancer port (mongodb#870)

(cherry picked from commit 341d489)
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Apr 7, 2022
PYTHON-3088 [v3.13] Update load balancer tests to support dedicated load balancer port (mongodb#870)

(cherry picked from commit 341d489)
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