Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media Endpoint: Do not auto-delete ZIP files #20860

Merged
merged 2 commits into from
Aug 30, 2021
Merged

Conversation

kraftbj
Copy link
Contributor

@kraftbj kraftbj commented Aug 27, 2021

Originally, ZIP files were only allowed via the media endpoint as part of install flows, so Jetpack had a backstop to automatically delete ZIP files added via the API after a given amount of time.

WordPress.com/API now allows ZIP files (when permitted by the site), so the backstop is now deleting regular uploads.

Originally reported by @jmdodd in p1630077923064100-slack-CBG1CP4EN

Changes proposed in this Pull Request:

  • Remove auto-deletion of ZIP uploads.

Jetpack product discussion

p9dueE-3ln-p2

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

  • Before and after patch, on a connected Jetpack site, upload a ZIP file via Calypso.
  • Before patch: View the cron events after uploading and see the upgrader_scheduled_cleanup job scheduled.
  • After patch: No cron event to cleanup.
    ⬆️ Resolves the bug. ⬇️ Ensures we don't create a new one.
  • On a site that does not allow ZIP uploads (say, a subsite on a multisite where the network admin has set it to not accept zips), make sure you can't upload a ZIP.
  • What are other ways to limit file type?

@kraftbj kraftbj added [Type] Bug When a feature is broken and / or not performing as intended [Feature] WPCOM API [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Aug 27, 2021
@kraftbj kraftbj added this to the jetpack/10.1 milestone Aug 27, 2021
@kraftbj kraftbj self-assigned this Aug 27, 2021
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Aug 27, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 27, 2021

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: September 7, 2021.
  • Scheduled code freeze: August 30, 2021.

@kraftbj kraftbj enabled auto-merge (squash) August 27, 2021 21:21
@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Aug 30, 2021
@kraftbj kraftbj merged commit 109709a into master Aug 30, 2021
@kraftbj kraftbj deleted the remove/auto-zip-deletion branch August 30, 2021 14:28
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Aug 30, 2021
davidlonjon added a commit that referenced this pull request Aug 31, 2021
* master: (34 commits)
  Fix issue templates (#20880)
  Social Icon Widget: Fix Icons Not Saving (#20862)
  Dashboard: Add a specific message for a site that is too new to have a rewind status (#20863)
  Add additional properties to WC Analytics events (#20812)
  Connection: add spinner for the "Connect" button (#20872)
  Update storybook monorepo to v6.3.7 (#20877)
  Lightweight PHPCS (#20876)
  Recommendations: Add Jetpack Product Suggestions step (#20814)
  Update babel monorepo (#20875)
  Update wordpress monorepo (#20873)
  cli: Check subprocess exit statuses in docker commands (#20861)
  Facebook Widget: Fix URL error when adding widget (#20864)
  Stats: make nudges collapsible (#20765)
  Remove temporary Newspack block override css (#20868)
  Allow ZIP uploads via Calypso (#20860)
  Sync Package Release v1.26.0 (#20870)
  Connection: remove in-place in secondary flows (#20739)
  BUILD_DIR -> BUILD_BASE in initial checks (#20857)
  E2E tests: Fix missing action for atomic workflow (#20866)
  Boost: Fix skip proxy origins to load css during critical CSS generation (#20793)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] WPCOM API [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants