Skip to content

Comments

fix: prevent component duplication#1456

Merged
jkowalleck merged 19 commits intomasterfrom
fix/prevent-component-duplication
Nov 10, 2025
Merged

fix: prevent component duplication#1456
jkowalleck merged 19 commits intomasterfrom
fix/prevent-component-duplication

Conversation

@jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented Nov 7, 2025

max619 and others added 2 commits October 2, 2025 13:06
Previously, disabling root component auto-detection while specifying a root component left the
auto-detected root in the BOM, with dependencies still attached to it (issue #1418).

This change ensures that all instances of the auto-detected root are replaced by the
user-provided component using a `componentSubstitutionMap` during component generation.

Regression tests were added for that particular case

Signed-off-by: Maxim Bagryantsev <maxbag97619@gmail.com>
@jkowalleck jkowalleck requested a review from a team as a code owner November 7, 2025 12:37
@jkowalleck jkowalleck added the bug Something isn't working label Nov 7, 2025
@jkowalleck jkowalleck requested review from Copilot and removed request for a team November 7, 2025 12:37
Copy link
Contributor

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.

Pull Request Overview

This PR refactors the generateComponents method to return unique components per package instead of returning duplicate components for each module. The key changes eliminate redundancy in the component output while maintaining correct dependency linking.

  • Simplified type annotation for the pkgs record
  • Changed return value to deduplicate components by package path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codacy-production
Copy link

codacy-production bot commented Nov 7, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.28% 95.35% (target: 80.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (daacc54) 771 725 94.03%
Head commit (0ea5663) 768 (-3) 720 (-5) 93.75% (-0.28%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1456) 43 41 95.35%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>

This comment was marked as outdated.

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck requested a review from Copilot November 7, 2025 15:01
Copy link
Contributor

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.

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jkowalleck and others added 2 commits November 10, 2025 11:15
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck marked this pull request as draft November 10, 2025 11:02
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck force-pushed the fix/prevent-component-duplication branch from 3fa1634 to 69b01fb Compare November 10, 2025 13:37
@jkowalleck jkowalleck force-pushed the fix/prevent-component-duplication branch from 69b01fb to 16d55e4 Compare November 10, 2025 13:44
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck requested a review from Copilot November 10, 2025 14:10
@jkowalleck jkowalleck marked this pull request as ready for review November 10, 2025 14:11
Copy link
Contributor

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.

Pull Request Overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
jkowalleck and others added 6 commits November 10, 2025 15:13
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck merged commit 50b3ab7 into master Nov 10, 2025
17 checks passed
@jkowalleck jkowalleck deleted the fix/prevent-component-duplication branch November 10, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] rootComponentName does not override root component but adds a new one

3 participants