Bug 1295878 - Copr API - upload error
Summary: Copr API - upload error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Copr
Classification: Community
Component: frontend
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-05 16:33 UTC by Athos Ribeiro
Modified: 2016-01-05 21:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-05 21:33:23 UTC
Embargoed:


Attachments (Terms of Use)
patch to fix API uploads (1.28 KB, application/mbox)
2016-01-05 16:33 UTC, Athos Ribeiro
no flags Details
patch to fix API uploads (1.75 KB, patch)
2016-01-05 20:04 UTC, Athos Ribeiro
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1295915 0 unspecified CLOSED Copr: 'module' object has no attribute 'BuildFormFactory' 2021-02-22 00:41:40 UTC

Internal Links: 1295915

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.


Note You need to log in before you can comment on or make changes to this bug.