-
Notifications
You must be signed in to change notification settings - Fork 170
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
Consume go otel audit lib #3767
base: master
Are you sure you want to change the base?
Conversation
Please rebase pull request. |
#3766) and arosvc registries Updating checksum to sha256:dbf5304bd98cd51c72e4ae0ee8511d3bbcdbcb7e72e65e7d1495a50d7ac33b8d
* bump prettier + config * run prettier on portal * update to use native HTTP fetch * clean up some typescript lint problems * regen * fix * rebuild * send correct content type * regen
* Add --assign-platform-wi flag to az aro update * Fix nil pointer dereference when converting Identity structs on API * Restructure update command to make branching logic more clear * Remove duplicate test * Disallow passing in duplicate platform workload identities within the same create/update invocation * Ensure reported duplicate platform_workload_identities list doesn't itself contain duplicates
hive:bdf9d08a06 uses github.com/openshift/hive git commit bdf9d08a060abf558ca60e014123bf9278f58b4b.
…into InstrumentOtelAudit
@@ -20,6 +20,7 @@ import ( | |||
"github.com/Azure/ARO-RP/pkg/proxy" | |||
"github.com/Azure/ARO-RP/pkg/util/encryption" | |||
"github.com/Azure/ARO-RP/pkg/util/keyvault" | |||
auditlog "github.com/Azure/ARO-RP/pkg/util/log/audit" |
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.
Question for me - why are we aliasing the name of the package?
@@ -1603,3 +1611,6 @@ replace ( | |||
go.mongodb.org/mongo-driver => go.mongodb.org/mongo-driver v1.9.4 | |||
google.golang.org/grpc => google.golang.org/grpc v1.56.3 | |||
) | |||
|
|||
// go-otel-audit pins |
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.
Please explain why this is necessary - it's clear that the replace
directive is pinning :)
@@ -515,7 +515,7 @@ func TestFixEtcd(t *testing.T) { | |||
}) | |||
|
|||
f, err := NewFrontend(ctx, | |||
ti.audit, | |||
ti.audit, ti.otelAudit, |
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.
Likely best in these cases to be consistent with where the newlines are
auditMsg := msgs.Msg{Type: msgs.ControlPlane} | ||
auditRec := audit.GetAuditRecord() | ||
|
||
callerIpAddress, err := msgs.ParseAddr(strings.Split(r.RemoteAddr, ":")[0]) |
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.
Please handle strings.Split
not finding a :
|
||
callerIpAddress, err := msgs.ParseAddr(strings.Split(r.RemoteAddr, ":")[0]) | ||
if err != nil { | ||
log.Printf("Error parsing remote address: %s, error: %v", r.RemoteAddr, err) |
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.
If this is not recoverable, you need to return or exit the process.
Please rebase pull request. |
Which issue this PR addresses:
Fixes
What this PR does / why we need it:
Test plan for issue:
Is there any documentation that needs to be updated for this PR?
How do you know this will function as expected in production?