Comments (3)
Works correctly after I updated my tree.
from drivers-atlas-testing.
Instead of always including the full response by default, I have added the ability to see this output at an elevated logging level. I have also added a brief documentation note on how to use logging levels: https://mongodb-labs.github.io/drivers-atlas-testing/installing-running-locally.html#debugging
Just use the 'debug' logging level and you will see the full request and response. For example:
$ astrolabe --log-level DEBUG projects get-one --group-name x1
DEBUG:astrolabe.cli:Atlas Client Configuration:
====================== ===================================
Configuration option Value
====================== ===================================
Atlas API base URL https://cloud.mongodb.com/api/atlas
HTTP timeout (s) 10.0
====================== ===================================
DEBUG:atlasclient.client:Request (GET https://cloud.mongodb.com/api/atlas/v1.0/groups/byName/x1 {'auth': <requests.auth.HTTPDigestAuth object at 0x106caffd0>, 'params': {}, 'json': {}, 'timeout': 10.0})
DEBUG:atlasclient.client:Response (GET {'detail': 'The current user is not in the group, or the group does not exist.', 'error': 401, 'errorCode': 'NOT_IN_GROUP', 'parameters': [], 'reason': 'Unauthorized'})
Traceback (most recent call last):
File "/Users/pmital/.pyenv/versions/3.7.5/envs/atlastesting/bin/astrolabe", line 11, in <module>
load_entry_point('astrolabe', 'console_scripts', 'astrolabe')()
File "/Users/pmital/.pyenv/versions/3.7.5/envs/atlastesting/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/pmital/.pyenv/versions/3.7.5/envs/atlastesting/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/pmital/.pyenv/versions/3.7.5/envs/atlastesting/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/pmital/.pyenv/versions/3.7.5/envs/atlastesting/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/pmital/.pyenv/versions/3.7.5/envs/atlastesting/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/pmital/.pyenv/versions/3.7.5/envs/atlastesting/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/Users/pmital/.pyenv/versions/3.7.5/envs/atlastesting/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/pmital/Developer/drivers-atlas-testing/astrolabe/cli.py", line 204, in get_one_project_by_name
pprint(ctx.obj.groups.byName[group_name].get().data)
File "/Users/pmital/Developer/drivers-atlas-testing/atlasclient/client.py", line 56, in get
return self._client.request('GET', self._path, **params)
File "/Users/pmital/Developer/drivers-atlas-testing/atlasclient/client.py", line 221, in request
return self.handle_response(method, response)
File "/Users/pmital/Developer/drivers-atlas-testing/atlasclient/client.py", line 258, in handle_response
raise AtlasAuthenticationError('401: Unauthorized.', **kwargs)
atlasclient.exceptions.AtlasAuthenticationError: 401: Unauthorized. Error Code: 'NOT_IN_GROUP' (GET https://cloud.mongodb.com/api/atlas/v1.0/groups/byName/x1)
from drivers-atlas-testing.
The complete response is not provided. Example: https://gist.github.com/p-mongo/6711c5f08e2926b3cd4ab825876e828b
I have a patch as follows that I am using:
carbon% git diff diff --git a/atlasclient/client.py b/atlasclient/client.py index d0d8a09..01a9d6a 100644 --- a/atlasclient/client.py +++ b/atlasclient/client.py @@ -257,5 +257,6 @@ class AtlasClient: if response.status_code == 409: raise AtlasApiError('409: Conflict.', **kwargs) + print(response.content) raise AtlasApiError('{}: Unknown.'.format(response.status_code), **kwargs)
This patch produces the following line in the linked gist:
b'{"detail":"Unexpected error.","error":500,"errorCode":"UNEXPECTED_ERROR","parameters":[],"reason":"Internal Server Error"}'
The remainder of the gist (which is output produced by unpatched astrolabe) does not include the "reason":"Internal Server Error"
part.
from drivers-atlas-testing.
Related Issues (20)
- Consider defining the driver workload in its own file
- Implement Poller that retries endpoints when encountering some pre-specified Atlas API errors
- Fail the whole test run if the preparation steps failed
- Investigate why Atlas Group retrieval fails for some groups HOT 2
- Migrate to ubuntu1804-drivers-atlas-testing
- Workload executor validation evergreen task
- Add documentation for workload executor validation
- Support for workload executors that take a long time to start up
- Prepend environment variables used by astrolabe with ASTROLABE_*
- Only inject certifi certificates on Windows if using TLS HOT 2
- Astrolabe attempts reading the sentinel file before it is written on Windows HOT 1
- Add alternative mechanism to signals for stopping workload executors HOT 5
- Use Atlas test cluster to synchronize operations between astrolabe and workload executors
- Workaround hitting rate limits while polling Atlas API endpoints HOT 1
- Make validation a bit more forgiving HOT 1
- Bash scripts wrapping native workload executors need not run them as background processes
- Document that workload executors MUST ignore the testData key in the workload executor spec
- Astrolabe does not stop when cluster creation fails HOT 2
- Use cloud-dev Atlas for running Evergreen against drivers-atlas-testing HOT 1
- Migrate to using IP Access List endpoints
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drivers-atlas-testing.