ci: Remove turbo task for nodes popularity

This commit is contained in:
Declan Carroll 2025-11-18 12:50:45 +00:00
parent f376b9ccf3
commit 37a340a9c9
No known key found for this signature in database
GPG Key ID: EA47A28DECE07FE6
7 changed files with 4070 additions and 57 deletions

3
.github/CODEOWNERS vendored
View File

@ -1 +1,4 @@
packages/@n8n/db/src/migrations/ @n8n-io/migrations-review
# Node popularity data updates
packages/frontend/editor-ui/.build/node-popularity.json @n8n-io/catalysts

View File

@ -0,0 +1,62 @@
name: Update Node Popularity Data
on:
schedule:
# Run every Monday at 00:00 UTC
- cron: '0 0 * * 1'
workflow_dispatch: # Allow manual trigger for testing
push:
branches:
- cat-1755-e2e-scale-mode
permissions:
contents: write
pull-requests: write
jobs:
update-popularity:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Node.js and Dependencies
uses: ./.github/actions/setup-nodejs-github
with:
build-command: '' # Skip build, we only need to fetch data
- name: Fetch node popularity data
run: |
cd packages/frontend/editor-ui
node scripts/fetch-node-popularity.mjs
env:
N8N_FAIL_ON_POPULARITY_FETCH_ERROR: 'false' # Don't fail if API is down
- name: Check for changes
id: check-changes
run: |
if git diff --quiet packages/frontend/editor-ui/.build/node-popularity.json; then
echo "No changes to popularity data"
echo "has_changes=false" >> "$GITHUB_OUTPUT"
else
echo "Popularity data has changed"
echo "has_changes=true" >> "$GITHUB_OUTPUT"
fi
- name: Create Pull Request
if: steps.check-changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
branch-token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: Update node popularity data'
title: 'chore: Update node popularity data'
body: |
This automated PR updates the node popularity data used for sorting nodes in the node creator panel.
The data is fetched weekly from the n8n telemetry endpoint to reflect current usage patterns.
_Generated by the weekly node popularity update workflow._
branch: update-node-popularity
delete-branch: true
author: n8n Bot <18347049+n8n-bot@users.noreply.github.com>
committer: n8n Bot <18347049+n8n-bot@users.noreply.github.com>

File diff suppressed because it is too large Load Diff

View File

@ -27,4 +27,6 @@ yarn-error.log*
src/components.d.ts
# Build artifacts
.build/
.build/*
# Except for the committed popularity data
!.build/node-popularity.json

View File

@ -6,8 +6,6 @@
"type": "module",
"scripts": {
"clean": "rimraf dist .turbo .build",
"popularity-cache-marker": "node scripts/cache-marker.mjs",
"fetch-popularity": "node scripts/fetch-node-popularity.mjs",
"build": "cross-env VUE_APP_PUBLIC_PATH=\"/{{BASE_PATH}}/\" NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
"build:coverage": "cross-env VUE_APP_PUBLIC_PATH=\"/{{BASE_PATH}}/\" NODE_OPTIONS=\"--max-old-space-size=14000\" BUILD_WITH_COVERAGE=true vite build",
"typecheck": "vue-tsc --noEmit",

View File

@ -1,32 +0,0 @@
#!/usr/bin/env node
import { mkdirSync, readFileSync, writeFileSync, existsSync } from 'fs';
const now = new Date();
const year = now.getFullYear();
const week = Math.ceil(
((now - new Date(year, 0, 1)) / 86400000 + new Date(year, 0, 1).getDay() + 1) / 7,
);
const markerContent = `${year}-W${week.toString().padStart(2, '0')}`;
const markerPath = '.build/cache-marker';
mkdirSync('.build', { recursive: true });
// Only write the file if it doesn't exist or if the content has changed
let shouldWrite = true;
if (existsSync(markerPath)) {
try {
const existingContent = readFileSync(markerPath, 'utf8');
if (existingContent === markerContent) {
shouldWrite = false;
console.log(`Cache marker already up-to-date: ${markerContent}`);
}
} catch (error) {
// If we can't read the file, we'll write it
}
}
if (shouldWrite) {
writeFileSync(markerPath, markerContent);
console.log(`Cache marker updated: ${markerContent}`);
}

View File

@ -1,22 +0,0 @@
{
"extends": ["//"],
"tasks": {
"popularity-cache-marker": {
"cache": true,
"outputs": [".build/cache-marker"],
"inputs": ["scripts/cache-marker.mjs"]
},
"fetch-popularity": {
"dependsOn": ["popularity-cache-marker"],
"cache": true,
"outputs": [".build/node-popularity.json"],
"inputs": ["scripts/fetch-node-popularity.mjs", ".build/cache-marker"],
"env": ["N8N_FAIL_ON_POPULARITY_FETCH_ERROR"]
},
"build": {
"dependsOn": ["^build", "fetch-popularity"],
"outputs": ["dist/**"],
"inputs": ["!.build/**"]
}
}
}