-
Notifications
You must be signed in to change notification settings - Fork 188
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
DynamoDB support #297
DynamoDB support #297
Conversation
…plement a service for this.
…plement a service for this.
I'm getting an AttributeError, not sure why - region_name = self.conn._client_config.region_name |
awslimitchecker/services/dynamodb.py
Outdated
:returns: dict of limit names to :py:class:`~.AwsLimit` objects | ||
:rtype: dict | ||
""" | ||
region_name = self.conn._client_config.region_name |
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.
You need a call to self.connect()
before this line.
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.
that's exactly what I did
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.
Ok. Can you then try to post the full traceback, and debug-level output?
Sorry I haven't had a chance to look at this yet, it might be another day or two before I can. That AttributeError is also causing the unit tests to fail. The AttributeError is because |
adding a self.connect() in get_limits() still gives me the same Error. |
@saratlingamarla I should have some time in the next few days to finally work on the next release. It's up to you if you'd like me to assist with this PR however I can, or just pick it up where it is right now and finish it up myself. If you'd like some help debugging the AttributeError, please (1) make sure the code pushed up in your branch is updated with what you're running, and (2) paste the full debug-level ( |
Fixing an AttributeError
@jantman please take a look at the full debug level output :
|
Ok, it took me a while to figure out exactly what was going on here. This is the only service that has per-region limits, so this is the only service that's calling In awslimitchecker/services/base.py init() you'll need to switch lines 103-4 and 105-6 around so that self.limits = {}
self.limits = self.get_limits()
self.conn = None
self.resource_conn = None to: self.conn = None
self.resource_conn = None
self.limits = {}
self.limits = self.get_limits() That should at least get the code executing. |
debug output - (awslimitchecker) sarat@sarat-Inspiron-3542:~/Desktop/awslimitchecker$ awslimitchecker -vv |
Ok, thanks. That looks better. Do you think you could run it so the code actually executes, i.e. with your AWS credentials set in the environment? I assume if you're writing this for your own need, you'd want to know that the limit and usage information is accurate... |
Yes, sorry about the delay, I verified the usages and they look right: (awslimitchecker) sarat@sarat-Inspiron-3542:~/Desktop/awslimitchecker$ awslimitchecker -u |
Ok, thanks so much for this! I'm going to be working on finishing up the tests for this either today or tomorrow; when I do, I'll push the fixed tests to your branch and then merge this. |
Codecov Report
@@ Coverage Diff @@
## develop #297 +/- ##
======================================
Coverage 100% 100%
======================================
Files 25 26 +1
Lines 1901 1970 +69
Branches 293 298 +5
======================================
+ Hits 1901 1970 +69
Continue to review full report at Codecov.
|
Before submitting pull requests, please see the
Development documentation
and specifically the Pull Request Guidelines.
IMPORTANT: Please take note of the below checklist, especially the first two items.
Pull Request Checklist
writing tests for the code, feel free to ask for help or submit the PR without tests.
tox -e docs
connect()
andconnect_resource()
methods, inherited fromawslimitchecker.connectable.Connectable
if you're working on a GitHub issue (i.e. "issue #x - "). Please
refrain from using the "fixes #x" notation unless you are sure that the
the issue is fixed in that commit.
Contributor License Agreement
By submitting this work for inclusion in awslimitchecker, I agree to the following terms:
is being made under the same license as the awslimitchecker project (the Affero GPL v3,
or any subsequent version of that license if adopted by awslimitchecker).
this pull request grants a perpetual, global, unlimited license for it to be used and distributed
under the terms of awslimitchecker's license.