Skip to content

Conversation

@andrest50
Copy link
Contributor

Summary

  • Removed unused indexer tags without prefixes (UID, Slug, Name, Description, MissionStatement) from ProjectBase and ProjectSettings models
  • Standardized tags to use only prefixed format (e.g., project_uid:, project_slug:, project_name:)
  • Removed parent_uid tag as it's not needed for indexing
  • Cleaned up tag generation logic for better maintainability

This ensures only necessary and properly formatted tags are sent to the indexer service.

Ticket

https://linuxfoundation.atlassian.net/browse/LFXV2-911

🤖 Generated with Claude Code

Signed-off-by: Andres Tobon <[email protected]>
Copilot AI review requested due to automatic review settings December 22, 2025 17:06
@andrest50 andrest50 requested a review from a team as a code owner December 22, 2025 17:06
@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

Walkthrough

Removed several unprefixed tag emissions from project model tag methods, updated tests to expect prefixed tag forms, bumped GoA CLI version/path in the Makefile, and incremented the Helm chart version.

Changes

Cohort / File(s) Change Summary
Project model tag logic
internal/domain/models/project.go
ProjectBase.Tags(): stopped emitting unprefixed UID, Name, Description and removed parent_uid tag; emits prefixed project_name (and other prefixed tags) instead. ProjectSettings.Tags(): removed unprefixed UID and MissionStatement; emits project_uid (prefixed) only.
Unit tests updated
internal/domain/models/project_test.go
Updated expectations to match tag-format outputs (e.g., project_uid:<uid>, project_slug:<slug>, project_name:<name>); removed expectations for raw/unprefixed field values like UID, Name, Description, and MissionStatement.
Build/tooling update
Makefile
Bumped GOA_VERSION to v3.22.6 and changed go install path from goa.design/goa/$(GOA_VERSION)/cmd/goa@latest to goa.design/goa/v3/cmd/goa@$(GOA_VERSION).
Chart version bump
charts/lfx-v2-project-service/Chart.yaml
Incremented chart version from 0.5.3 to 0.5.4.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify all call sites and consumers expecting unprefixed tags are updated to use prefixed tag names (project_uid, project_name, project_slug, etc.).
  • Review tests in internal/domain/models/project_test.go for coverage of omitted fields (e.g., ensure mission statements or descriptions are intentionally excluded).
  • Confirm the Makefile change installs the intended GoA CLI version and that generated code/builds remain compatible.
  • Validate Helm chart version bump and any deployment notes or changelogs as needed.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The Makefile GOA_VERSION update from v3 to v3.22.6 and Chart.yaml version bump appear unrelated to the core objective of removing indexer tags and handling parent_ref. These may be incidental dependency updates. Clarify the relationship between the Makefile/Chart.yaml updates and LFXV2-911, or move these changes to a separate PR focused on dependency management.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Linked Issues check ❓ Inconclusive The PR addresses LFXV2-911 by removing unused unprefixed tags (UID, Slug, Name, Description, MissionStatement) and parent_uid. However, the description mentions replacing 'misuse of tags with parent_ref', but the changeset only shows tag removal without evidence of parent_ref additions. Verify whether parent_ref field replacements were completed as required by LFXV2-911, or clarify if parent_ref updates are in separate changes or files not shown in this PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'LFXV2-911 Remove unused indexer tags' clearly identifies the main change of removing unnecessary unprefixed tags from ProjectBase and ProjectSettings models.
Description check ✅ Passed The description accurately describes the changes: removing unused indexer tags, standardizing to prefixed format, and removing parent_uid tag. It relates directly to the changeset modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch andrest50/parent-ref

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ad589a9 and 59c4299.

📒 Files selected for processing (2)
  • charts/lfx-v2-project-service/Chart.yaml
  • internal/domain/models/project_test.go
🧰 Additional context used
📓 Path-based instructions (2)
**/*_test.go

📄 CodeRabbit inference engine (CLAUDE.md)

**/*_test.go: Place unit tests alongside implementation with the same filename and *_test.go suffix
Each production function must have exactly one corresponding TestFunction test (table with multiple cases allowed)
Use table-driven tests for coverage (subtests over a single TestFunction)
Mock all external dependencies (e.g., repositories, message builders) in unit tests
Focus unit tests on exported package functions

Files:

  • internal/domain/models/project_test.go
**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

Ensure code formatting and linting pass (make fmt, make lint, make check)

Files:

  • internal/domain/models/project_test.go
🧬 Code graph analysis (1)
internal/domain/models/project_test.go (3)
api/project/v1/gen/project_service/service.go (1)
  • ProjectBase (224-271)
internal/domain/models/project.go (1)
  • ProjectBase (20-44)
api/project/v1/design/types.go (1)
  • ProjectBase (57-61)
⏰ 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). (2)
  • GitHub Check: MegaLinter
  • GitHub Check: Build and Test
🔇 Additional comments (3)
charts/lfx-v2-project-service/Chart.yaml (1)

8-8: LGTM! Appropriate version bump.

The patch version increment from 0.5.3 to 0.5.4 is appropriate for this tag cleanup and standardization change.

internal/domain/models/project_test.go (2)

13-135: LGTM! Test updates correctly reflect the new prefixed tag format.

The test cases have been properly updated to validate:

  • Prefixed tags only (e.g., project_name:Test Project instead of unprefixed Test Project)
  • Removal of Description tags (now returns nil)
  • Removal of ParentUID tags
  • Only UID, Slug, and Name fields generate tags

