Skip to content
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

feat: add labels from nri-winservices config as tags on UI. #1989

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abhishuraina
Copy link

Add labels from nri-winservices config as tags on the UI.

@abhishuraina abhishuraina requested a review from a team as a code owner January 10, 2025 08:07
@coveralls
Copy link

coveralls commented Jan 10, 2025

Pull Request Test Coverage Report for Build 12705852369

Details

  • 4 of 7 (57.14%) changed or added relevant lines in 1 file are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.004%) to 57.34%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/entity/register/worker.go 4 7 57.14%
Files with Coverage Reduction New Missed Lines %
internal/agent/event_sender.go 1 78.11%
internal/agent/event_sender_vortex.go 1 73.78%
pkg/config/config.go 2 70.63%
Totals Coverage Status
Change from base Build 12685311280: 0.004%
Covered Lines: 15366
Relevant Lines: 26798

💛 - Coveralls

entities = append(entities, r.Data.Entity)
entity := r.Data.Entity
// Add labels to Metadata
if r.Definition.Labels != nil && len(r.Definition.Labels) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it required to check the nilness? If Labels is nil, len(r.Definition.Labels) will be 0, won't it?

entities = append(entities, r.Data.Entity)
entity := r.Data.Entity
// Add labels to Metadata
if r.Definition.Labels != nil && len(r.Definition.Labels) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to extract it in a short util func and add some unit tests? (Would improve coverage as well :))
But it's totally fine if we don't do this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding the unit tests for this is an excellent point ;-)

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.

4 participants