Skip to content

Conversation

@blink1073
Copy link
Member

@blink1073 blink1073 marked this pull request as ready for review September 28, 2022 21:38

@unittest.skipIf(not os.getenv("TEST_FLE_GCP_AUTO"), "Not testing FLE GCP auto")
def test_01_failure(self):
if os.getenv("SUCCESS"):
Copy link
Member

Choose a reason for hiding this comment

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

os.getenv("SUCCESS"): is always True so we'll always skip this test.

Copy link
Member Author

Choose a reason for hiding this comment

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

SUCCESS=false in the testgcpkms-fail-task

Copy link
Member

Choose a reason for hiding this comment

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

Yes but the string "false" is still truthy.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, fixed

export GCPKMS_PROJECT=${GCPKMS_PROJECT}
export GCPKMS_ZONE=${GCPKMS_ZONE}
export GCPKMS_INSTANCENAME=${GCPKMS_INSTANCENAME}
tar czf /tmp/mongo-python-driver.tgz .
Copy link
Member

Choose a reason for hiding this comment

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

Are any of these variables sensitive info?

Copy link
Member Author

Choose a reason for hiding this comment

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

Confirmed not to be sensitive

@blink1073 blink1073 requested a review from ShaneHarvey October 6, 2022 18:05
git clone https://github.com/blink1073/libmongocrypt.git libmongocrypt_git
pushd libmongocrypt_git
git checkout PYTHON-3367
popd
Copy link
Member

Choose a reason for hiding this comment

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

No longer needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is still needed until we make a new release of pymongocrypt.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

TEST_FLE_GCP_AUTO=1 $PYTHON test/test_on_demand_csfle.py
}

PYTHON="python3" authtest
Copy link
Member

Choose a reason for hiding this comment

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

What's the plan for testing other python versions?

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 test multiple versions on ECS

Copy link
Member

Choose a reason for hiding this comment

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

Oh right I forgot this was running on a remote host.

@blink1073 blink1073 requested a review from ShaneHarvey October 20, 2022 20:22

@unittest.skipIf(not os.getenv("TEST_FLE_GCP_AUTO"), "Not testing FLE GCP auto")
def test_01_failure(self):
if os.getenv("SUCCESS", "").lower() == "true":
Copy link
Member

Choose a reason for hiding this comment

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

Let's make SUCCESS required to be present in the env to avoid unintentionally always skipping both these tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

$PYTHON -m pip install --upgrade wheel setuptools pip
$PYTHON -m pip install '.[encryption]'
$PYTHON -m pip install https://github.com/mongodb/libmongocrypt#subdirectory=bindings/python
TEST_FLE_GCP_AUTO=1 $PYTHON test/test_on_demand_csfle.py
Copy link
Member

Choose a reason for hiding this comment

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

Does this need SUCCESS=true?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is passed in from the evergreen config.

@blink1073 blink1073 requested a review from ShaneHarvey October 20, 2022 21:50
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.

LGTM after the Copyright year fix

@@ -0,0 +1,67 @@
# Copyright 2019-2022 MongoDB, Inc.
Copy link
Member

Choose a reason for hiding this comment

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

2019-2022 -> "2022-present"

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@blink1073 blink1073 merged commit 84fbc1f into mongodb:master Oct 21, 2022
@blink1073 blink1073 deleted the PYTHON-3367 branch October 21, 2022 10:22
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