Skip to content

Port 3 APIs from python to golang#4736

Merged
lukaszgryglicki merged 63 commits into
mainfrom
dev
Aug 2, 2025
Merged

Port 3 APIs from python to golang#4736
lukaszgryglicki merged 63 commits into
mainfrom
dev

Conversation

@lukaszgryglicki

Copy link
Copy Markdown
Member

cc @mlehotskylf - release to sync dev with main - it only contains new APis ported from python to golang, this is not changing any functionality.

Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
… comparing to '/v2/project/<uuid>'

Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
…'true' on 2 missing fields + test coverage

Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
Added test coverage that compares '/vN/projects<uuid>' for N=2 and N=4
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
… old v2 one

Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
…e-signature-api-to-go

Port /v2/user/<user-uuid>/active-signature to golang
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
…ave as V2 APIs - accept non-v4 UUIDs

Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
…-wrong-uuid-case

Add test coverage for non-v4 and invalid UUIDs and fix v4 APIs to behave as V2 APIs - accept non-v4 UUIDs
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
…o-golang

Port '/v2/user/<uuid>' py API to '/v3/user-compat/<uuid>' go API
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
…aming

Use inclusive naming 'whitelist' -> 'allowlist'
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
… email, name

Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
…atterns-in-skip-cla

Add support for patterns matching empty or missing properties: login, email, name
@lukaszgryglicki lukaszgryglicki self-assigned this Aug 2, 2025
Copilot AI review requested due to automatic review settings August 2, 2025 14:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ports 3 APIs from Python to Golang to replace deprecated Python v2 endpoints while maintaining backward compatibility. The implementation focuses on API parity between Python and Go implementations and includes comprehensive testing infrastructure.

  • Ports /v2/project/{projectID} to /v4/project-compat/{projectID} for project details
  • Ports /v2/user/{userID}/active-signature to /v4/user/{userID}/active-signature for active signature metadata
  • Ports /v2/user/{userID} to /v3/user-compat/{userID} for user information

Reviewed Changes

Copilot reviewed 61 out of 67 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cla-backend-go/swagger/ API specification updates for new endpoints and models
cla-backend-go/v2/project/handlers.go Implements project compatibility API handler
cla-backend-go/v2/sign/service.go Implements user active signature API service
cla-backend-go/users/ Implements user compatibility API and model conversion
tests/py2go/ Comprehensive test framework comparing Python vs Go API responses
utils/ Utility scripts for testing and managing CLA configurations
BOT_ALLOWLIST.md Documentation for bot allowlisting feature
Comments suppressed due to low confidence (3)

tests/py2go/go.mod:3

  • Go version 1.24.4 does not exist. The latest stable Go version is 1.23.x. This should be updated to a valid Go version like 'go 1.23.4' or 'go 1.22.x'.
go 1.24.4

cla-backend-go/v2/sign/service.go:1850

  • Commented out debug code should be removed before production. The commented lines with 'LG:' appear to be development/testing artifacts that should be cleaned up.
	contentType := document.DocumentContentType

Comment thread cla-backend/cla/routes.py Outdated
Comment thread tests/py2go/dynamo.go
Comment thread tests/py2go/api_test.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io>
@lukaszgryglicki lukaszgryglicki merged commit 5af7462 into main Aug 2, 2025
3 checks passed
lukaszgryglicki added a commit that referenced this pull request May 7, 2026
Port 3 APIs from python to golang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants