Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5ff85b6
Rewrite python legacy APIs in golang
lukaszgryglicki Mar 11, 2026
6f6499e
Merge branch 'dev' into unicron-rewrite-py2go
lukaszgryglicki Mar 11, 2026
2b495d3
Address AI feedback
lukaszgryglicki Mar 11, 2026
3ff7815
Address AI feedback
lukaszgryglicki Mar 11, 2026
9c00de1
Address AI feedback
lukaszgryglicki Mar 11, 2026
ee1fe01
Address AI feedback 2
lukaszgryglicki Mar 11, 2026
9a3f9ce
Address AI feedback 3
lukaszgryglicki Mar 11, 2026
a806c45
Fix the CI
lukaszgryglicki Mar 11, 2026
cf800d3
Fix the CI 2
lukaszgryglicki Mar 11, 2026
071c32f
Fix the CI 3
lukaszgryglicki Mar 11, 2026
f936a1e
Merge remote-tracking branch 'origin/dev' into unicron-rewrite-py2go
lukaszgryglicki Mar 11, 2026
46f4baa
Fix the CI 4
lukaszgryglicki Mar 11, 2026
c132688
Fix the CI 5
lukaszgryglicki Mar 11, 2026
fb6cbf7
Fix the CI 6
lukaszgryglicki Mar 11, 2026
77a49d9
Fix the CI 7
lukaszgryglicki Mar 11, 2026
2c4edf8
Fix the CI 8
lukaszgryglicki Mar 11, 2026
cda4ac9
Fix the CI 9
lukaszgryglicki Mar 11, 2026
8fe3ed2
Fix the CI 10
lukaszgryglicki Mar 11, 2026
74e6ee1
Fix the CI 11
lukaszgryglicki Mar 11, 2026
b8c8878
Fix the CI 12
lukaszgryglicki Mar 11, 2026
a12aff9
Fix the CI 13
lukaszgryglicki Mar 11, 2026
a3d24cf
Fix the CI 14
lukaszgryglicki Mar 11, 2026
9efd666
DDog updates/API templates collapse updates
lukaszgryglicki Mar 12, 2026
f25d995
Removing python v1/v2 APIs
lukaszgryglicki Mar 12, 2026
3ff782d
Update .gitignore
lukaszgryglicki Mar 12, 2026
82d13de
Manual rebase
lukaszgryglicki Mar 17, 2026
24901b5
WIP update to sync with the latest feature request
lukaszgryglicki Mar 17, 2026
d0f1838
Resolve conflict: keep utils.py deleted
lukaszgryglicki Mar 17, 2026
66b7365
SYnc one tool update
lukaszgryglicki Mar 18, 2026
a4f11e5
Merge branch 'dev' into unicron-rewrite-py2go
lukaszgryglicki Mar 18, 2026
7deed32
Merge branch 'dev' into unicron-rewrite-py2go
lukaszgryglicki Mar 18, 2026
66e3338
Merge branch 'dev' into unicron-rewrite-py2go
lukaszgryglicki Mar 19, 2026
b32b627
Fix the CI
lukaszgryglicki Mar 19, 2026
23d74e3
Merge dev into unicron-rewrite-py2go keeping Python files removed
lukaszgryglicki Apr 1, 2026
9daacce
Backport recent changes to py -> go rewrite
lukaszgryglicki Apr 1, 2026
753b977
Fix the CI
lukaszgryglicki Apr 1, 2026
dbb3227
Final patch?
lukaszgryglicki Apr 2, 2026
1958400
Revert unneeded cla-backend-go changes
lukaszgryglicki Apr 2, 2026
a17f5e8
Fix the CI
lukaszgryglicki Apr 2, 2026
66d2b2f
Manual merge - WIP
lukaszgryglicki Apr 8, 2026
f053d26
Backuport
lukaszgryglicki Apr 8, 2026
4516fe2
Backport recent changes to legacy go
lukaszgryglicki Apr 8, 2026
5d628cc
Merge with dev
lukaszgryglicki Apr 8, 2026
ccae910
Merge branch 'dev' into unicron-rewrite-py2go
lukaszgryglicki Apr 9, 2026
83dcd66
Merge branch 'dev' into unicron-rewrite-py2go
lukaszgryglicki Apr 9, 2026
5fc5df0
Fix the CI
lukaszgryglicki Apr 9, 2026
b692fdf
Remove no longer needed file
lukaszgryglicki Apr 14, 2026
20894ca
Fix the CI
lukaszgryglicki Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,21 @@ jobs:
- name: Go Lint
working-directory: cla-backend-go
run: make lint

- name: Go Setup CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
go mod tidy

- name: Go Build CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
make lambdas

- name: Go Test CLA Legacy Backend
working-directory: cla-backend-legacy
run: go test ./...
Comment thread
lukaszgryglicki marked this conversation as resolved.

- name: Go Lint CLA Legacy Backend
working-directory: cla-backend-legacy
run: make lint
112 changes: 112 additions & 0 deletions .github/workflows/cla-backend-legacy-deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
# Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MIT

