Skip to content

Conversation

christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Aug 25, 2025

Summary

Addresses reviewer feedback from @DrJKL on PR #5117:

  • Removed duplicate cache entries in dev-release.yaml
  • Removed redundant node_modules/.cache entries across all workflows since setup-node with cache: npm already handles npm caching
  • Fixed YAML indentation issues that were introduced during automated edits

Changes Made

  1. Deduplicated cache paths in dev-release.yaml (lines 32-34 were duplicated)
  2. Cleaned up redundant caching - removed node_modules/.cache from 7+ workflow files
  3. Fixed indentation issues in YAML files

Impact

  • Reduces cache storage usage by eliminating redundant entries
  • Improves maintainability by removing duplication
  • Ensures setup-node npm caching works properly without conflicts

Testing

  • YAML files validate correctly
  • No functional changes to workflow behavior
  • Maintains all existing cache optimization benefits

This should resolve the CI failure mentioned in the original PR where setup-node was failing due to cache conflicts.

Fixes issues identified in #5117

┆Issue is synchronized with this Notion page by Unito

- Remove duplicate path entries in dev-release.yaml
- Remove redundant node_modules/.cache entries since setup-node handles npm caching
- Fix YAML indentation issues across workflow files

Addresses reviewer feedback on PR #5117 about duplication and maintenance
@christian-byrne christian-byrne requested a review from a team as a code owner August 25, 2025 21:35
Copy link

github-actions bot commented Aug 25, 2025

🎭 Playwright Test Results

All tests passed across all browsers!

⏰ Completed at: 08/25/2025, 10:02:26 PM UTC

📊 Test Reports by Browser


🎉 Your tests are passing across all browsers!

The test-ui workflow runs at repo root but package-lock.json is in ComfyUI_frontend/
subdirectory, causing setup-node cache to fail. Added cache-dependency-path to fix this.
@snomiao snomiao merged commit 7dee4e1 into ci/add-cache-to-format-and-knip Aug 26, 2025
10 checks passed
@snomiao snomiao deleted the fix-ci-cache-issues branch August 26, 2025 09:10
christian-byrne added a commit that referenced this pull request Aug 26, 2025
* [ci] Enhance CI/CD caching across all workflows

- Add tool cache steps for node_modules/.cache, .cache, and .eslintcache
- Enable npm caching for Node.js setup actions where missing
- Add cache configurations for ESLint, Prettier, Knip, and other build tools
- Improve build performance by caching tool outputs between runs
- Use unique cache keys per workflow to avoid conflicts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [ci] Enhance CI/CD caching with comprehensive improvements

Extends caching strategy beyond PR #5107 with additional optimizations:

- **i18n.yaml**: Add tool cache for locale generation workflow
- **update-electron-types.yaml**: Add tool cache for type updates
- **test-ui.yaml**: Add Playwright browser cache and Python pip cache
- **vitest.yaml**: Add coverage directory caching
- **chromatic.yaml**: Add Storybook static build cache
- **All build workflows**: Add TypeScript incremental build cache
- **Type generation workflows**: Add repository caching for external repos
- **lint-and-format.yaml**: Improve cache key granularity with source hash

Performance improvements:
- Playwright browser downloads cached across runs
- Python pip dependencies cached
- TSC incremental compilation cache preserved
- Storybook static builds cached
- External repository clones cached
- More granular cache invalidation based on source changes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [ci] Optimize CI/CD caching for better performance

- Enhance cache keys with more specific file patterns for better cache hit rates
- Add missing cache directories (.prettierCache, .knip-cache, .vitest-cache, tsconfig.tsbuildinfo)
- Improve cache key naming for clarity (lint-format, vitest, storybook, playwright)
- Add better fallback cache restore keys
- Include browser-specific caching for Playwright tests
- Add TypeScript build info caching across workflows

Expected improvements:
- 20-40% faster builds on cache hits
- More granular cache invalidation
- Better cache utilization across tools

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* [ci] Remove redundant node_modules/.cache from workflow caches

setup-node already handles node_modules caching when cache: 'npm' is enabled.
Removed conflicting node_modules/.cache entries from:
- .github/workflows/lint-and-format.yaml
- .github/workflows/vitest.yaml
- .github/workflows/test-ui.yaml

This prevents cache conflicts and follows best practices for npm caching.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update .github/workflows/chromatic.yaml

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Update .github/workflows/update-electron-types.yaml

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* fix: address reviewer feedback on cache optimization PR (#5200)

* fix: remove duplicate cache entries and fix YAML formatting

- Remove duplicate path entries in dev-release.yaml
- Remove redundant node_modules/.cache entries since setup-node handles npm caching
- Fix YAML indentation issues across workflow files

Addresses reviewer feedback on PR #5117 about duplication and maintenance

* fix: add cache-dependency-path for setup-node in test-ui workflow

The test-ui workflow runs at repo root but package-lock.json is in ComfyUI_frontend/
subdirectory, causing setup-node cache to fail. Added cache-dependency-path to fix this.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
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.

3 participants