The bidirectional assertion approach (checking expected tags are present and no unexpected tags exist) provides thorough validation.


137-213: LGTM! Test updates correctly validate ProjectSettings tag removal.

The test cases properly validate that:

  • MissionStatement no longer generates tags (returns nil)
  • Only the UID field generates a prefixed tag (project_uid:)
  • Non-tag fields (Auditors, Writers, MeetingCoordinators, etc.) continue to not generate tags

The test coverage is comprehensive and validates the intended behavior changes.


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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
internal/domain/models/project.go (2)

61-85: Update tests to reflect new tag format - tests are currently out of sync with implementation.

The Tags() method now generates only prefixed tags (project_uid:, project_slug:, project_name:), but test expectations in project_test.go still require unprefixed tags, Description, and parent_uid tags. Lines 76-84, 92-96, and 120-128 in project_test.go must be updated to match the current implementation.

Additionally:

  1. No code was found querying by the removed unprefixed tag formats, which is positive for backwards compatibility
  2. parent_uid remains in the ProjectBase struct but is no longer included in Tags()—confirm this is intentional
  3. README.md documentation mentioned in the comment (line 59) was not updated in this PR

90-104: ProjectSettings.Tags() is missing MissionStatement tag output; current implementation breaks test expectations.

The Tags() method now only returns the project_uid tag. However, test cases in internal/domain/models/project_test.go explicitly expect MissionStatement to be included in the returned tags:

  • Test "settings with MissionStatement only" expects: ["Our mission is to test"]
  • Test "settings with all tag fields" expects: ["settings-123", "project_uid:settings-123", "Our mission is to test"]
  • Test "settings with all fields including non-tag fields" expects: the same

The current implementation violates these test expectations and will cause them to fail. Before removing the MissionStatement tag, verify that:

  1. External systems relying on the MissionStatement tag for searching/indexing are updated or can handle this removal
  2. Tests are updated to reflect the new behavior, or the MissionStatement tag is restored
  3. Any indexing functionality documented in relevant issues is aligned with this change
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d652452 and 2900677.

📒 Files selected for processing (1)
  • internal/domain/models/project.go
🧰 Additional context used
📓 Path-based instructions (1)
**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

Ensure code formatting and linting pass (make fmt, make lint, make check)

Files:

  • internal/domain/models/project.go
⏰ 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). (2)
  • GitHub Check: CodeQL analysis (go)
  • GitHub Check: MegaLinter
🔇 Additional comments (1)
internal/domain/models/project.go (1)

79-82: LGTM! Standardized tag format improves consistency.

The change to use the prefixed project_name: format aligns well with the other tags (project_uid:, project_slug:), improving consistency across the codebase.

Updates the Goa framework version from v3 (latest) to a pinned version
v3.22.6 to ensure consistent code generation and build compatibility.
This change affects the Makefile and regenerates all Goa-generated code
with the specified version.

Changes:
- Pin GOA_VERSION to v3.22.6 in Makefile
- Update goa install command to use the pinned version
- Regenerate API code with goa v3.22.6

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Andres Tobon <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2900677 and ad589a9.

⛔ Files ignored due to path filters (14)
  • api/project/v1/gen/http/cli/lfx_v2_project_service/cli.go is excluded by !**/gen/**
  • api/project/v1/gen/http/openapi.json is excluded by !**/gen/**
  • api/project/v1/gen/http/project_service/client/cli.go is excluded by !**/gen/**
  • api/project/v1/gen/http/project_service/client/client.go is excluded by !**/gen/**
  • api/project/v1/gen/http/project_service/client/encode_decode.go is excluded by !**/gen/**
  • api/project/v1/gen/http/project_service/client/paths.go is excluded by !**/gen/**
  • api/project/v1/gen/http/project_service/client/types.go is excluded by !**/gen/**
  • api/project/v1/gen/http/project_service/server/encode_decode.go is excluded by !**/gen/**
  • api/project/v1/gen/http/project_service/server/paths.go is excluded by !**/gen/**
  • api/project/v1/gen/http/project_service/server/server.go is excluded by !**/gen/**
  • api/project/v1/gen/http/project_service/server/types.go is excluded by !**/gen/**
  • api/project/v1/gen/project_service/client.go is excluded by !**/gen/**
  • api/project/v1/gen/project_service/endpoints.go is excluded by !**/gen/**
  • api/project/v1/gen/project_service/service.go is excluded by !**/gen/**
📒 Files selected for processing (1)
  • Makefile
⏰ 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). (2)
  • GitHub Check: MegaLinter
  • GitHub Check: Build and Test
🔇 Additional comments (1)
Makefile (1)

72-72: Installation path correctly aligns with version pinning.

The updated installation command properly uses the pinned version from GOA_VERSION instead of @latest, ensuring the exact version specified in line 13 is installed. This follows standard Go module installation syntax.

Updates test expectations in project_test.go to align with the new
tag format that only includes prefixed tags (project_uid:, project_slug:,
project_name:) and removes unprefixed tags, parent_uid tags, description
tags, and mission statement tags.

Changes:
- Remove expectations for unprefixed UID and Slug tags
- Remove expectations for parent_uid tags
- Remove expectations for description tags
- Remove expectations for mission statement tags
- Update Name tag expectations to use project_name: prefix
- All tests now pass with the new tag format

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Andres Tobon <[email protected]>
Copy link

Copilot AI left a comment

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.

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