name: Build and Deploy CLA Legacy Backend to DEV
on:
push:
branches:
- dev
paths:
- 'cla-backend-legacy/**'
- '.github/workflows/cla-backend-legacy-deploy-dev.yml'

permissions:
# These permissions are needed to interact with GitHub's OIDC Token endpoint to fetch/set the AWS deployment credentials.
id-token: write
contents: read

env:
AWS_REGION: us-east-1
STAGE: dev
DD_VERSION: ${{ github.sha }}

jobs:
build-deploy-legacy-dev:
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Go Version
run: go version

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
audience: sts.amazonaws.com
role-to-assume: arn:aws:iam::395594542180:role/github-actions-deploy
aws-region: us-east-1

- name: Cache Go modules
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Configure Git to clone private Github repos
run: git config --global url."https://${TOKEN_USER}:${TOKEN}@github.com".insteadOf "https://github.com"
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER_GITHUB }}

- name: Add OS Tools
run: sudo apt update && sudo apt-get install file -y

- name: Go Setup CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
go mod tidy

- name: Go Build CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
make lambdas

- name: Go Test CLA Legacy Backend
working-directory: cla-backend-legacy
run: go test ./...

- name: Go Lint CLA Legacy Backend
working-directory: cla-backend-legacy
run: make lint

- name: Setup Deployment
working-directory: cla-backend-legacy
run: |
npm install

- name: EasyCLA Legacy Backend Deployment us-east-1
working-directory: cla-backend-legacy
run: |
if [[ ! -f bin/legacy-api-lambda ]]; then echo "Missing bin/legacy-api-lambda binary file. Exiting..."; exit 1; fi
if [[ ! -f serverless.yml ]]; then echo "Missing serverless.yml file. Exiting..."; exit 1; fi
# Create empty env.json if it doesn't exist
echo '{}' > env.json
npx serverless deploy --force --stage ${STAGE} --region us-east-1 --verbose

- name: EasyCLA Legacy Backend Service Check
run: |
sudo apt install curl jq -y

# Development environment endpoints to test
declare -r v1_url="https://apigo.lfcla.${STAGE}.platform.linuxfoundation.org/v1/health"
declare -r v2_url="https://apigo.lfcla.${STAGE}.platform.linuxfoundation.org/v2/health"

echo "Validating v1 backend using endpoint: ${v1_url}"
curl --fail -XGET ${v1_url} || echo "v1 health endpoint check failed (expected for now)"

echo "Validating v2 backend using endpoint: ${v2_url}"
curl --fail -XGET ${v2_url} || echo "v2 health endpoint check failed (expected for now)"
112 changes: 112 additions & 0 deletions .github/workflows/cla-backend-legacy-deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
# Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MIT

name: Build and Deploy CLA Legacy Backend to PROD
on:
push:
branches:
- main
paths:
- 'cla-backend-legacy/**'
- '.github/workflows/cla-backend-legacy-deploy-prod.yml'

permissions:
# These permissions are needed to interact with GitHub's OIDC Token endpoint to fetch/set the AWS deployment credentials.
id-token: write
contents: read

env:
AWS_REGION: us-east-1
STAGE: prod
DD_VERSION: ${{ github.sha }}

jobs:
build-deploy-legacy-prod:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Go Version
run: go version

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
audience: sts.amazonaws.com
role-to-assume: arn:aws:iam::716487311010:role/github-actions-deploy
aws-region: us-east-1

- name: Cache Go modules
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Configure Git to clone private Github repos
run: git config --global url."https://${TOKEN_USER}:${TOKEN}@github.com".insteadOf "https://github.com"
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER_GITHUB }}

- name: Add OS Tools
run: sudo apt update && sudo apt-get install file -y

- name: Go Setup CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
go mod tidy

- name: Go Build CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
make lambdas

- name: Go Test CLA Legacy Backend
working-directory: cla-backend-legacy
run: go test ./...

- name: Go Lint CLA Legacy Backend
working-directory: cla-backend-legacy
run: make lint

- name: Setup Deployment
working-directory: cla-backend-legacy
run: |
npm install

- name: EasyCLA Legacy Backend Deployment us-east-1
working-directory: cla-backend-legacy
run: |
if [[ ! -f bin/legacy-api-lambda ]]; then echo "Missing bin/legacy-api-lambda binary file. Exiting..."; exit 1; fi
if [[ ! -f serverless.yml ]]; then echo "Missing serverless.yml file. Exiting..."; exit 1; fi
# Create empty env.json if it doesn't exist
echo '{}' > env.json
npx serverless deploy --force --stage ${STAGE} --region us-east-1 --verbose

- name: EasyCLA Legacy Backend Service Check
run: |
sudo apt install curl jq -y

# Production environment endpoints to test
declare -r v1_url="https://apigo.easycla.lfx.linuxfoundation.org/v1/health"
declare -r v2_url="https://apigo.easycla.lfx.linuxfoundation.org/v2/health"

echo "Validating v1 backend using endpoint: ${v1_url}"
curl --fail -XGET ${v1_url} || echo "v1 health endpoint check failed (expected for now)"

