From 8628a4af9b6656534fc7cfe3fabd5b7f90fd737c Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 13 Mar 2025 11:14:45 -0400 Subject: [PATCH 1/4] [Infra] Debug broken issues generation workflow --- .github/actions/testing_report_generation/app.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/testing_report_generation/app.rb b/.github/actions/testing_report_generation/app.rb index 8919fbe95c7..ae4f9e562a7 100644 --- a/.github/actions/testing_report_generation/app.rb +++ b/.github/actions/testing_report_generation/app.rb @@ -94,6 +94,7 @@ def get_workflows(client, repo_name) puts "Excluded workflow files: " + EXCLUDED_WORKFLOWS.join(",") for wf in get_workflows(client, REPO_NAME_WITH_OWNER) do + puts wf.name # skip if it is the issue generation workflow. if wf.name == ENV["GITHUB_WORKFLOW"] next From ad7ce8a808541e62cc4f7a2ac6efdf1f5688fa12 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 13 Mar 2025 11:35:42 -0400 Subject: [PATCH 2/4] Update app.rb --- .github/actions/testing_report_generation/app.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/testing_report_generation/app.rb b/.github/actions/testing_report_generation/app.rb index ae4f9e562a7..c6aaf9404ca 100644 --- a/.github/actions/testing_report_generation/app.rb +++ b/.github/actions/testing_report_generation/app.rb @@ -24,7 +24,7 @@ TESTS_TIME_INTERVAL_IN_HOURS = 24 TESTS_TIME_INTERVAL_IN_SECS = TESTS_TIME_INTERVAL_IN_HOURS * 3600 NO_WORKFLOW_RUNNING_INFO = "All nightly cron job were not run in the last #{TESTS_TIME_INTERVAL_IN_HOURS} hrs. Please review [log](#{GITHUB_WORKFLOW_URL}) make sure there at least exists one cron job running.".freeze -EXCLUDED_WORKFLOWS = [] +EXCLUDED_WORKFLOWS = ["dependabot-updates"] ISSUE_LABELS = "" ISSUE_TITLE = "Auto-Generated Testing Report" @@ -108,7 +108,7 @@ def get_workflows(client, repo_name) end workflow_text = "[%s](%s)" % [wf.name, wf.html_url] - runs = client.workflow_runs(REPO_NAME_WITH_OWNER, File.basename(wf.path), :event => "schedule").workflow_runs + runs = client.workflow_runs(REPO_NAME_WITH_OWNER, workflow_file, :event => "schedule").workflow_runs runs = runs.sort_by { |run| -run.created_at.to_i } latest_run = runs[0] if latest_run.nil? From f35fdadc64d40cb2e1d546bd86546d5943a6af74 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 13 Mar 2025 11:53:09 -0400 Subject: [PATCH 3/4] Update app.rb --- .github/actions/testing_report_generation/app.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/testing_report_generation/app.rb b/.github/actions/testing_report_generation/app.rb index c6aaf9404ca..730683821ff 100644 --- a/.github/actions/testing_report_generation/app.rb +++ b/.github/actions/testing_report_generation/app.rb @@ -94,7 +94,6 @@ def get_workflows(client, repo_name) puts "Excluded workflow files: " + EXCLUDED_WORKFLOWS.join(",") for wf in get_workflows(client, REPO_NAME_WITH_OWNER) do - puts wf.name # skip if it is the issue generation workflow. if wf.name == ENV["GITHUB_WORKFLOW"] next @@ -102,6 +101,10 @@ def get_workflows(client, repo_name) workflow_file = File.basename(wf.path) puts "------------" puts "workflow_file: %s" % [workflow_file] + puts "mango" + puts EXCLUDED_WORKFLOWS + puts EXCLUDED_WORKFLOWS.include?(workflow_file) + puts "banana" if EXCLUDED_WORKFLOWS.include?(workflow_file) puts workflow_file + " is excluded in the report." next From 38646d6a466f8631950735f23b1d8c7e2e80bbce Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 13 Mar 2025 12:05:25 -0400 Subject: [PATCH 4/4] fix --- .github/actions/testing_report_generation/app.rb | 6 +----- .github/workflows/generate_issues.yml | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/actions/testing_report_generation/app.rb b/.github/actions/testing_report_generation/app.rb index 730683821ff..9bb7aa68b36 100644 --- a/.github/actions/testing_report_generation/app.rb +++ b/.github/actions/testing_report_generation/app.rb @@ -24,7 +24,7 @@ TESTS_TIME_INTERVAL_IN_HOURS = 24 TESTS_TIME_INTERVAL_IN_SECS = TESTS_TIME_INTERVAL_IN_HOURS * 3600 NO_WORKFLOW_RUNNING_INFO = "All nightly cron job were not run in the last #{TESTS_TIME_INTERVAL_IN_HOURS} hrs. Please review [log](#{GITHUB_WORKFLOW_URL}) make sure there at least exists one cron job running.".freeze -EXCLUDED_WORKFLOWS = ["dependabot-updates"] +EXCLUDED_WORKFLOWS = [] ISSUE_LABELS = "" ISSUE_TITLE = "Auto-Generated Testing Report" @@ -101,10 +101,6 @@ def get_workflows(client, repo_name) workflow_file = File.basename(wf.path) puts "------------" puts "workflow_file: %s" % [workflow_file] - puts "mango" - puts EXCLUDED_WORKFLOWS - puts EXCLUDED_WORKFLOWS.include?(workflow_file) - puts "banana" if EXCLUDED_WORKFLOWS.include?(workflow_file) puts workflow_file + " is excluded in the report." next diff --git a/.github/workflows/generate_issues.yml b/.github/workflows/generate_issues.yml index a8411561dd8..9acf59f1caf 100644 --- a/.github/workflows/generate_issues.yml +++ b/.github/workflows/generate_issues.yml @@ -25,7 +25,7 @@ jobs: with: access-token: '${{ secrets.GITHUB_TOKEN }}' # This is to exclude workflows that will be searched in the nightly report. - exclude-workflow-files: 'performance-integration-tests.yml, sessions-integration-tests.yml, codeql' + exclude-workflow-files: 'performance-integration-tests.yml, sessions-integration-tests.yml, codeql, dependabot-updates' test_generate_an_issue: # Don't run on private repo. @@ -39,6 +39,6 @@ jobs: with: access-token: '${{ secrets.GITHUB_TOKEN }}' # This is to exclude workflows that will be searched in the nightly report. - exclude-workflow-files: 'performance-integration-tests.yml, sessions-integration-tests.yml, codeql' + exclude-workflow-files: 'performance-integration-tests.yml, sessions-integration-tests.yml, codeql, dependabot-updates' issue-labels: 'nightly-testing-report-generation-test' issue-title: 'Nightly Testing Report For Presubmit Testing'