Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-139

Refactor validator and inbound repo creation for Namespace

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 4.2.1b2
    • None
    • None
    • None
    • AAH 4.3.0 Sprint 1, AAH 4.3.0 Sprint 2

      Related discussion: https://github.com/ansible/galaxy_ng/pull/562#discussion_r520698907

      Problems:

      • On galaxy_ng/app/api/v3/viewsets/namespace.py there is a `create` method which creates 2 instances (repo and distro) and also validates for IntegrityError expecting error for unique name constraints.
      • The validation there uses a try:except introduced by the PR 562 and this error catching are too general and can lead to exception swallowing if integrity occurs related to a different field.
      • On galaxy_ng/app/api/v3/serializers/namespace.py there is also a `create` method and a `validate_name` which is also performing some creation and validation.

       

      Proposed solutions:

              rochacbruno@redhat.com Bruno Rocha
              rochacbruno@redhat.com Bruno Rocha
              Archiver:
              ranumula@redhat.com Raju Anumula

                Created:
                Updated:
                Resolved:
                Archived: