Skip to content

GitLab: Webhook registration fails with NoReverseMatch in task processor #7345

@sentry

Description

@sentry

Sentry Issue: FLAGSMITH-API-5NA

KeyError: 'api-v1'
  File "django/urls/base.py", line 81, in reverse
    extra, resolver = resolver.namespace_dict[ns]

NoReverseMatch: 'api-v1' is not a registered namespace
(4 additional frame(s) were not displayed)
...
  File "integrations/gitlab/tasks.py", line 42, in register_gitlab_webhook
    ensure_webhook_registered(config, project_path)
  File "integrations/gitlab/services/webhooks.py", line 86, in ensure_webhook_registered
    hook_url=_get_webhook_url(webhook_uuid),
  File "integrations/gitlab/services/webhooks.py", line 24, in _get_webhook_url
    path = reverse("api-v1:gitlab-webhook", kwargs={"webhook_uuid": str(webhook_uuid)})

Failed to execute task 'tasks.register_gitlab_webhook', with id 409951290. Exception: 'api-v1' is not a registered namespace

Metadata

Metadata

Assignees

Labels

apiIssue related to the REST API

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions