#66 Use FASJSON client in the bugzilla script
Merged 2 years ago by humaton. Opened 2 years ago by humaton.
humaton/fedscm-admin use_fasjson  into  main

file modified
+1 -1
@@ -2,5 +2,5 @@ 

  pagure_url = https://pagure.io

  pagure_dist_git_url = https://src.fedoraproject.org

  pdc_url = https://pdc.fedoraproject.org

- fasjson = False

+ fasjson = True

  fasjson_url = https://fasjson.fedoraproject.org/ 

\ No newline at end of file

file modified
+5 -7
@@ -192,15 +192,13 @@ 

                          raise ValidationError(error)

  

                      assigned_to_emails = [bug.assigned_to]

-                     if bug.assigned_to in FAS_CLIENT.client.\

-                             _AccountSystem__alternate_email:

-                         assigned_to_id = FAS_CLIENT.client.\

-                             _AccountSystem__alternate_email[bug.assigned_to]

-                         assigned_to_user = FAS_CLIENT.get_fas_user_by_id(

-                             assigned_to_id)

+ 

+                     if FAS_CLIENT.get_fas_user(bug.assigned_to):

+                         assigned_to_id = FAS_CLIENT.get_fas_user(bug.assigned_to)

+                         assigned_to_user = FAS_CLIENT.get_fas_user_by_id(assigned_to_id)

                          if assigned_to_user:

                              assigned_to_emails.append(

-                                 assigned_to_user['email'])

+                                 assigned_to_user)

                      if flag['setter'] not in assigned_to_emails:

                          raise ValidationError('The review is not approved by '

                                                'the assignee of the Bugzilla '

file modified
-1
@@ -39,7 +39,6 @@ 

              except fasjson_client.errors.ClientSetupError:

                  raise ClickException('Failed to create fasjson_client.')

          else:

-             self.client = AccountSystem('https://admin.fedoraproject.org/accounts')

              self.unauthenticated_error = (

                  'The FAS Client is not authenticated. Please make sure you typed '

                  'in the correct credentials.')

file modified
+1 -1
@@ -20,5 +20,5 @@ 

      packages=['fedscm_admin'],

      package_dir={'fedscm_admin': 'fedscm_admin'},

      url='https://pagure.io/fedscm_admin',

-     version='1.1.0',

+     version='1.1.1',

  )

file modified
+1 -1
@@ -5,5 +5,5 @@ 

  pdc_api_token = 1234

  pagure_ticket_api_token = 1234

  pagure_api_token = 1234

- fasjson = False

+ fasjson = True

  fasjson_url = https://fasjson.stg.fedoraproject.org/

New release 1.1.1

Use fasjson api by default

Signed-off-by: Tomas Hrcka thrcka@redhat.com

rebased onto e7151a7

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

  • tox : FAILURE in 4m 57s

1 new commit added

  • Enable FASJSON in tests
2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

  • tox : FAILURE in 6m 09s

Any chance to get an update on this?
I've tried to run the tests locally but I keep having an error regarding staging Kerberos.

Also for this to pass Flake8, you need to change line 21 of fedscm_admin/fas.py to:

from fedora.client import AuthError

because AccountSystem is not used anymore.

rebased onto 5057d3d

2 years ago

Pull-Request has been merged by humaton

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

  • tox : FAILURE in 5m 12s