Skip to content
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

OperationFailure: not authorized on logs to execute command { createIndexes: "conversations", indexes: [ { key: { s... #8726

Closed
sentry-io bot opened this issue May 20, 2021 · 3 comments · Fixed by #8757
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/tracker-stores Issues focused around the integration of rasa with different tracker stores. effort:atom-squad/1 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. tool:sentry type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.

Comments

@sentry-io
Copy link

sentry-io bot commented May 20, 2021

Sentry Issue: RASA-OPEN-SOURCE-786

OperationFailure: not authorized on logs to execute command { createIndexes: "conversations", indexes: [ { key: { sender_id: 1 }, name: "sender_id_1" } ], lsid: { id: UUID("13ff5029-6135-4385-8e55-fe5b616c34c9") }, $db: "logs", $readPreference: { mode: "primary" } }
(16 additional frame(s) were not displayed)
...
  File "rasa/core/run.py", line 255, in load_agent_on_start
    _tracker_store = TrackerStore.create(endpoints.tracker_store, event_broker=_broker)
  File "rasa/core/tracker_store.py", line 123, in create
    return _create_from_endpoint_config(obj, domain, event_broker)
  File "rasa/core/tracker_store.py", line 1235, in _create_from_endpoint_config
    tracker_store = MongoTrackerStore(
  File "rasa/core/tracker_store.py", line 577, in __init__
    self._ensure_indices()
  File "rasa/core/tracker_store.py", line 586, in _ensure_indices
    self.conversations.create_index("sender_id")

Definition of Done

  • Catch OperationalError during tracker store creation and convert to RasaException
@wochinge wochinge added area:rasa-oss/tracker-stores Issues focused around the integration of rasa with different tracker stores. type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. area:rasa-oss 🎡 Anything related to the open source Rasa framework tool:sentry labels May 20, 2021
@wochinge
Copy link
Contributor

This issue is causing a lot of sentry events and should hence be prioritized

@TyDunn TyDunn added the effort:atom-squad/1 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. label May 21, 2021
@ancalita ancalita self-assigned this May 24, 2021
@ancalita
Copy link
Member

@wochinge quick q: if this OperationFailure exception is caught during tracker-store creation, the exception that gets raised is a subclass of RasaException, i.e. ConnectionException - is that ok?

Otherwise since it's a PyMongo exception, it can also be caught here and re-raised as RasaException. Please let me know which approach is better.

@wochinge
Copy link
Contributor

I think for the sake of a more detailed error message I'd slightly prefer option 2). Also ensure_indices is very particular for the MongoTrackerStore (unlike errors during connecting). Hence it makes probably sense dealing with it within MongoTrackerStore to avoid leaking that into other parts of the codebase.

@ancalita ancalita mentioned this issue May 27, 2021
4 tasks
@ancalita ancalita linked a pull request May 27, 2021 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/tracker-stores Issues focused around the integration of rasa with different tracker stores. effort:atom-squad/1 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. tool:sentry type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants