-
Notifications
You must be signed in to change notification settings - Fork 1
[LFXV2-755] Remove unused total_members and total_voting_repos fields #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… API responses Changes: - Removed total_members and total_voting_repos attributes from Goa design types - Updated service response conversion functions to exclude these fields - Regenerated client/server types and OpenAPI specifications - Bumped Chart version to 0.2.11 Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-755 Signed-off-by: Mauricio Zanetti Salomao <[email protected]>
WalkthroughRemoves TotalMembers and TotalVotingRepos from domain models, API DSL and response mappings; renames Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Domain as Domain Model
participant Service as Committee Service
participant Response as GOA Response
rect rgba(100,150,250,0.06)
Domain->>Service: provide CommitteeBase / CommitteeFull (no TotalMembers/TotalVotingRepos)
Note right of Service: convertBaseToResponse / convertDomainToFullResponse\n(UID ← CommitteeBase.UID, Calendar added, pointer fields adjusted)
Service-->>Response: mapped GOA response (fields & pointers, member CreatedAt/UpdatedAt)
end
rect rgba(200,100,100,0.06)
Note left of Domain: Previous flow also mapped TotalMembers/TotalVotingRepos
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-08-25T17:59:36.255ZApplied to files:
📚 Learning: 2025-08-25T14:42:30.476ZApplied to files:
📚 Learning: 2025-08-25T14:51:22.941ZApplied to files:
📚 Learning: 2025-08-08T21:06:14.690ZApplied to files:
🧬 Code graph analysis (1)cmd/committee-api/service/committee_service_response_test.go (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (1)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request removes the total_members and total_voting_repos fields from all committee-related API types and responses, as these aggregate values will be retrieved from a separate query service instead.
- Removes field definitions and examples from OpenAPI v2 and v3 specifications
- Updates generated Go HTTP server and client code to remove field mappings and validations
- Removes DSL attribute definitions from the API design layer
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| gen/http/openapi3.yaml | Removed total_members and total_voting_repos field definitions and examples from CommitteeBaseWithReadonlyAttributes and CommitteeFullWithReadonlyAttributes schemas |
| gen/http/openapi3.json | Removed field definitions from minified JSON OpenAPI v3 spec |
| gen/http/openapi.yaml | Removed field definitions from OpenAPI v2 spec (Swagger 2.0) |
| gen/http/openapi.json | Removed field definitions from minified JSON OpenAPI v2 spec |
| gen/http/committee_service/server/types.go | Removed struct fields, field assignments in constructors, and validation logic for the removed fields |
| gen/http/committee_service/client/types.go | Removed struct fields, field assignments in constructors, and validation logic for the removed fields |
| gen/committee_service/service.go | Removed TotalMembers and TotalVotingRepos fields from service result types |
| cmd/committee-api/service/committee_service_response.go | Removed field mappings in domain-to-response conversion functions |
| cmd/committee-api/design/type.go | Removed DSL attribute functions TotalMembersAttribute() and TotalVotingReposAttribute() and their usage in type definitions |
| charts/lfx-v2-committee-service/Chart.yaml | Bumped chart version from 0.2.10 to 0.2.11 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…voting_repos fields Changes: - Updated CommitteeBase struct to remove total_members and total_voting_repos attributes. - Adjusted related test cases and mock data to reflect the removal of these fields. - Ensured consistency across service response conversions and tests. This refactor aligns with the recent changes to API responses and improves code clarity. Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-755 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Mauricio Zanetti Salomao <[email protected]>
a8b1002 to
d570370
Compare
This commit eliminates the intPtr function from the committee_service_response_test.go file, streamlining the test code. The stringPtr function remains intact for continued use. Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-755 Signed-off-by: Mauricio Zanetti Salomao <[email protected]>
Overview
Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-755
This pull request removes the
total_membersandtotal_voting_reposfields from all committee-related API types, models, and response objects. The change ensures these fields are no longer exposed in API responses or handled within the service layer, simplifying the committee data structures and API contracts.Note: The aggregate data can be retrieved via the query-service.