-
Notifications
You must be signed in to change notification settings - Fork 1
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
Activity provider registration schema failure #65
Comments
Here's the schema that I see the code is using (activity_data_provider_registration.py): { This is definitely not what is in the database. |
The correct schema (the one emitted by the data model) does work: { Thus, it looks like the issue is that the collection is being created with the wrong schema. |
So, this relates to the move to push activity data handling into the "activity" sub-module. This was using the older data definition. To "fix this" Indaleko.py needs to reference the correct data model and return the correct schema. In addition, the code that is still at top level is deprecated and should be removed, to avoid any additional confusion. For a "small bug" this is an extensive change. |
Addressed quite a few issues in commit 2e2f3bd. Decided to check in these changes (preliminarily) because I have to reset the database and ensure the schema are being properly built to confirm the work is complete. Unfortunately, it is not. Traceback (most recent call last): To produce this, I ran the windows gps location activity data tool, which caused creation of the collections, indices, and schema needed. The service registration collection is not being created correctly because there is something wrong with the schema. Thus, the original issue (which was schema rejection and identification it was incorrect) has not materially changed, but the manifestation is different. |
Actually, it's not the services collection. There was more debug output earlier in the display: ERROR:root:Failed to configure collection ActivityDataProviders This would not be from the original issue, but instead is likely related to the extensive set of changes I introduced to "clean things up". |
…ired. Will confirm and update further, if needed.
Hopefully the last round of changes. Commit 4285f60 includes a shift to using a pydantic datatype that requires a timezone indicator. THAT was the reason that service registration stopped working. |
Traceback (most recent call last):
File "C:\Users\TonyMason\source\repos\indaleko\activity\collectors\location\windows_gps_location.py", line 188, in
main()
File "C:\Users\TonyMason\source\repos\indaleko\activity\collectors\location\windows_gps_location.py", line 180, in main
collector = WindowsGPSLocationCollector()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TonyMason\source\repos\indaleko\activity\collectors\location\windows_gps_location.py", line 97, in init
provider_data, collection = self.provider_registrar.register_provider(**record_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TonyMason\source\repos\indaleko\activity\provider_registration_service.py", line 261, in register_provider
insert(json.dumps(activity_registration_data, default=str))
File "C:\Users\TonyMason\source\repos\indaleko\IndalekoCollection.py", line 123, in insert
return self.collection.insert(document, overwrite=overwrite)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TonyMason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\arango\collection.py", line 2615, in insert
return self._execute(request, response_handler)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TonyMason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\arango\api.py", line 74, in _execute
return self._executor.execute(request, response_handler)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TonyMason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\arango\executor.py", line 66, in execute
return response_handler(resp)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TonyMason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\arango\collection.py", line 2605, in response_handler
raise DocumentInsertError(resp, request)
arango.exceptions.DocumentInsertError: [HTTP 400][ERR 1620] schema validation failed
As I recall, there's an issue with the schema that gets written into the services collection. This should be resolved so the schema is correctly configured.
The text was updated successfully, but these errors were encountered: