-
Notifications
You must be signed in to change notification settings - Fork 102
Remote Labels Configuration #1402
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1402 +/- ##
==========================================
- Coverage 86.00% 85.22% -0.78%
==========================================
Files 102 102
Lines 12825 12928 +103
==========================================
- Hits 11030 11018 -12
- Misses 1307 1424 +117
+ Partials 488 486 -2
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| input []*structpb.Struct | ||
| }{ | ||
| { | ||
| name: "Test 1: Valid input with simple key-value pairs", |
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.
Missing cases for slices, and structs
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.
Should there be a test for invalid values? Empty values, blank "" values and special characters.
For valid scenario, should we include "config-sync-group" key?
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.
Tests for this function should be pretty generic, the exact strings we place in the tests shouldn't really matter
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.
This function is only to covert to a map validation will be done elsewhere
api/grpc/mpi/v1/helpers.go
Outdated
| case *structpb.Value_BoolValue: | ||
| convertedMap[key] = field.GetBoolValue() | ||
| default: | ||
| slog.Warn("unknown type for map conversion", "value", kind) |
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.
| slog.Warn("unknown type for map conversion", "value", kind) | |
| slog.Warn("Unknown type for map conversion", "key", key, "value", kind) |
| oc.restartCollector(ctx) | ||
| } | ||
| } else { | ||
| oc.config = agentConfig |
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.
Can you add an info log here saying that new headers have being added and the collector is bing restarted
Proposed changes
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)