Skip to content

Commit c0de038

Browse files
authored
Merge branch 'main' into fahim/used-abstract-classes-instead-interfaces
2 parents 5aa4e49 + d2d00cd commit c0de038

File tree

280 files changed

+47257
-14302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+47257
-14302
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
/admission-server/ @JivusAyrus @StarpTech @thisisnithin
88
/cdn-server/ @JivusAyrus @StarpTech @thisisnithin
99
/cli/ @endigma @JivusAyrus @StarpTech @jensneuse @endigma
10-
/composition/ @Aenimus @JivusAyrus @StarpTech
11-
/composition-go/ @Aenimus @JivusAyrus @StarpTech @jensneuse
10+
/composition/ @Aenimus @JivusAyrus @StarpTech @thisisnithin
11+
/composition-go/ @Aenimus @JivusAyrus @StarpTech @jensneuse @thisisnithin
1212
/connect/ @Aenimus @JivusAyrus @StarpTech @jensneuse @endigma
1313
/connect-go/ @Aenimus @JivusAyrus @StarpTech @jensneuse @endigma
1414
/controlplane/ @JivusAyrus @wilsonrivera @StarpTech @thisisnithin
15-
/graphqlmetrics/ @Noroth @StarpTech @miklosbarabas
16-
/helm/ @Noroth @StarpTech @miklosbarabas
17-
/infrastructure/ @Noroth @StarpTech @miklosbarabas
15+
/graphqlmetrics/ @Noroth @StarpTech
16+
/helm/ @Noroth @StarpTech
17+
/infrastructure/ @Noroth @StarpTech
1818
/keycloak/ @JivusAyrus @wilsonrivera @StarpTech @thisisnithin
19-
/otelcollector/ @Noroth @StarpTech @miklosbarabas
19+
/otelcollector/ @Noroth @StarpTech
2020
/playground/ @wundergraph/Router @thisisnithin @StarpTech
2121
/proto/ @JivusAyrus @wilsonrivera @StarpTech @endigma
2222
/protographic/ @Noroth @StarpTech @endigma
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: 'Codecov Download and Upload'
2+
description: 'Download coverage artifacts from previous PR runs and upload to Codecov'
3+
4+
inputs:
5+
coverage-path:
6+
description: 'Path to coverage files'
7+
required: true
8+
workflow-paths:
9+
description: 'Comma-separated list of workflow paths for artifact lookup (e.g., ".github/workflows/router-ci.yaml,.github/workflows/cli-ci.yaml")'
10+
required: true
11+
override-commit:
12+
description: 'Commit SHA to override in Codecov'
13+
required: true
14+
merge-commit-sha:
15+
description: 'Merge commit SHA to look up the PR and find head SHA'
16+
required: false
17+
default: ''
18+
codecov-token:
19+
description: 'Codecov token for uploading'
20+
required: true
21+
github-token:
22+
description: 'GitHub token for artifact operations'
23+
required: true
24+
25+
runs:
26+
using: 'composite'
27+
steps:
28+
- name: Find latest successful PR runs for this commit
29+
id: find-artifacts
30+
shell: bash
31+
env:
32+
GITHUB_TOKEN: ${{ inputs.github-token }}
33+
REPO: ${{ github.repository }}
34+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
35+
MERGE_COMMIT_SHA: ${{ inputs.merge-commit-sha }}
36+
CURRENT_RUN_ID: ${{ github.run_id }}
37+
ARTIFACT_NAME_PATTERN: codecov
38+
WORKFLOW_PATHS: ${{ inputs.workflow-paths }}
39+
run: ./.github/scripts/find-codecov-artifact.sh
40+
41+
- name: Download coverage artifacts
42+
if: steps.find-artifacts.outputs.has_artifacts == 'true'
43+
shell: bash
44+
env:
45+
GITHUB_TOKEN: ${{ inputs.github-token }}
46+
REPO: ${{ github.repository }}
47+
ARTIFACTS_JSON: ${{ steps.find-artifacts.outputs.artifacts_json }}
48+
COVERAGE_PATH: ${{ inputs.coverage-path }}
49+
run: ./.github/scripts/download-codecov-artifacts.sh
50+
51+
- name: Upload results to Codecov
52+
if: steps.find-artifacts.outputs.has_artifacts == 'true'
53+
uses: codecov/codecov-action@v5
54+
with:
55+
token: ${{ inputs.codecov-token }}
56+
override_commit: ${{ inputs.override-commit }}
57+
override_branch: main
58+
directory: ${{ inputs.coverage-path }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 'Codecov Upload PR'
2+
description: 'Upload coverage artifacts during PR and send to Codecov'
3+
4+
inputs:
5+
artifact-name:
6+
description: 'Name of the coverage artifact'
7+
required: false
8+
default: 'pr-build'
9+
coverage-path:
10+
description: 'Path to coverage files'
11+
required: true
12+
retention-days:
13+
description: 'Days to retain the artifact'
14+
required: false
15+
default: '7'
16+
codecov-token:
17+
description: 'Codecov token for uploading'
18+
required: true
19+
20+
runs:
21+
using: 'composite'
22+
steps:
23+
- name: Upload artifact for PR
24+
uses: actions/upload-artifact@v4
25+
with:
26+
overwrite: true
27+
name: codecov-pr-build-${{ inputs.artifact-name }}
28+
path: ${{ inputs.coverage-path }}
29+
retention-days: ${{ inputs.retention-days }}
30+
31+
- name: Upload results to Codecov
32+
uses: codecov/codecov-action@v5
33+
with:
34+
token: ${{ inputs.codecov-token }}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
# This script downloads coverage artifacts from GitHub Actions runs.
4+
#
5+
# Required environment variables:
6+
# GITHUB_TOKEN: Required for GitHub CLI authentication
7+
# REPO: GitHub repository (e.g., owner/repo)
8+
# ARTIFACTS_JSON: JSON array of artifacts to download (from find-codecov-artifact.sh output)
9+
# COVERAGE_PATH: Directory where artifacts should be downloaded
10+
#
11+
12+
set -e
13+
14+
GITHUB_TOKEN="${GITHUB_TOKEN:?GITHUB_TOKEN environment variable is required}"
15+
REPO="${REPO:?REPO environment variable is required}"
16+
ARTIFACTS_JSON="${ARTIFACTS_JSON:?ARTIFACTS_JSON environment variable is required}"
17+
COVERAGE_PATH="${COVERAGE_PATH:?COVERAGE_PATH environment variable is required}"
18+
19+
echo "Downloading artifacts..."
20+
21+
# Validate JSON before processing
22+
if ! echo "$ARTIFACTS_JSON" | jq empty 2>/dev/null; then
23+
echo "ERROR: Invalid JSON received from artifact discovery step" >&2
24+
echo "JSON content (truncated to 500 chars):" >&2
25+
echo "$ARTIFACTS_JSON" | head -c 500 >&2
26+
echo "" >&2
27+
exit 1
28+
fi
29+
30+
echo "$ARTIFACTS_JSON" | jq -c '.[]' | while read -r artifact; do
31+
run_id=$(echo "$artifact" | jq -r '.run_id')
32+
artifact_id=$(echo "$artifact" | jq -r '.artifact_id')
33+
artifact_name=$(echo "$artifact" | jq -r '.artifact_name')
34+
35+
echo "Downloading artifact: $artifact_name (ID: $artifact_id) from run: $run_id"
36+
37+
# Download artifact using GitHub CLI
38+
gh run download "$run_id" \
39+
--repo "$REPO" \
40+
--name "$artifact_name" \
41+
--dir "$COVERAGE_PATH/$artifact_name"
42+
43+
if [ $? -eq 0 ]; then
44+
echo "✓ Successfully downloaded $artifact_name"
45+
else
46+
echo "✗ Failed to download $artifact_name" >&2
47+
exit 1
48+
fi
49+
done
50+
51+
echo "All artifacts downloaded successfully"
52+

0 commit comments

Comments
 (0)