Skip to content

feat: YouTube API v3 worker CI pipeline + fix workflow failures - #250

Open
circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/yt-worker-fix-workflows-2
Open

circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/yt-worker-fix-workflows-2

Conversation

@circleci-app

@circleci-app circleci-app Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • YouTube API v3 + Worker deploy: Adds build-worker and deploy-worker CI jobs for the ytstudio Cloudflare Worker (src/youtube-worker.ts). The worker exposes /api/channel, /api/videos, and /api/search endpoints backed by YouTube Data API v3 (with demo fallback when no API key is present). The deploy step runs a live channel-data smoke test and deploys via wrangler — both steps skip gracefully if YOUTUBE_API_KEY / CLOUDFLARE_API_TOKEN are not set.
  • Fix validate workflow — node-checks: Added a dedicated "Install Firebase Functions dependencies" step so functions/node_modules exists before ESLint and tsc run in that directory.
  • Fix functions/package.json: Removed the duplicate firebase-admin key (^10.3.0 was silently overriding ^13.9.0, causing firebase-functions@^7 peer-dep failure at install time). Also corrected typescript devDep from non-existent ^6.0.0 → ^5.8.3.
  • Fix functions/.eslintrc.js: Reformatted the minified one-liner into readable JS — ESLint was linting its own config file and failing with 40 comma-spacing / key-spacing errors.
  • Fix Python ruff errors: Updated fix_app.py and fix_index.py to use Path.open() instead of open(), resolving the 4 non-auto-fixable PTH123 errors that caused ruff check --fix to exit non-zero.

Test plan

  • validate workflow: python-checks and node-checks both pass (ruff, mypy, pytest, eslint, tsc)
  • worker-pipeline workflow: build-worker verifies worker source and wrangler config; deploy-worker runs on main only and deploys when CLOUDFLARE_API_TOKEN is available
  • Set YOUTUBE_API_KEY and CLOUDFLARE_API_TOKEN in CircleCI project env vars to enable live API fetch and Cloudflare deployment

https://app.circleci.com/agents/gh/ruhdevops/chat/ed6587dc-6e15-4adc-b956-174cdb3cd6c3

- Add build-worker job: validates src/youtube-worker.ts (Cloudflare Worker
  serving /api/channel, /api/videos, /api/search via YouTube Data API v3)
- Add deploy-worker job: fetches live YouTube API v3 channel data smoke test
  and deploys ytstudio worker to Cloudflare (skips gracefully when
  CLOUDFLARE_API_TOKEN / YOUTUBE_API_KEY env vars are absent)
- Add worker-pipeline workflow gating deploy-worker behind build-worker,
  restricted to main branch
- Fix node-checks: add "Install Firebase Functions dependencies" step so
  functions/node_modules exists before eslint/tsc run
- Fix functions/package.json: remove duplicate firebase-admin key
  (^10.3.0 was overriding ^13.9.0, breaking firebase-functions@^7 peer dep)
  and correct typescript devDep from non-existent ^6.0.0 to ^5.8.3
- Fix functions/.eslintrc.js: reformat minified one-liner to proper JS so
  eslint no longer reports 40 comma-spacing / key-spacing violations on
  the config file itself
- Fix fix_app.py, fix_index.py: replace open() with Path.open() to resolve
  PTH123 ruff errors that blocked ruff check --fix from exiting cleanly

AI-Generated: true
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
yt-studio Error Error Oct 17, 2026 2:27am UTC
yt-studio-production Error Error Oct 17, 2026 2:27am UTC

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
ytstudio 782c6d0 Oct 17 2026, 02:27 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
ytstudio 782c6d0 Oct 17 2026, 02:27 AM

@netlify

netlify Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

Name Link
🔨 Latest commit 782c6d0
🔍 Latest deploy log https://app.netlify.com/projects/ytr-studio/deploys/6ad2dd0a15f717c676a8e7c0

@netlify

netlify Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit 782c6d0
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ad2dd0a57bf69a6c0a9862b
😎 Deploy Preview https://deploy-preview-250--elegant-seahorse-d9d460.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch had an error being deployed

2 failed deployments
Preview – yt-studio-production — 782c6d08 Deployed Oct 17, 2026 by vercel[bot]
Preview – yt-studio — 782c6d08 Deployed Oct 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants