feat(stream): import - #224
Conversation
…face Stream error messages Verbose debug logging read every request body as JSON, which would buffer an entire video into memory on octet-stream uploads; non-JSON bodies are now described from their headers instead. Error extraction also learns the Stream API's StatusModel shape (lowercase message), so 400/422/429 responses carry the API's explanation instead of a generic HTTP error.
…udflare Stream, JW Player, or Brightcove
|
@codex review |
|
Too many files changed for review (134 files, 100 file limit). Bypass the limit by tagging |
🦋 Changeset detectedLatest commit: 15f2adb The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
f47e145 to
e49f0e8
Compare
|
@greptile review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f47e14568b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Credentials are optional: omitting them uses the AWS default chain, which is how this runs on instance roles. | ||
| accessKeyId: z.string().optional(), | ||
| secretAccessKey: z.string().optional(), | ||
| sessionToken: z.string().optional(), |
There was a problem hiding this comment.
Reject half-configured static AWS credentials
The schema accepts accessKeyId and secretAccessKey independently, but S3SourceClient uses the pair only when both are present and otherwise silently selects the ambient AWS credential chain. If a user accidentally sets only one variable while a profile or instance role is available, the import runs as that unrelated principal instead of reporting the incomplete credential pair; refine the schema so both keys must be supplied together or both omitted.
Useful? React with 👍 / 👎.
| const playbackId = | ||
| asset.playback_ids?.find((p) => p.policy === "public")?.id ?? | ||
| asset.playback_ids?.[0]?.id; |
There was a problem hiding this comment.
Do not treat signed Mux playback IDs as public URLs
When an asset has no public playback ID, this fallback selects the first ID even if its policy is signed, then constructs an unsigned stream.mux.com URL from it. Bunny cannot fetch that URL without a playback JWT, so signed-only Mux assets fail even when a temporary master URL could be used below; only select a public playback ID here or implement signing before using a signed one.
Useful? React with 👍 / 👎.
| if (!body?.id) { | ||
| return { | ||
| success: false, | ||
| error: | ||
| "Bunny accepted the fetch but returned no video ID, so the video cannot be tracked or de-duplicated.", | ||
| }; |
There was a problem hiding this comment.
Handle successful fetch responses that contain no video ID
The committed Stream OpenAPI contract types this endpoint's response as StatusModel, which contains only success, message, and statusCode, and the sibling queueVideoFetch() helper also documents that no GUID is returned. A conforming successful response therefore enters this branch after Bunny has already queued the fetch, records the video as failed, and leaves an untagged orphan that a later run can duplicate; use a fetch flow that deterministically obtains the created GUID instead of requiring an undocumented id field.
Useful? React with 👍 / 👎.
…ts cancel their work; 429 replays get a fresh deadline
… HLS segments are not imported
…com URL; signed-only assets fall through to the master
… after cursor instead of per_page and a uid
…m endpoint is configurable and its host is validated
…ord once per video
…nks tagged videos by Bunny status, and a saved run can be refreshed against Bunny
…with live progress, and import status shows Bunny's progress
… that died before tagging; refresh flags videos stalled at zero bytes
No description provided.