Created
July 16, 2024 19:33
-
-
Save ddfont/fe17e95d6a248e73c8ab3053a1662043 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(.venv) (base) victor.d@H457W9NM4K supply-planning-service % make integration-test | |
uvicorn app.main:app --port 8080 --reload & sleep 5 && curl "http://127.0.0.1:8080/api/run_scenario?scenario_id=980397706883465218&s3_file_url=2024-07-15/980397706883465218/adjustments.csv" | |
INFO: Will watch for changes in these directories: ['/Users/victor.d/Projects/supply-planning-service'] | |
INFO: Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit) | |
INFO: Started reloader process [60593] using statreload | |
Unable to find secrets file at path: /vault/secrets/secrets.json | |
Unable to read secret ENVIRONMENT loaded from file, falling back to the environment | |
Unable to read secret NUM_THREADS loaded from file, falling back to the environment | |
Unable to read secret KAFKA_TOPIC loaded from file, falling back to the environment | |
Unable to read secret KAFKA_USERNAME loaded from file, falling back to the environment | |
Unable to read secret KAFKA_PASSWORD loaded from file, falling back to the environment | |
Unable to read secret DV_API_KEY loaded from file, falling back to the environment | |
INFO: Started server process [60596] | |
INFO: Waiting for application startup. | |
INFO: Application startup complete. | |
2024-07-16 12:23.55 [info ] Consumer started for supply-planning-service__scenario-queue | |
2024-07-16 12:24.00 [info ] Running scenario 980397706883465218 2024-07-15/980397706883465218/adjustments.csv None None | |
2024-07-16 12:24.00 [info ] Reading from s3: 2024-07-15/base_inputs.pkl | |
INFO: 127.0.0.1:62535 - "GET /api/run_scenario?scenario_id=980397706883465218&s3_file_url=2024-07-15/980397706883465218/adjustments.csv HTTP/1.1" 500 Internal Server Error | |
Internal Server ErrorERROR: Exception in ASGI application | |
Traceback (most recent call last): | |
File "/Users/victor.d/Projects/supply-planning-service/./app/api/api.py", line 32, in read_from_s3 | |
return supply_planning_s3.get_object(bucket=Bucket.SUPPLY_PLANNING_SERVICE_PROD, key=s3_url) | |
File "/Users/victor.d/Projects/supply-planning-service/./app/services/aws.py", line 133, in get_object | |
return self.client.get_object(Bucket=bucket.value, Key=key) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/botocore/client.py", line 391, in _api_call | |
return self._make_api_call(operation_name, kwargs) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/botocore/client.py", line 719, in _make_api_call | |
raise error_class(parsed_response, operation_name) | |
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the GetObject operation: Access Denied | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi | |
result = await app(self.scope, self.receive, self.send) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ | |
return await self.app(scope, receive, send) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/fastapi/applications.py", line 208, in __call__ | |
await super().__call__(scope, receive, send) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/starlette/applications.py", line 112, in __call__ | |
await self.middleware_stack(scope, receive, send) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__ | |
raise exc | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__ | |
await self.app(scope, receive, _send) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__ | |
raise exc | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__ | |
await self.app(scope, receive, sender) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/starlette/routing.py", line 656, in __call__ | |
await route.handle(scope, receive, send) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/starlette/routing.py", line 259, in handle | |
await self.app(scope, receive, send) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/starlette/routing.py", line 61, in app | |
response = await func(request) | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/fastapi/routing.py", line 226, in app | |
raw_response = await run_endpoint_function( | |
File "/Users/victor.d/Projects/supply-planning-service/.venv/lib/python3.8/site-packages/fastapi/routing.py", line 159, in run_endpoint_function | |
return await dependant.call(**values) | |
File "/Users/victor.d/Projects/supply-planning-service/./app/api/api.py", line 112, in run_scenario | |
run_scenario_impl(scenario_id, s3_file_url, active_week, submarket_list) | |
File "/Users/victor.d/Projects/supply-planning-service/./app/api/api.py", line 84, in run_scenario_impl | |
s3_inputs_obj = read_from_s3(s3_inputs_path) | |
File "/Users/victor.d/Projects/supply-planning-service/./app/api/api.py", line 34, in read_from_s3 | |
raise S3ReadError(s3_url, str(e)) | |
app.util.errors.S3ReadError: Error reading from S3: 2024-07-15/base_inputs.pkl -- An error occurred (AccessDenied) when calling the GetObject operation: Access Denied |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment