Skip to content

feat: YouTube API v3 worker deploy + fix CI workflow failures - #244

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

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

Conversation

@circleci-app

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

Copy link
Copy Markdown
Contributor

Summary

  • YouTube API v3 Worker Deploy: Adds a deploy-worker job to the CircleCI pipeline that deploys src/youtube-worker.ts to Cloudflare Workers (ytstudio) on every push to main. The worker serves /api/channel, /api/videos, and /api/search endpoints backed by YouTube Data API v3, with automatic fallback to demo data when YOUTUBE_API_KEY is not set.

  • Fix node-checks workflow failures:

    • functions/.eslintrc.js was minified to a single 483-char line, causing it to violate its own lint rules (max-len, comma-spacing, key-spacing, eol-last). Rewritten in standard multi-line format.
    • functions/package.json had a duplicate firebase-admin entry and firebase-functions: ^7.0.0 which caused npm install to abort with a peer dependency conflict. Removed the duplicate and downgraded to ^6.5.0.
    • CI was never installing functions/node_modules before running npm run lint — added explicit npm install --legacy-peer-deps step.
    • Replaced npx tsc with ./node_modules/.bin/tsc for deterministic execution.
    • Upgraded Docker image from cimg/node:20.18 → cimg/node:22.19 to align with functions/package.json engines requirement.
  • Fix python-checks workflow failures:

    • fix_app.py and fix_index.py used open() instead of Path.open() (ruff PTH123). Fixed both files.
    • All other auto-fixable ruff issues (quote style, unused imports, redundant open modes) resolved with ruff check --fix + ruff format.

Test plan

  • python-checks job: ruff check . returns 0 errors, ruff format . is a no-op
  • node-checks job: cd functions && npm run lint -- --max-warnings 0 exits 0; tsc --noEmit exits 0
  • deploy-worker job: runs on main after both check jobs pass; requires CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID CircleCI env vars to be set for live deployment
  • Worker health endpoint (/) returns JSON with status: "healthy", worker name, channel ID and available endpoints

https://app.circleci.com/agents/gh/ruhdevops/chat/e0b71a2e-6f7b-4164-ac54-884cb8ce0e1b

- Fix functions/.eslintrc.js: rewrite from minified to properly formatted
  so it passes its own ESLint rules (max-len, spacing, eol-last)
- Fix functions/package.json: remove duplicate firebase-admin entry and
  downgrade firebase-functions from ^7.0.0 to ^6.5.0 to resolve npm
  peer dependency conflict
- Fix Python linting violations in fix_app.py and fix_index.py:
  replace builtin open() with Path.open() (PTH123)
- Update .circleci/config.yml:
  - Upgrade Docker image to cimg/node:22.19 for Node 22 compatibility
  - Add explicit 'npm install --legacy-peer-deps' step for functions/
    before running lint (previously missing, causing lint to fail)
  - Use local tsc binary (./node_modules/.bin/tsc) instead of npx tsc
  - Add deploy-worker job: deploys src/youtube-worker.ts to Cloudflare
    Workers as 'ytstudio' using wrangler with CLOUDFLARE_API_TOKEN
  - Add deploy workflow: runs validate then deploys worker on main branch

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 16, 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 16, 2026 5:25pm UTC
yt-studio-production Error Error Oct 16, 2026 5:25pm UTC

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit a289e9a
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ad25de4f5f7e2351c220d75
😎 Deploy Preview https://deploy-preview-244--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.

@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 a289e9a Oct 16 2026, 05:25 PM

@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 a289e9a Oct 16 2026, 05:25 PM

This branch had an error being deployed

2 failed deployments
Preview – yt-studio-production — a289e9ab Deployed Oct 16, 2026 by vercel[bot]
Preview – yt-studio — a289e9ab Deployed Oct 16, 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