Skip to content
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

AioStubber that returns AioAWSResponse() #1039

Merged
merged 7 commits into from
Oct 20, 2023
Merged

Conversation

takeda
Copy link
Contributor

@takeda takeda commented Sep 7, 2023

Description of Change

Adding AioStubber to provide async version (responding with AioAWSResponse()) of Stubber.

Hopefully solving issue raised in #939

Checklist for All Submissions

  • I have added change info to CHANGES.rst
  • If this is resolving an issue (needed so future developers can determine if change is still necessary and under what conditions) (can be provided via link to issue with these details):
    • Detailed description of issue
    • Alternative methods considered (if any)
    • How issue is being resolved
    • How issue can be reproduced
  • If this is providing a new feature (can be provided via link to issue with these details):
    • Detailed description of new feature
    • Why needed
    • Alternatives methods considered (if any)

Checklist when updating botocore and/or aiohttp versions

  • I have read and followed CONTRIBUTING.rst
  • I have updated test_patches.py where/if appropriate (also check if no changes necessary)
  • I have ensured that the awscli/boto3 versions match the updated botocore version

Copy link
Collaborator

@thehesiod thehesiod left a comment

Choose a reason for hiding this comment

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

need to add entry to test_patches

@takeda
Copy link
Contributor Author

takeda commented Sep 8, 2023

@thehesiod updated

@thehesiod thehesiod enabled auto-merge (squash) September 8, 2023 20:13
auto-merge was automatically disabled September 8, 2023 22:33

Head branch was pushed to by a user without write access

@takeda
Copy link
Contributor Author

takeda commented Sep 8, 2023

@thehesiod I just realized that the CI tasks expect version to be provided, I did not do it because I thought that will be done after the PR is merged. I just updated the PR to include a version.

@takeda
Copy link
Contributor Author

takeda commented Sep 11, 2023

@thehesiod please run it again

@takeda
Copy link
Contributor Author

takeda commented Sep 11, 2023

@thehesiod I fixed the formatting and flake8 now doesn't report issues.

@takeda
Copy link
Contributor Author

takeda commented Sep 12, 2023

sigh I wonder what will fail this time

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #1039 (b174eac) into master (9c6db8a) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1039      +/-   ##
==========================================
+ Coverage   86.23%   86.38%   +0.14%     
==========================================
  Files          58       60       +2     
  Lines        5740     5803      +63     
==========================================
+ Hits         4950     5013      +63     
  Misses        790      790              
Flag Coverage Δ
unittests 86.38% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
aiobotocore/stub.py 100.00% <100.00%> (ø)
tests/test_patches.py 95.91% <100.00%> (ø)
tests/test_stubber.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@takeda takeda force-pushed the aiostubber branch 2 times, most recently from 313caae to 3092a69 Compare October 6, 2023 00:12
@takeda
Copy link
Contributor Author

takeda commented Oct 6, 2023

@thehesiod sorry for delay, but I had other things I needed to finish. I added some unit tests now.

@takeda takeda requested a review from thehesiod October 6, 2023 03:59
aiobotocore/__init__.py Outdated Show resolved Hide resolved
@takeda takeda requested a review from thehesiod October 6, 2023 23:51
@takeda
Copy link
Contributor Author

takeda commented Oct 9, 2023

@thehesiod can you run the pipeline again?

@takeda
Copy link
Contributor Author

takeda commented Oct 19, 2023

@thehesiod I rebased the PR due to another PR that was merged recently

@thehesiod thehesiod enabled auto-merge (squash) October 19, 2023 20:58
@thehesiod
Copy link
Collaborator

whoops, forgot about this pr, thanks

@takeda
Copy link
Contributor Author

takeda commented Oct 19, 2023

@thehesiod I see it failed, but it looks like it was during uploading the results to codecov?

@takeda
Copy link
Contributor Author

takeda commented Oct 19, 2023

The codecov still makes nos sense, coverage told me the coverage is 100%, looking at codecov I see for example this (line 15):

https://github.com/aio-libs/aiobotocore/pull/1039/files#annotation_15037531067

But that line is always executed, so I don't see how it wouldn't be covered.

@thehesiod
Copy link
Collaborator

The codecov still makes nos sense, coverage told me the coverage is 100%, looking at codecov I see for example this (line 15):

https://github.com/aio-libs/aiobotocore/pull/1039/files#annotation_15037531067

But that line is always executed, so I don't see how it wouldn't be covered.

you need to add the moto marker to your tests, we only run things marked with moto. what would be better going forward is instead having a marker for tests that require a real AWS account, and then exclude those if you want to attempt that. This has bit us a couple times with new contributors.

@thehesiod
Copy link
Collaborator

looks like you can do this with pytest -m "not MARKER"

auto-merge was automatically disabled October 19, 2023 23:41

Head branch was pushed to by a user without write access

@takeda
Copy link
Contributor Author

takeda commented Oct 19, 2023

@thehesiod I added the marker, I didn't use it, since stubber overlaps with functionality so I felt it was redundant.

@thehesiod thehesiod merged commit b06b958 into aio-libs:master Oct 20, 2023
11 checks passed
@takeda takeda deleted the aiostubber branch October 20, 2023 00:25
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