Bug 1295878

Summary: Copr API - upload error
Product: [Community] Copr Reporter: Athos Ribeiro <athoscribeiro>
Component: frontendAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: lantw44, pahan, tom.prince
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-05 21:33:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
patch to fix API uploads
none
patch to fix API uploads none

Description Athos Ribeiro 2016-01-05 16:33:27 UTC
Created attachment 1111910 [details]
patch to fix API uploads

Description of problem:

While uploading packages with copr-cli we get the following error:
  Error 500 : Internal Server Error
  type object 'BuildFormUploadFactory' has no attribute 'create_form_cls' 

While debugging the problem, we found out that there was some refactoring in commit "4b1ec255" (https://git.fedorahosted.org/cgit/copr.git):

Now, the Class BuildFormUpladFactory returns the form, and no longer has a method named create_form_cls.

Attached is a patch with a fix.


Version-Release number of selected component (if applicable):

Branch master

How reproducible:

Upload a SRPM to copr using copr-cli

Steps to Reproduce:
1. `copr-cli build username/repository local_SRPM`


Actual results:

Error 500 : Internal Server Error
type object 'BuildFormUploadFactory' has no attribute 'create_form_cls'

and no builds triggered

Expected results:

SRPM is uploaded and build is triggered

Additional info:

patch attached

Comment 1 Athos Ribeiro 2016-01-05 20:04:58 UTC
Created attachment 1111929 [details]
patch to fix API uploads

Amended another commit to fix bug #1295915 (https://bugzilla.redhat.com/show_bug.cgi?id=1295915)

Comment 2 Miroslav Suchý 2016-01-05 21:33:23 UTC
Applied as
  * ed605c2 Fix API uploads after frontend refactoring
and deployed in production.
Thank you for contribution.