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

VideoPress dashboard: improve upload error handler #38769

Merged
merged 11 commits into from
Aug 14, 2024

Conversation

CGastrell
Copy link
Contributor

@CGastrell CGastrell commented Aug 7, 2024

Fixes https://github.com/Automattic/videopress/issues/1038

Proposed changes:

This PR addresses unhandled upload errors on VideoPress dashboard, providing error components for both list and row views of VideoPress dashboard.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

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

No

Testing instructions:

The next instructions should be tested on:

  • self hosted/JN
  • simple sites (simple sites don't use VideoPress dashboard, but uploads should be tested on these as well)
  • AT sites (should mostly behave as self hosted, since the standalone plugin takes place, but unsure how to get the latest code builds to AT)

Create an instance, follow the upgrade flow for VideoPress. Once done, you should be able to access VideoPress' dashboard at wp-admin/admin.php?page=jetpack-videopress#/

  • Verify the video uploads work on dashboard
  • Verify the video uploads work on the block editor
  • Verify the video uploads work on the media library

The upload process should not show any improvements or handling, but it should work as before.

  • Install "Disable XML-RPC" plugin and activate it

At this point, the XML backend connection should not be working, hence, video uploads should fail

Go back to VideoPress dashboard and upload a video. It should fail and the video card should show a warning sign. Click on the button to get some context and a link to our troubleshooting guide. Click on the trash icon to get rid of the error.

image image

Do it again, but switch to list/grid view and verify the same functionality exists.
image
image

Disabling "Disable XML-RPC" plugin should get things back to normal, but beware of this step on local environments as it turns to get tricky (unsure why).

@CGastrell CGastrell added [Status] In Progress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Package] VideoPress [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. labels Aug 7, 2024
@CGastrell CGastrell self-assigned this Aug 7, 2024
Copy link
Contributor

github-actions bot commented Aug 7, 2024

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.
  • ✅ 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.


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    A. Team Review: add the "[Status] Needs Team Review" label
    • For most changes, including minor cross-team impacts.
    • Example: Updating a team-specific component or a small change to a shared library.
      B. Crew Review: add the "[Status] Needs Review" label
    • For significant changes to core functionality.
    • Example: Major updates to a shared library or complex features.
      C. Both: Start with Team, then request Crew
    • For complex changes or when you need extra confidence.
    • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

Still unsure? Reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen daily.
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for September 3, 2024 (scheduled code freeze on September 2, 2024).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Videopress plugin:

  • Next scheduled release: none scheduled.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

Copy link
Contributor

github-actions bot commented Aug 7, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the fix/videopress-upload-error-handler branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack fix/videopress-upload-error-handler
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@CGastrell CGastrell force-pushed the fix/videopress-upload-error-handler branch 7 times, most recently from da7f365 to 4e05d66 Compare August 11, 2024 20:22
@CGastrell CGastrell changed the base branch from trunk to update/videopress-tus-client-lib August 11, 2024 20:22
Base automatically changed from update/videopress-tus-client-lib to trunk August 12, 2024 20:07
@CGastrell CGastrell force-pushed the fix/videopress-upload-error-handler branch 2 times, most recently from 5c8d7e9 to 6255dc6 Compare August 13, 2024 14:31
@CGastrell CGastrell force-pushed the fix/videopress-upload-error-handler branch from 6255dc6 to eac9931 Compare August 13, 2024 16:06
@CGastrell CGastrell force-pushed the fix/videopress-upload-error-handler branch from eac9931 to 7b2bcde Compare August 13, 2024 19:09
@CGastrell CGastrell changed the title WIP: VideoPress dashboard upload error handler VideoPress dashboard: improve upload error handler Aug 13, 2024
Comment on lines 64 to 65
// withCredentials: false,
// autoRetry: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually no use for those. There are no such options on the underlying lib

Copy link
Contributor

@dhasilva dhasilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Very well done! Thanks!

@CGastrell CGastrell merged commit bb45c57 into trunk Aug 14, 2024
59 checks passed
@CGastrell CGastrell deleted the fix/videopress-upload-error-handler branch August 14, 2024 19:51
@jeherve jeherve added the [Feature] VideoPress A feature to help you upload and insert videos on your site. label Aug 15, 2024
@foleynotrose
Copy link

Thanks @CGastrell ! Two questions:

  1. Do you know when will this be released?
  2. What help doc does the Visit the docs link to?

@CGastrell
Copy link
Contributor Author

Thanks @CGastrell ! Two questions:

  1. Do you know when will this be released?
  2. What help doc does the Visit the docs link to?

Releasing today if everything goes well
Currently links to https://jetpack.com/support/jetpack-videopress/troubleshooting-video-hosting-issues/

@foleynotrose
Copy link

Thanks! I've updated that article to make it clear that this problem could be due to a broken Jetpack Connection.

pkuliga pushed a commit that referenced this pull request Aug 23, 2024
* add debug calls, minor code improvements (map -> forEach, await/async functions, etc)

* changelog entry

* less debug on uploader lib

* make onBeforeRequest async (as expected by tus client lib). Add onShouldRetry to abort retries on 400 errors (mostly unrecoverable for now)

* add state action/reducer/selector for SET_VIDEO_UPLOADING_ERROR to keep errored videos separate and transient

* include errored videos in all dashboard considerations and derived flags

* add state action/reducer to clear upload errors

* add error components for grid and row views

* implement new error components on grid and list

* remove unused parameters

---------

Co-authored-by: Douglas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] VideoPress A feature to help you upload and insert videos on your site. [Package] VideoPress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants