From 2e1b3e7fe2cb1874dd297b6b23c3d3bda1bad88c Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Tue, 15 Jul 2025 06:26:38 +0200 Subject: [PATCH] Revert "ci: add paths config to workflows for github & pull_request trigger (#5891)" This reverts commit d65e48671129662e9a671a376c8fed7c424126c3. --- .github/workflows/apm-capabilities.yml | 15 -------- .github/workflows/apm-integrations.yml | 15 -------- .github/workflows/appsec.yml | 15 -------- .github/workflows/debugger.yml | 15 -------- .github/workflows/lambda.yml | 15 -------- .github/workflows/llmobs.yml | 15 -------- .github/workflows/platform.yml | 15 -------- .github/workflows/profiling.yml | 15 -------- .github/workflows/project.yml | 15 -------- .github/workflows/system-tests.yml | 15 -------- .github/workflows/test-optimization.yml | 15 -------- .gitlab-ci.yml | 48 ------------------------- scripts/verify-ci-config.js | 8 ++--- 13 files changed, 4 insertions(+), 217 deletions(-) diff --git a/.github/workflows/apm-capabilities.yml b/.github/workflows/apm-capabilities.yml index 185e82d971d..0d101dd9c69 100644 --- a/.github/workflows/apm-capabilities.yml +++ b/.github/workflows/apm-capabilities.yml @@ -2,21 +2,6 @@ name: APM Capabilities on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/apm-capabilities.yml' push: branches: [master] schedule: diff --git a/.github/workflows/apm-integrations.yml b/.github/workflows/apm-integrations.yml index 987384cd7b1..d21b3e8ba3d 100644 --- a/.github/workflows/apm-integrations.yml +++ b/.github/workflows/apm-integrations.yml @@ -2,21 +2,6 @@ name: APM Integrations on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/apm-integrations.yml' push: branches: [master] schedule: diff --git a/.github/workflows/appsec.yml b/.github/workflows/appsec.yml index 92a7558db32..ec65546f08c 100644 --- a/.github/workflows/appsec.yml +++ b/.github/workflows/appsec.yml @@ -2,21 +2,6 @@ name: AppSec on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/appsec.yml' push: branches: [master] schedule: diff --git a/.github/workflows/debugger.yml b/.github/workflows/debugger.yml index 3905b3eb3c9..88b288a7970 100644 --- a/.github/workflows/debugger.yml +++ b/.github/workflows/debugger.yml @@ -2,21 +2,6 @@ name: Debugger on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/debugger.yml' push: branches: [master] schedule: diff --git a/.github/workflows/lambda.yml b/.github/workflows/lambda.yml index 16ed6c37f1f..54e6fb40c44 100644 --- a/.github/workflows/lambda.yml +++ b/.github/workflows/lambda.yml @@ -2,21 +2,6 @@ name: Lambda on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/lambda.yml' push: branches: [master] schedule: diff --git a/.github/workflows/llmobs.yml b/.github/workflows/llmobs.yml index 61ebc4dd966..073d80045f9 100644 --- a/.github/workflows/llmobs.yml +++ b/.github/workflows/llmobs.yml @@ -2,21 +2,6 @@ name: LLMObs on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/llmobs.yml' push: branches: [master] schedule: diff --git a/.github/workflows/platform.yml b/.github/workflows/platform.yml index 2931ad86871..dd4278200f3 100644 --- a/.github/workflows/platform.yml +++ b/.github/workflows/platform.yml @@ -2,21 +2,6 @@ name: Platform on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/platform.yml' push: branches: [master] schedule: diff --git a/.github/workflows/profiling.yml b/.github/workflows/profiling.yml index cbc500a8513..60175d72b4b 100644 --- a/.github/workflows/profiling.yml +++ b/.github/workflows/profiling.yml @@ -2,21 +2,6 @@ name: Profiling on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/profiling.yml' push: branches: [master] schedule: diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 76e6816733c..02493c4a395 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -2,21 +2,6 @@ name: Project on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/**' push: branches: [master] diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml index ad5de4f3e89..1d500c28379 100644 --- a/.github/workflows/system-tests.yml +++ b/.github/workflows/system-tests.yml @@ -2,21 +2,6 @@ name: System Tests on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/system-tests.yml' push: branches: [master] workflow_dispatch: diff --git a/.github/workflows/test-optimization.yml b/.github/workflows/test-optimization.yml index 95ba51dffe1..b516300e6c7 100644 --- a/.github/workflows/test-optimization.yml +++ b/.github/workflows/test-optimization.yml @@ -2,21 +2,6 @@ name: Test Optimization on: pull_request: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!.gitlab-ci.yml' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.github/workflows/test-optimization.yml' push: branches: - master diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4bcb9c39129..7582ecf2f6e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,56 +16,8 @@ stages: include: - local: ".gitlab/one-pipeline.locked.yml" - rules: - - changes: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.gitlab/one-pipeline.locked.yml' - local: ".gitlab/benchmarks.yml" - rules: - - changes: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.gitlab/benchmarks.yml' - local: ".gitlab/macrobenchmarks.yml" - rules: - - changes: - paths: - # Paths for whole project (should be same in all workflows) - - '**' - - '!.github/workflows/**' - - '!.gitlab/**' - - '!.vscode/**' - - '!devdocs/**' - - '!examples/**' - - '!*.md' - - '!LICENSE*' - - 'LICENSE-3rdparty.csv' - - '!NOTICE' - # Paths for this workflow only - - '.gitlab/macrobenchmarks.yml' workflow: rules: diff --git a/scripts/verify-ci-config.js b/scripts/verify-ci-config.js index 337f66d1698..7ea874e60c7 100644 --- a/scripts/verify-ci-config.js +++ b/scripts/verify-ci-config.js @@ -174,6 +174,7 @@ const IGNORED_WORKFLOWS = { 'retry.yml' ], trigger_pull_request: [ + 'audit.yml', 'eslint-rules.yml', 'stale.yml' ], @@ -200,10 +201,9 @@ for (const workflow of workflows) { const yamlPath = path.join(__dirname, '..', '.github', 'workflows', workflow) const yamlContent = yaml.parse(fs.readFileSync(yamlPath, 'utf8')) const triggers = yamlContent.on - if (!IGNORED_WORKFLOWS.trigger_pull_request.includes(workflow)) { - if (triggers?.pull_request !== null && Object.keys(triggers.pull_request).toString() !== 'paths') { - triggersError(workflow, 'The `pull_request` trigger should be blank or only include paths') - } + if (!IGNORED_WORKFLOWS.trigger_pull_request.includes(workflow) && + triggers?.pull_request !== null) { + triggersError(workflow, 'The `pull_request` trigger should be blank') } if (!IGNORED_WORKFLOWS.trigger_push.includes(workflow) && triggers?.push?.branches?.[0] !== 'master') {