Closed eugeneteoh closed 2 years ago
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 7 days it will automatically be closed.
I think maybe we can import it from where we add those tasks. PR will be raised.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
I encountered an error when trying to use the GraphQL query,
getSqlPipelineFileContent
.How to Reproduce
Expected behavior
I digged deeper and found that the CodeCommit handler under
backend/dataall/aws/handlers/codecommit.py
was not registered toself.handlers
underservice_handlers.WorkerHandler
. This is becausecodecommit.py
is not reference anywhere else in the code, hence the decorator@Worker.handler
is not executed at runtime. I attempted to printself.handlers
and this is the output:As you can see, the handlers in these files are not registered:
codecommit.py, sns.py, sqs.py
Your project
No response
Screenshots
No response
OS
Mac
Python version
Python 3.8
AWS data.all version
-
Additional context
Quick Fix
I came up with a quick fix which is to add
from . import codecommit
tobackend/dataall/aws/handlers/__init__.py
. This is so that the file will be reference and compiled, so that the decorator@Worker.handler
is executed. This is not the most elegant solution but I cannot think of a better solution at the moment.