[parser] Add option to keep failing sequence in ad pod#501
Merged
clementFrancon merged 2 commits intomasterfrom Nov 20, 2025
Merged
[parser] Add option to keep failing sequence in ad pod#501clementFrancon merged 2 commits intomasterfrom
clementFrancon merged 2 commits intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new keepFailedAdPod option to the VAST parser that allows failed ads with a sequence number to remain in the response instead of being automatically removed. This enables fallback strategies for ad pods by flagging failed ads with a hasFailed property while maintaining the pod's sequence structure.
Key changes:
- Added
keepFailedAdPodconfiguration option to preserve failed ads in ad pods - Failed ads with sequences are now flagged with
hasFailed: trueinstead of being removed when the option is enabled - Standalone ads without sequences continue to be removed regardless of the option setting
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/parser/vast_parser.js | Implements the keepFailedAdPod option and conditional logic to flag failed ads with sequences instead of removing them |
| spec/vast_parser.spec.js | Adds comprehensive test coverage for the new option including default behavior, ad pod sequence preservation, and standalone ad handling |
| docs/api/class-reference.md | Documents the new hasFailed property on Ad objects |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When we parse an ad pod and we don't manage to unwrap some ads inside for some reason, we want to keep them in order to use an ad buffet ad instead.
This PR adds an option to no remove the failing ad with a sequrence and flag them so we can easily put in place a fallback stategy.
Type