-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Remove pytest fixture and fix test_tag/s method #2109
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
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
The failure from 'sagemaker-python-sdk-pr' tests are resulting from tests/integ/test_multidatamodel.py and is unrelated to the changes made in this pull-request. |
assert len(actual_tags) == 1 | ||
assert actual_tags[0] == tag | ||
|
||
if len(actual_tags) == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make any sense - if the assertion is wrong change the assertion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The assertion is failing because the length of the actual_tags is now 2.
The tag is assigned with tag = {"Key": "foo", "Value": "bar"}
When we pass in the below argument for running integ tests
--sagemaker-client-config {"endpoint_url":"https://api.sagemaker.beta.us-west-2.ml-platform.aws.a2z.com\"}
The length of the actual_tags will become 2 as per function logic in test_tag or test_tags method.
The value in actual_tags is below.
([{'Key': 'foo', 'Value': 'bar'}, {'Key': 'aws:tag:domain', 'Value': 'beta'}])
If we don't pass the sagemaker-client-config and just run the command, it will be hitting prod endpoint directly.
And since addition of sagemaker-client-config argument is optional, I added the if condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still want to make this assertion in beta so remove the if
statement, change to assert len(actual_tags) > 0
, add a comment on this edge case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing.
assert len(actual_tags) == 1 | ||
assert actual_tags == tags | ||
|
||
if len(actual_tags) == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove - why is this assertion failing? find the root cause
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RC described above.. Issue addressed
assert len(actual_tags) == 1 | ||
assert actual_tags[0] == tag | ||
|
||
if len(actual_tags) == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RC described above.. Issue addressed
assert len(actual_tags) == 1 | ||
assert actual_tags == tags | ||
|
||
if len(actual_tags) == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RC described above.. Issue addressed
assert len(actual_tags) == 1 | ||
assert actual_tags[0] == tag | ||
|
||
if len(actual_tags) == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RC described above.. Issue addressed
assert len(actual_tags) == 1 | ||
assert actual_tags == tags | ||
|
||
if len(actual_tags) == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RC described above.. Issue addressed
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
The failure from 'sagemaker-python-sdk-pr' tests are resulting from tests/integ/test_multidatamodel.py and is unrelated to the changes made in this pull-request. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue #, if available: https://sim.amazon.com/issues/AML-106623
Description of changes: Removed pytest fixture in tests/integ/sagemaker/lineage/conftest.py which was overlapping with conftest.py in main and suppressing endpoint param passed via command line.
Also added a condition in test_tag and test_tags method to assert tags only if they aren't provided via command line
Testing done:
tox -e py39 -- tests/integ/sagemaker/lineage --sagemaker-client-config {"endpoint_url":"https://api.sagemaker.beta.us-west-2.ml-platform.aws.a2z.com\"}
tests/integ/sagemaker/lineage/test_action.py ....... [ 25%]
tests/integ/sagemaker/lineage/test_artifact.py ........ [ 53%]
tests/integ/sagemaker/lineage/test_association.py sss [ 64%]
tests/integ/sagemaker/lineage/test_context.py ....... [ 89%]
tests/integ/sagemaker/lineage/test_dataset_artifact.py . [ 92%]
tests/integ/sagemaker/lineage/test_endpoint_context.py . [ 96%]
tests/integ/sagemaker/lineage/test_model_artifact.py . [100%]