patchGNU Octave - Patches: patch #8363, Agora Patch For Bundle Upload

 
 

patch #8363: Agora Patch For Bundle Upload

Submitter:  Palash <oswalpalash>
Submitted:  Wed 26 Feb 2014 06:42:43 PM UTC
   
 
Category:  None Priority:  4
Status:  Invalid Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 12 Mar 2014 03:35:53 PM UTC, comment #7: 

That was a bit too harsh, and I regret being so mean. Sorry I invite you to take this opportunity to explain yourself. Perhaps this is just a misunderstanding.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 12 Mar 2014 02:11:13 PM UTC, comment #6: 

I am sorry to say this, and I don't know how to say this in a nicer way, so I won't be nice: this patch is sheer nonsense, unless I'm much mistaken. I'm trying to be charitable and figure out how could you possibly think that this patch is correct, but it seems to me that either you fail to grasp the most basic fundamental concepts of Python and Django programming or else I do.

You first left in the patch the os.chmod call which is what this patch was explicitly supposed to not do. Then you imported the tempfile module, which has mkdtemp as a member, but you never call tempfile.mkdtemp, but instead you seem to think that it should be a member function of a Bundle object. But even if there were some deep Django magic that monkeypatched Bundle objects by giving them all functions of all modules that you imported as member functions, You furthermore only patch this in the views.py file, completely neglecting to patch the corresponding calls to Bundle.get_temp_path in tasks.py. Fine, this could be an oversight, but the easier thing to do would be to modify the function Bundle.get_temp_path instead of its calling locations. Finally, at no point do you handle the the cleanup of the temporary directories that each invocation of tempfile.mkdtemp makes.

Worst of all, you never admitted any ignorance in any of the things you were doing. It's OK to not know things. That's what we're all here for, learning, but it's terrible and horrible and dishonest to not know and not admit that you don't know.

It doesn't seem to me that you have at all the necessary skills to work on Python and Django. I recommend you spend a year acquiring these skills and try again next year.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Tue 11 Mar 2014 04:32:16 PM UTC, comment #5: 

You seem to be having trouble generating diffs. Have you noticed that FIXED_UPLOAD.diff is empty?

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Fri 28 Feb 2014 09:54:37 AM UTC, comment #4: 

We're using South for automation in ALTER TABLE and such things but South is also conflicting with the currently installed apps in the list. So we should probably manage things properly here to make the bundle upload/ process time less. Hence the website can be more efficient.

Palash <oswalpalash>
Fri 28 Feb 2014 09:04:01 AM UTC, comment #3: 

We're using PIP for library management of Agora, so we should update them to the latest versions. I've updated them to my recent ones and used the original source clone with it. The file upload (bundle) problem seems to be solved. However you might try the same on your end to verify it. For my instance, the file bundle gets uploaded successfully on the local instance.

for deploying the code, I'm using
python manage.py runserver 8080

Palash <oswalpalash>
Fri 28 Feb 2014 08:58:13 AM UTC, comment #2: 

There are 2 possible ways to fix the upload bug.
Set the directly permissions of the upload accordingly to (0777) for perfect execution. But if we want the files to be totally secure, we can add this command to the views.py file which will run this according to the current directory and user. Hence the bundle can't be modified by other users. The zip file which has been uploaded here is successfully uploading the file to the server.
Without using celery too we can upload the file to the server. This would be less cumbersome but difficult to manage hence forth.

Deploying agora will vary according to the OS. On windows, pre deciding the permissions and normal deployment to 80 port would suffice.

Palash <oswalpalash>
Wed 26 Feb 2014 06:59:38 PM UTC, comment #1: 

I have deleted the .rar file that you uploaded. Please don't use rar. It's a non-free format. Instead, use zip or tarballs.

As to the actual patch that you uploaded, it's empty.

I'm also not sure about this approach for solving this problem. If the permissions are wrong, this probably should be fixed during the deployment, not by messing around with the view. Perhaps we should just have clearer instructions detailing how to deploy Agora?

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Wed 26 Feb 2014 06:42:43 PM UTC, original submission:  

During Upload of a Bundle in Agora, it gave an error of inappropriate permissions. Hence deduced that there's an incomplete direction of permission in the folder. Thereby adding an extra :
os.chmod(path,0777)
in the VIEW's file of the app bundles solves the issue.
The executable bit ensures that sub-directories also get the same permissions as the parent.

Palash <oswalpalash>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #30859:  fix_upload.patch added by oswalpalash (2KiB - application/octet-stream - fix upload mkdtemp function)
file #30858:  fix_upload.patch added by oswalpalash (2KiB - application/octet-stream - fix upload mkdtemp function)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by oswalpalash (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-03-12 jordigh StatusIn Progress Invalid
        Open/ClosedOpen Closed
    2014-03-12 jordigh Attached File#30711 Removed
    2014-03-12 jordigh Attached File#30730 Removed
    2014-03-11 oswalpalash Attached File- Added fix_upload.patch, #30859
    2014-03-11 oswalpalash Attached File- Added fix_upload.patch, #30858
    2014-02-28 oswalpalash Attached File- Added Agora.zip, #30730
    2014-02-26 jordigh StatusNone In Progress
    2014-02-26 jordigh Attached File#30712 Removed
    2014-02-26 oswalpalash Attached File- Added FIX_UPLOAD.diff, #30711
        Attached File- Added Agora.rar, #30712

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code