Problem/Motivation
The two remote-video default content items in this recipe (content/media/remote-video--remote-vimeo-video.yml, content/media/remote-video--remote-youtube-video.yml) make a live external oEmbed validation call during drush site:install / recipe content import (Drupal\Core\DefaultContent\Importer). Across repeated fresh installs of the same, unchanged codebase, this has failed intermittently with three different symptoms, all on these same two content items:
[error] Could not retrieve the oEmbed resource. cURL error 28: Resolving timed out after 5001 milliseconds for https://www.youtube.com/oembed?url=...[error] No matching oEmbed provider found for resource: "https://vimeo.com/672703214"→InvalidEntityException: ... field_media_oembed_video=The given URL does not match any known oEmbed providers.(observed twice)
Both the specific video URLs and the oEmbed provider APIs (vimeo.com, oembed.com) resolve fine and return 200 when checked directly outside of the install run, so this is not simply a dead video (that was #3580300, already fixed and closed). The install itself only intermittently succeeds, which makes fresh installs of this recipe unreliable in CI and in local development.
Steps to reproduce
Run a fresh drush site:install varbase --existing-config (or the Varbase Project's ddev install-varbase full) enough times in a row: roughly 2 in 3 attempts fail while installing this recipe's default content, with one of the two error messages above.
Proposed resolution
Make the recipe's remote-video default content resilient to transient oEmbed-provider/network failures during install, for example by:
- Pre-populating the oEmbed resource metadata (thumbnail, width, height, title) on these media entities so the importer does not need to perform a live external validation call at all, or
- Making the oEmbed provider list fetch use a bundled/cached fallback instead of only a live network call with a short timeout and no retry, or
- Reviewing whether these two demo media items should be required content in this recipe at all, versus optional.
Remaining tasks
- ✅ File an issue about this project
- ❌ Addition/Change/Update/Fix to this project
- ❌ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ✅ Update Release Notes
- ✅ Release varbase-11.0.0-beta1, varbase_media_assets-1.0.0-beta1
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Fixed intermittent site-install failures caused by live oEmbed validation calls on the recipe's demo remote-video content.
Related: #3580300 (fixed a dead video URL on the same content items; this issue is a different, still-live-network-dependent failure mode).
Issue fork varbase_media_assets-3608868
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
rajab natshahComment #5
rajab natshahComment #6
rajab natshah✅ Released varbase_media_assets-1.0.0-beta1
Comment #8
rajab natshahComment #9
rajab natshahComment #10
rajab natshah✅ Released varbase-11.0.0-beta1