From 430dd857a40988c9eaf61e49a31931e8e4624f78 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Tue, 4 Mar 2025 18:07:22 -0500 Subject: [PATCH 01/16] tt1 --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84e73c0f21..99507af6b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,3 +85,35 @@ jobs: push_rolling: true repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }} cache_file: "uv.lock" + + upload-overwatch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Static Analysis Tools + run: | + pip install mypy==1.15.0 + pip install ruff==0.3.3 + - name: Install Build Dependencies + run: | + sudo apt-get update + # Install libssl1.1 from Ubuntu 20.04 repositories + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb + sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb + - name: Install Overwatch CLI + run: | + curl -o overwatch-cli https://overwatch.codecov.dev/linux/cli + chmod +x overwatch-cli + - name: Print Current Working Directory + run: pwd + - name: List Contents of Current Working Directory + run: ls -la + - name: List Directories Under Root + run: ls -d /*/ + - name: Run Overwatch CLI + run: | + ./overwatch-cli \ + --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \ + --organization-slug codecov \ + python \ + --python-path $(which python3) From 0ffbc863820410108646731d6c042e63a4537ecb Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Tue, 4 Mar 2025 19:35:36 -0500 Subject: [PATCH 02/16] tt2 From b92ae2ea4ff7772a635bc032bcd137c953479552 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Tue, 4 Mar 2025 19:39:19 -0500 Subject: [PATCH 03/16] tt3 --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99507af6b9..8650768ce3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,4 +116,5 @@ jobs: --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \ --organization-slug codecov \ python \ - --python-path $(which python3) + --python-path $(which python3) \ + --tool mypy From 79487bb433431931406023d9baab2c489ddf3f94 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Tue, 4 Mar 2025 19:55:50 -0500 Subject: [PATCH 04/16] tt4 --- services/components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/components.py b/services/components.py index 318e22e01b..b7482c973e 100644 --- a/services/components.py +++ b/services/components.py @@ -26,7 +26,7 @@ def commit_components(commit: Commit, owner: Owner | None) -> List[Component]: def component_filtered_report( - report: Report, components: List[Component] + report: Report | None, components: List[Component] ) -> FilteredReport: """ Filter a report such that the totals, etc. are only pertaining to the given component. From 3e938a4aeb14ae9822ddf6b2932e5adda9b25fef Mon Sep 17 00:00:00 2001 From: Suejung Shin Date: Tue, 4 Mar 2025 20:24:18 -0800 Subject: [PATCH 05/16] trigger re-run --- .github/workflows/ci.yml | 2 ++ services/components.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8650768ce3..9f01c06e74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,3 +118,5 @@ jobs: python \ --python-path $(which python3) \ --tool mypy + + \ No newline at end of file diff --git a/services/components.py b/services/components.py index b7482c973e..13162eee49 100644 --- a/services/components.py +++ b/services/components.py @@ -26,7 +26,7 @@ def commit_components(commit: Commit, owner: Owner | None) -> List[Component]: def component_filtered_report( - report: Report | None, components: List[Component] + report, components ) -> FilteredReport: """ Filter a report such that the totals, etc. are only pertaining to the given component. From 260474a1a4687aedce18b903b56dbb73ba74ef3e Mon Sep 17 00:00:00 2001 From: Suejung Shin Date: Tue, 4 Mar 2025 21:32:57 -0800 Subject: [PATCH 06/16] trigger re-run --- services/components.py | 1 + 1 file changed, 1 insertion(+) diff --git a/services/components.py b/services/components.py index 13162eee49..f1bf834634 100644 --- a/services/components.py +++ b/services/components.py @@ -31,6 +31,7 @@ def component_filtered_report( """ Filter a report such that the totals, etc. are only pertaining to the given component. """ + print(report) flags, paths = [], [] for component in components: flags.extend(component.get_matching_flags(report.flags.keys())) From 90a13254b654b754b584e66a9ac24b0077755a22 Mon Sep 17 00:00:00 2001 From: Suejung Shin Date: Tue, 4 Mar 2025 21:52:58 -0800 Subject: [PATCH 07/16] retain original function signature --- services/components.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/components.py b/services/components.py index f1bf834634..01d2c80166 100644 --- a/services/components.py +++ b/services/components.py @@ -26,12 +26,13 @@ def commit_components(commit: Commit, owner: Owner | None) -> List[Component]: def component_filtered_report( - report, components + report: Report, components: List[Component] ) -> FilteredReport: """ Filter a report such that the totals, etc. are only pertaining to the given component. """ print(report) + flags, paths = [], [] for component in components: flags.extend(component.get_matching_flags(report.flags.keys())) From c9098aad823f633b3a926c66260da0d3737a97a3 Mon Sep 17 00:00:00 2001 From: Suejung Shin Date: Tue, 4 Mar 2025 22:02:56 -0800 Subject: [PATCH 08/16] trigger another run --- services/components.py | 1 + 1 file changed, 1 insertion(+) diff --git a/services/components.py b/services/components.py index 01d2c80166..b8176f17b5 100644 --- a/services/components.py +++ b/services/components.py @@ -32,6 +32,7 @@ def component_filtered_report( Filter a report such that the totals, etc. are only pertaining to the given component. """ print(report) + print(components) flags, paths = [], [] for component in components: From 7f70c2aa15b17de41eb6b01001b488994702a449 Mon Sep 17 00:00:00 2001 From: Suejung Shin Date: Tue, 4 Mar 2025 22:07:05 -0800 Subject: [PATCH 09/16] try to force a mypy error --- services/components.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/components.py b/services/components.py index b8176f17b5..190dee1237 100644 --- a/services/components.py +++ b/services/components.py @@ -33,7 +33,12 @@ def component_filtered_report( """ print(report) print(components) - + + # This will fail mypy with "Item "None" of "Optional[Report]" has no attribute "filter"" + # Because we're not checking if report is None before accessing filter() + report: Optional[Report] = report + filtered_report = report.filter(flags=flags, paths=paths) + flags, paths = [], [] for component in components: flags.extend(component.get_matching_flags(report.flags.keys())) From 7323258a66aae8aa2427ca68bdc1186e4d3c5426 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Wed, 5 Mar 2025 10:02:19 -0500 Subject: [PATCH 10/16] tt5 From a51efc94789af2c89444c6e6377360e94c30d0e4 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Wed, 5 Mar 2025 10:06:50 -0500 Subject: [PATCH 11/16] tt6 --- .github/workflows/ci.yml | 3 +-- Makefile | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f01c06e74..ad18addd0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,7 +116,6 @@ jobs: --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \ --organization-slug codecov \ python \ - --python-path $(which python3) \ - --tool mypy + --python-path $(which python3) \ No newline at end of file diff --git a/Makefile b/Makefile index 499d520efe..bea54b57ab 100644 --- a/Makefile +++ b/Makefile @@ -63,14 +63,11 @@ lint.install.local: uv add --dev ruff lint.run: - ruff check ruff format lint.check: echo "Linting..." - ruff check echo "Formatting..." - ruff format --check build.requirements: # if docker pull succeeds, we have already build this version of From 1457f8c59d518c3ff637a3a3d89be62d106c195d Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Wed, 5 Mar 2025 11:04:55 -0500 Subject: [PATCH 12/16] t32 --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad18addd0b..5213aca952 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,6 +116,7 @@ jobs: --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \ --organization-slug codecov \ python \ - --python-path $(which python3) + --python-path $(which python3) \ + --tool ruff \ No newline at end of file From 8d25adb07916b2d9c5968feedea8fe6b04496dc4 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Wed, 5 Mar 2025 16:08:47 -0500 Subject: [PATCH 13/16] full throttle --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5213aca952..ad18addd0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,7 +116,6 @@ jobs: --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \ --organization-slug codecov \ python \ - --python-path $(which python3) \ - --tool ruff + --python-path $(which python3) \ No newline at end of file From f3184ad677f302657ef836c58e67ffffe53d5b1f Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Tue, 18 Mar 2025 17:10:08 -0400 Subject: [PATCH 14/16] Add upload-overwatch.yml workflow for PR #1196 --- .github/workflows/upload-overwatch.yml | 48 ++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/upload-overwatch.yml diff --git a/.github/workflows/upload-overwatch.yml b/.github/workflows/upload-overwatch.yml new file mode 100644 index 0000000000..ea099e9296 --- /dev/null +++ b/.github/workflows/upload-overwatch.yml @@ -0,0 +1,48 @@ +# Created on 2025-03-18 17:10:08 +name: Upload Overwatch - 2025-03-18 17:10:08 + +on: + pull_request: + types: + - opened + - synchronize + push: + branches-ignore: + - main + +jobs: + upload-overwatch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + - name: Install UV + run: pip install uv + - name: Install Project Dependencies + run: | + uv export --format requirements-txt > requirements.txt + uv pip install -r requirements.txt --system + - name: Install Static Analysis Tools + run: | + pip install mypy==1.15.0 + pip install ruff==0.9.6 + - name: Install Build Dependencies + run: | + sudo apt-get update + # Install libssl1.1 from Ubuntu 20.04 repositories + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb + sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb + - name: Install Overwatch CLI + run: | + curl -o overwatch-cli https://overwatch.codecov.dev/linux/cli + chmod +x overwatch-cli + - name: Run Overwatch CLI + run: | + ./overwatch-cli \ + --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \ + --organization-slug codecov \ + --pullid 1196 \ + python \ + --python-path $(which python3) From b3ed56f38ed1a8b7ad3863e75dcbed4d013bf94e Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Wed, 19 Mar 2025 14:08:22 -0400 Subject: [PATCH 15/16] Add upload-overwatch.yml workflow for PR #1196 --- .github/workflows/upload-overwatch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-overwatch.yml b/.github/workflows/upload-overwatch.yml index ea099e9296..18b9c879b4 100644 --- a/.github/workflows/upload-overwatch.yml +++ b/.github/workflows/upload-overwatch.yml @@ -1,5 +1,5 @@ -# Created on 2025-03-18 17:10:08 -name: Upload Overwatch - 2025-03-18 17:10:08 +# Created on 2025-03-19 14:08:22 +name: Upload Overwatch - 2025-03-19 14:08:22 on: pull_request: From c511b6ea5264a4ae2c8e41dfad075b3bab601afe Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Thu, 20 Mar 2025 14:30:36 -0400 Subject: [PATCH 16/16] Add upload-overwatch.yml workflow for PR #1196 --- .github/workflows/upload-overwatch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-overwatch.yml b/.github/workflows/upload-overwatch.yml index 18b9c879b4..daf6b3a8a8 100644 --- a/.github/workflows/upload-overwatch.yml +++ b/.github/workflows/upload-overwatch.yml @@ -1,5 +1,5 @@ -# Created on 2025-03-19 14:08:22 -name: Upload Overwatch - 2025-03-19 14:08:22 +# Created on 2025-03-20 14:30:36 +name: Upload Overwatch - 2025-03-20 14:30:36 on: pull_request: