Skip to content

Fix CI lint test failures#5086

Merged
lukaszgryglicki merged 1 commit into
devfrom
unicron-fix-ci-lint-test-failures
Jun 3, 2026
Merged

Fix CI lint test failures#5086
lukaszgryglicki merged 1 commit into
devfrom
unicron-fix-ci-lint-test-failures

Conversation

@lukaszgryglicki

Copy link
Copy Markdown
Member

Signed-off-by: Lukasz Gryglicki lgryglicki@cncf.io

Assisted by OpenAI

Assisted by GitHub Copilot

Assisted by Claude

Signed-off-by: Lukasz 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 Jun 3, 2026
Copilot AI review requested due to automatic review settings June 3, 2026 13:24
@coderabbitai

coderabbitai Bot commented Jun 3, 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: 65951755-6184-49e7-bdad-e72251fdf8b0

📥 Commits

Reviewing files that changed from the base of the PR and between 19f7ba8 and 65ee644.

📒 Files selected for processing (3)
  • cla-backend-go/company/repository.go
  • cla-backend-go/v2/sign/service.go
  • cla-backend-go/v2/sign/service_sss_test.go

Walkthrough

This PR refactors the compliance cache mutex in the sign service from a value type to a pointer, updates constructor initialization and test setup to match, and includes a minor formatting adjustment to a DynamoDB expression in the company repository.

Changes

Compliance Cache Synchronization Refactoring

Layer / File(s) Summary
Service struct mutex pointer conversion
cla-backend-go/v2/sign/service.go
complianceCacheMu field changes from sync.Mutex value to *sync.Mutex pointer, with matching pointer initialization in NewService constructor via &sync.Mutex{}.
Cache mutex test updates
cla-backend-go/v2/sign/service_sss_test.go
sync package imported and two cache-related test cases updated to initialize complianceCacheMu with &sync.Mutex{} when constructing service structs.
Repository expression formatting
cla-backend-go/company/repository.go
DynamoDB UpdateExpression in ClearCompanySanctionStatusIfSSS reformatted without logical change to SET/REMOVE operations.

Possibly Related PRs

  • linuxfoundation/easycla#5078: Introduces compliance result cache and SSS sanctions integration that uses the complianceCacheMu field being refactored in this PR.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix CI lint test failures' is directly related to changes made to three Go files addressing code issues that would cause linting failures.
Description check ✅ Passed The description is minimalist but related to the changeset, containing only sign-off and attribution information without elaboration on specific changes.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 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-ci-lint-test-failures

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

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 addresses CI lint/test failures by adjusting synchronization initialization in the v2 signing service and aligning a DynamoDB update input struct field formatting change.

Changes:

  • Update sign.service to store complianceCacheMu as a *sync.Mutex and initialize it in NewService.
  • Update SSS/compliance-cache unit tests to initialize the mutex when constructing service instances that exercise the compliance cache.
  • Minor formatting-only change in the company repository’s DynamoDB UpdateItemInput literal.

Reviewed changes

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

File Description
cla-backend-go/v2/sign/service.go Changes compliance cache mutex field to a pointer and initializes it in the service constructor to satisfy lint/static analysis.
cla-backend-go/v2/sign/service_sss_test.go Updates tests to provide a mutex when constructing service instances that call cache methods.
cla-backend-go/company/repository.go Formatting alignment change in DynamoDB update input literal (no behavioral change).

@lukaszgryglicki lukaszgryglicki merged commit 2b40b7c into dev Jun 3, 2026
9 of 10 checks passed
@lukaszgryglicki lukaszgryglicki deleted the unicron-fix-ci-lint-test-failures branch June 3, 2026 13:38
@coderabbitai coderabbitai Bot mentioned this pull request Jun 9, 2026
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