Skip to content

Improving CI for running tests #322

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 8 commits into from
Feb 2, 2022
Merged

Improving CI for running tests #322

merged 8 commits into from
Feb 2, 2022

Conversation

srprash
Copy link
Contributor

@srprash srprash commented Jan 12, 2022

Issue:
The Python SDK CI which used Travis had been having issues like builds not triggering or getting stuck, etc for a while.

Description of changes:

  • Switching to using GH workflow to run the test suite on PR and push to master
  • Refactored tox.ini to simplify the structure of test suite. Now the tests are split into "core" which tests the main core logic of the SDK, and "ext" which tests all the library instrumentations. Both combinations are run for a set of different python versions (2.7 to 3.9)
  • Some changes worth mentioning:
    • Explicitly decoding the input to json.loads() to UTF-8 because python 3.4 and 3.5 will break the API with following error. Python 3.6+ do this automatically but being explicit doesn't hurt here.
      TypeError: the JSON object must be str, not 'bytes'
      
    • Had to pin pg8000 to v1.20.0 or less as in the newer versions the _server_version attribute on the connection object is not present and the assertion for database_version fails.
  • You can find the sample workflow execution for these changes in my fork: https://github.com/srprash/aws-xray-sdk-python/actions/runs/1689686594
  • Note: I have removed the generation and publishing of code coverage report in this PR as we would mostly need additional logic to combine coverage from "core" and "ext" test runs. This should be a follow up improvement.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@srprash srprash requested a review from a team as a code owner January 12, 2022 21:25
Copy link
Contributor

@NathanielRN NathanielRN left a comment

Choose a reason for hiding this comment

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

Thanks for this change! It's already so so much better, I'm super excited for it 😄

Mostly I have nit comments and suggestions, please let me know what you think!

Copy link
Contributor Author

@srprash srprash left a comment

Choose a reason for hiding this comment

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

Great feedback. Thanks!

@srprash srprash requested a review from NathanielRN January 31, 2022 06:06
Copy link
Contributor

@NathanielRN NathanielRN left a comment

Choose a reason for hiding this comment

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

Thanks so much! Finally CI again! 🎉

@srprash srprash merged commit 1f60cda into aws:master Feb 2, 2022
@srprash srprash deleted the fix_ci branch February 2, 2022 22:37
Hargrav3s pushed a commit to Gavant/aws-xray-sdk-python that referenced this pull request Mar 22, 2022
* Fixing CI

* just keep master branch in the workflow

* Refactors based on PR comments

* tox accepts only 1 dep per line

* fixing some deps

* fixing some deps

* fixing some deps

* pinning pytest-aiohttp dep version
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Jul 2, 2022
…ap reports

* add patch for Django 4.x compatibility
* remove patch for aiobotocore 2.x compatibility - fixed upstream aws/aws-xray-sdk-python#322


git-svn-id: file:///srv/repos/svn-community/svn@1243612 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Jul 2, 2022
…ap reports

* add patch for Django 4.x compatibility
* remove patch for aiobotocore 2.x compatibility - fixed upstream aws/aws-xray-sdk-python#322

git-svn-id: file:///srv/repos/svn-community/svn@1243612 9fca08f4-af9d-4005-b8df-a31f2cc04f65
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