echo "Validating v2 backend using endpoint: ${v2_url}"
curl --fail -XGET ${v2_url} || echo "v2 health endpoint check failed (expected for now)"
106 changes: 105 additions & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,24 @@ jobs:
working-directory: cla-backend-go
run: make lint

- name: Go Setup CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
go mod tidy
Comment on lines +99 to +102
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Same go mod tidy concern applies here.

In deploy workflows, dependency drift is even more critical to catch early. Consider using go mod download + go mod verify to fail on drift rather than silently fixing it.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-dev.yml around lines 128 - 131, Update the "Go
Setup CLA Legacy Backend" step (working-directory: cla-backend-legacy) to stop
running `go mod tidy`; instead run `go mod download` followed by `go mod verify`
so the workflow fails on dependency drift rather than silently modifying
go.sum/go.mod—replace the `go mod tidy` command with `go mod download` and `go
mod verify` in that step.


- name: Go Build CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
make lambdas

- name: Go Test CLA Legacy Backend
working-directory: cla-backend-legacy
run: go test ./...

- name: Go Lint CLA Legacy Backend
working-directory: cla-backend-legacy
run: make lint

- name: Setup Deployment
working-directory: cla-backend
run: |
Expand Down Expand Up @@ -222,14 +240,100 @@ jobs:
exit ${exit_code}
fi

- name: EasyCLA Legacy Backend Deployment us-east-1
working-directory: cla-backend-legacy
run: |
if [[ ! -f bin/legacy-api-lambda ]]; then echo "Missing bin/legacy-api-lambda binary file. Exiting..."; exit 1; fi
if [[ ! -f serverless.yml ]]; then echo "Missing serverless.yml file. Exiting..."; exit 1; fi
npm install
npx serverless deploy --force --stage ${STAGE} --region us-east-1 --verbose

- name: EasyCLA Legacy Backend Service Check
run: |
sudo apt install curl jq -y

# Development environment endpoints to test
declare -r v1_legacy_url="https://apigo.lfcla.${STAGE}.platform.linuxfoundation.org/v1/health"
declare -r v2_legacy_url="https://apigo.lfcla.${STAGE}.platform.linuxfoundation.org/v2/health"

echo "Validating v1 legacy backend using endpoint: ${v1_legacy_url}"
curl --fail -XGET ${v1_legacy_url} || echo "v1 legacy health endpoint check failed (expected for now)"

echo "Validating v2 legacy backend using endpoint: ${v2_legacy_url}"
curl --fail -XGET ${v2_legacy_url} || echo "v2 legacy health endpoint check failed (expected for now)"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

legacy-backend-deploy:
name: Deploy CLA Legacy Backend
runs-on: ubuntu-latest
environment: dev
needs: build-deploy-dev
steps:
- uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
audience: sts.amazonaws.com
role-to-assume: arn:aws:iam::395594542180:role/github-actions-deploy
aws-region: us-east-1

- name: Configure Git to clone private Github repos
run: git config --global url."https://${TOKEN_USER}:${TOKEN}@github.com".insteadOf "https://github.com"
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }}
TOKEN_USER: ${{ secrets.PERSONAL_ACCESS_TOKEN_USER_GITHUB }}

- name: Go Setup CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
go mod tidy

- name: Go Build CLA Legacy Backend
working-directory: cla-backend-legacy
run: |
make lambdas
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

- name: EasyCLA Legacy Backend Deployment us-east-1
working-directory: cla-backend-legacy
run: |
if [[ ! -f bin/legacy-api-lambda ]]; then echo "Missing bin/legacy-api-lambda binary file. Exiting..."; exit 1; fi
if [[ ! -f serverless.yml ]]; then echo "Missing serverless.yml file. Exiting..."; exit 1; fi
npm install
npx serverless deploy --force --stage ${STAGE} --region us-east-1 --verbose

- name: EasyCLA Legacy Backend Service Check
run: |
sudo apt install curl jq -y

# Development environment endpoints to test
declare -r v1_legacy_url="https://apigo.lfcla.${STAGE}.platform.linuxfoundation.org/v1/health"
declare -r v2_legacy_url="https://apigo.lfcla.${STAGE}.platform.linuxfoundation.org/v2/health"

echo "Validating v1 legacy backend using endpoint: ${v1_legacy_url}"
curl --fail -XGET ${v1_legacy_url} || echo "v1 legacy health endpoint check failed (expected for now)"

echo "Validating v2 legacy backend using endpoint: ${v2_legacy_url}"
curl --fail -XGET ${v2_legacy_url} || echo "v2 legacy health endpoint check failed (expected for now)"


cypress-functional-after-deploy:
name: Cypress Functional Tests (post-deploy) - executes on a freshly deployed dev API.
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
runs-on: ubuntu-latest
continue-on-error: true
timeout-minutes: 75
needs: build-deploy-dev
needs: [build-deploy-dev, legacy-backend-deploy]
environment: dev
defaults:
run:
Expand Down
Loading
Loading