Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1966

Remove App jar file from S3 when Admin user deletes a pending App

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      Check that App .jar files are getting deleted from S3 bucket when an Admin user deletes a pending app.

        Attachments

          Activity

          ann.loraine Ann Loraine made changes -
          Workflow Fall 2019 Workflow Update [ 19052 ] Revised Fall 2019 Workflow Update [ 22478 ]
          sameer Sameer Shanbhag (Inactive) made changes -
          Assignee Sameer Shanbhag [ sameer ]
          sameer Sameer Shanbhag (Inactive) made changes -
          Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]
          sameer Sameer Shanbhag (Inactive) made changes -
          Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
          ann.loraine Ann Loraine made changes -
          Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
          ann.loraine Ann Loraine made changes -
          Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
          ann.loraine Ann Loraine made changes -
          Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          Hide
          sameer Sameer Shanbhag (Inactive) added a comment - - edited

          1. If a user with administrative privileges uses the "Pending Apps" menu on the front page to "decline" an app, does the jar file gets deleted? Also, should it be deleted?
          => Yes, When the app is declined from the "Front (UI) Pending Apps Menu" the Jar gets deleted from the S3 Bucket.

          2. Maybe we should not try to support the use case of an admin user using the Admin panel to delete a pending App. The "Admin" panel is designed to provide an interface to the database only. Asking it to also "know" about uploaded files may be asking too much.
          => By Default, Admin can delete an App or App Pending or any other Database entry from the Django Admin Panel (Feature provided by Django)
          When the Admin tries to delete the App from Admin Panel (by Mistake or by Purpose), Currently the Jar is not getting removed from the S3 Bucket, Just increasing the manual effort by the S3 Admin to Purge the unnecessary Files
          So to avoid that, with this update, when an Admin Deletes the App from the Admin Panel, The Jar File will be deleted automatically (Done using "post_delete" signal operator by Django), which means the Admin will not be having any extra effort what-so-ever to delete the jar file

          Show
          sameer Sameer Shanbhag (Inactive) added a comment - - edited 1. If a user with administrative privileges uses the "Pending Apps" menu on the front page to "decline" an app, does the jar file gets deleted? Also, should it be deleted? => Yes, When the app is declined from the "Front (UI) Pending Apps Menu" the Jar gets deleted from the S3 Bucket. 2. Maybe we should not try to support the use case of an admin user using the Admin panel to delete a pending App. The "Admin" panel is designed to provide an interface to the database only. Asking it to also "know" about uploaded files may be asking too much. => By Default, Admin can delete an App or App Pending or any other Database entry from the Django Admin Panel (Feature provided by Django) When the Admin tries to delete the App from Admin Panel (by Mistake or by Purpose), Currently the Jar is not getting removed from the S3 Bucket, Just increasing the manual effort by the S3 Admin to Purge the unnecessary Files So to avoid that, with this update, when an Admin Deletes the App from the Admin Panel, The Jar File will be deleted automatically (Done using "post_delete" signal operator by Django), which means the Admin will not be having any extra effort what-so-ever to delete the jar file
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          Question for Sameer Shanbhag:

          • If a user with administrative privileges uses the "Pending Apps" menu on the front page to "decline" an app, does the jar file get deleted? Also, should it be deleted?

          What do you think about the following?:

          • Maybe we should not try to support the use case of an admin user using the Admin panel to delete a pending App. The "Admin" panel is designed to provide an interface to the database only. Asking it to also "know" about uploaded files may be asking too much.
          Show
          ann.loraine Ann Loraine added a comment - - edited Question for Sameer Shanbhag : If a user with administrative privileges uses the "Pending Apps" menu on the front page to "decline" an app, does the jar file get deleted? Also, should it be deleted? What do you think about the following?: Maybe we should not try to support the use case of an admin user using the Admin panel to delete a pending App. The "Admin" panel is designed to provide an interface to the database only. Asking it to also "know" about uploaded files may be asking too much.
          Hide
          sameer Sameer Shanbhag (Inactive) added a comment -

          Testing can be done on:

          https://dev-appstore-1.bioviz.org

          Steps:
          1. Submit an App
          2. Login to Django admin
          3. Navigate to App Pending
          4. Find the app you uploaded
          5. Check if the Release file is also present in the bucket under "pending_releases" folder
          6. Delete the App From Django Admin Panel
          7. Check if the Jar was deleted from the "pending_releases" folder in S3

          Django Admin Login:
          User: testuser
          Password: 9sC5W]q[R(=5{M5R

          Note:
          Delete App from Admin Panel only and not from the UI

          Show
          sameer Sameer Shanbhag (Inactive) added a comment - Testing can be done on: https://dev-appstore-1.bioviz.org Steps: 1. Submit an App 2. Login to Django admin 3. Navigate to App Pending 4. Find the app you uploaded 5. Check if the Release file is also present in the bucket under "pending_releases" folder 6. Delete the App From Django Admin Panel 7. Check if the Jar was deleted from the "pending_releases" folder in S3 Django Admin Login: User: testuser Password: 9sC5W]q[R(=5{M5R Note: Delete App from Admin Panel only and not from the UI
          sameer Sameer Shanbhag (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          sameer Sameer Shanbhag (Inactive) made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          Hide
          sameer Sameer Shanbhag (Inactive) added a comment - - edited

          Development Update:

          Changes have been Made to Support Deletion of App Pending Jar when Admin Deletes the App Pending Object from Admin Panel
          Changes can be found here:
          https://bitbucket.org/lorainelab/appstore/pull-requests/99/igbf-1966-add-support-to-delete-pending/diff

          Show
          sameer Sameer Shanbhag (Inactive) added a comment - - edited Development Update: Changes have been Made to Support Deletion of App Pending Jar when Admin Deletes the App Pending Object from Admin Panel Changes can be found here: https://bitbucket.org/lorainelab/appstore/pull-requests/99/igbf-1966-add-support-to-delete-pending/diff
          sameer Sameer Shanbhag (Inactive) made changes -
          Status Post-merge Testing In Progress [ 10003 ] To-Do [ 10305 ]
          Hide
          sameer Sameer Shanbhag (Inactive) added a comment -

          Testing Status:
          Errors:
          1. App-Pending Jar not getting deleted from S3 when Admin user deletes the application from Admin Panel
          Woking:
          1. When you delete a release as a user the Release File gets deleted
          2. When you Reject a Pending app, the JAr gets deleted from the Bucket's Pendingapp folder
          3. When you Delete an App from the Admin Panel, App object with the Release file gets deleted.

          Show
          sameer Sameer Shanbhag (Inactive) added a comment - Testing Status: Errors: 1. App-Pending Jar not getting deleted from S3 when Admin user deletes the application from Admin Panel Woking: 1. When you delete a release as a user the Release File gets deleted 2. When you Reject a Pending app, the JAr gets deleted from the Bucket's Pendingapp folder 3. When you Delete an App from the Admin Panel, App object with the Release file gets deleted.
          sameer Sameer Shanbhag (Inactive) made changes -
          Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
          ann.loraine Ann Loraine made changes -
          Assignee Sameer Shanbhag [ sameer ]
          ann.loraine Ann Loraine made changes -
          Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
          ann.loraine Ann Loraine made changes -
          Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
          sameer Sameer Shanbhag (Inactive) made changes -
          Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
          Show
          sameer Sameer Shanbhag (Inactive) added a comment - Pull Request Submitted: https://bitbucket.org/lorainelab/appstore/pull-requests/96/igbf-1966/diff
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ] Sameer Shanbhag [ sameer ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
          Hide
          ann.loraine Ann Loraine added a comment -

          Code is fine except for un-needed print statement - see comment.
          Please remove, rebase on master, and submit PR.

          Show
          ann.loraine Ann Loraine added a comment - Code is fine except for un-needed print statement - see comment. Please remove, rebase on master, and submit PR.
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ]
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          ann.loraine Ann Loraine made changes -
          Sprint Summer 2019 Sprint 12, Fall 2019 Sprint 1 [ 71, 72 ] Summer 2019 Sprint 12, Fall 2019 Sprint 1, Fall 2019 Sprint 2 [ 71, 72, 73 ]
          ann.loraine Ann Loraine made changes -
          Workflow Loraine Lab Workflow [ 18690 ] Fall 2019 Workflow Update [ 19052 ]
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          Testers doing functional review, please check:

          • that a pending App release jar file can be deleted

          Also, tester will need to get admin user credentials from Sameer Shanbhag

          Show
          ann.loraine Ann Loraine added a comment - - edited Testers doing functional review, please check: that a pending App release jar file can be deleted Also, tester will need to get admin user credentials from Sameer Shanbhag
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          ann.loraine Ann Loraine made changes -
          Sprint Summer 2019 Sprint 12 [ 71 ] Summer 2019 Sprint 12, Fall 2019 Sprint 1 [ 71, 72 ]
          sameer Sameer Shanbhag (Inactive) made changes -
          Assignee Sameer Shanbhag [ sameer ]
          sameer Sameer Shanbhag (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          Hide
          sameer Sameer Shanbhag (Inactive) added a comment - - edited

          Changes can be found: https://bitbucket.org/sshanbh1/sameer-appstorefork/commits/5920020911b6c3aef943183aeed2d9a3a7b5e592

          1. When you delete a release as a user the Release File gets deleted
          2. When you Reject a Pending app, the JAr gets deleted from the Bucket's Pendingapp folder
          3. When you Delete an App from the Admin Panel, App object with the Release file gets deleted.

          Testing can be done on my EC2 Instance:
          https://dev-appstore-1.bioviz.org/

          Show
          sameer Sameer Shanbhag (Inactive) added a comment - - edited Changes can be found: https://bitbucket.org/sshanbh1/sameer-appstorefork/commits/5920020911b6c3aef943183aeed2d9a3a7b5e592 1. When you delete a release as a user the Release File gets deleted 2. When you Reject a Pending app, the JAr gets deleted from the Bucket's Pendingapp folder 3. When you Delete an App from the Admin Panel, App object with the Release file gets deleted. Testing can be done on my EC2 Instance: https://dev-appstore-1.bioviz.org/
          Hide
          sameer Sameer Shanbhag (Inactive) added a comment -

          We need to explicitly delete the file, documentation can be found here:
          https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.fields.files.FieldFile.delete

          Show
          sameer Sameer Shanbhag (Inactive) added a comment - We need to explicitly delete the file, documentation can be found here: https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.fields.files.FieldFile.delete
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ] Sameer Shanbhag [ sameer ]
          ann.loraine Ann Loraine made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ]
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          I will figure out a way to enable developers to view the contents of their S3 bucket via the AWS console.

          You can use the AWS command-line tools to programmatically view the contents of your S3 bucket using the same access credentials your appstore instance is using.

          However, it will be easier to debug if you can view same using the AWS console.

          Stay tuned...

          Show
          ann.loraine Ann Loraine added a comment - - edited I will figure out a way to enable developers to view the contents of their S3 bucket via the AWS console. You can use the AWS command-line tools to programmatically view the contents of your S3 bucket using the same access credentials your appstore instance is using. However, it will be easier to debug if you can view same using the AWS console. Stay tuned...
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] Open [ 1 ]
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          I tested this using dev-appstore-2.

          I uploaded an App file and then logged in as an "admin" user. I then deleted the corresponding entry in the "Pending Apps" section.

          I then checked the S3 bucket.

          The App jar file was still there.

          Show
          ann.loraine Ann Loraine added a comment - - edited I tested this using dev-appstore-2. I uploaded an App file and then logged in as an "admin" user. I then deleted the corresponding entry in the "Pending Apps" section. I then checked the S3 bucket. The App jar file was still there.
          noor91zahara Noor Zahara (Inactive) made changes -
          Assignee Noor Zahara [ noor91zahara ]
          noor91zahara Noor Zahara (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          Hide
          noor91zahara Noor Zahara (Inactive) added a comment -

          The pending app jars are getting deleted from S3 when an admin user deletes it.

          Show
          noor91zahara Noor Zahara (Inactive) added a comment - The pending app jars are getting deleted from S3 when an admin user deletes it.
          noor91zahara Noor Zahara (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          noor91zahara Noor Zahara (Inactive) made changes -
          Assignee Noor Zahara [ noor91zahara ]
          ann.loraine Ann Loraine made changes -
          Field Original Value New Value
          Epic Link IGBF-1388 [ 17463 ]
          ann.loraine Ann Loraine created issue -

            People

            • Assignee:
              sameer Sameer Shanbhag (Inactive)
              Reporter:
              ann.loraine Ann Loraine
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: