Skip to content

Fix bug when attempting to invalidate non-existing ICLA - #5162

Open
lukaszgryglicki wants to merge 1 commit into
devfrom
unicron-fix-invalidate-non-existing-bug
Open

Fix bug when attempting to invalidate non-existing ICLA#5162
lukaszgryglicki wants to merge 1 commit into
devfrom
unicron-fix-invalidate-non-existing-bug

Conversation

@lukaszgryglicki

Copy link
Copy Markdown
Member

Fix bug when attempting to invalidate non-existing ICLA

cc @mlehotskylf @ahmedomosanya

Signed-off-by: Łukasz Gryglicki lgryglicki@cncf.io

Assisted by OpenAI

Assisted by GitHub Copilot

Assisted by Claude

Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>

Assisted by [OpenAI](https://platform.openai.com/)

Assisted by [GitHub Copilot](https://github.com/features/copilot)

Assisted by [Claude](https://claude.ai)
@lukaszgryglicki lukaszgryglicki self-assigned this Aug 27, 2026
Copilot AI balanced review requested due to automatic review settings August 27, 2026 06:31
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7f7c0f88-7b7f-4180-869e-a34953af8b8b

📥 Commits

Reviewing files that changed from the base of the PR and between 4a9afe5 and 191921e.

📒 Files selected for processing (2)
  • cla-backend-go/v2/signatures/service.go
  • cla-backend-go/v2/signatures/service_test.go

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

InvalidateICLA now handles a missing active signature by logging the condition and returning an error. A regression test covers the empty lookup result.

Changes

ICLA invalidation

Layer / File(s) Summary
Missing active signature handling
cla-backend-go/v2/signatures/service.go, cla-backend-go/v2/signatures/service_test.go
InvalidateICLA returns a descriptive error when no active ICLA signature exists. The regression test verifies the error for an empty successful lookup.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 19192

This is a localized fix for invalidating a non-existing ICLA, with the resulting error mapped to HTTP 400; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description states that the pull request fixes a bug when attempting to invalidate a non-existing ICLA. This matches the changeset and objective.
Title check ✅ Passed The title clearly summarizes the main change: fixing invalidation of a non-existing ICLA.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch unicron-fix-invalidate-non-existing-bug

Comment @coderabbitai help to get the list of available commands.

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

Prevents a panic when invalidating a missing or already-invalidated ICLA.

Changes:

  • Returns a descriptive error when no active ICLA exists.
  • Adds regression coverage for the (nil, nil) lookup result.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cla-backend-go/v2/signatures/service.go Guards against a nil signature.
cla-backend-go/v2/signatures/service_test.go Tests missing active ICLA handling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants