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

Consume go otel audit lib #3767

Draft
wants to merge 34 commits into
base: master
Choose a base branch
from
Draft

Consume go otel audit lib #3767

wants to merge 34 commits into from

Conversation

gouthamMN
Copy link
Contributor

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?

@github-actions github-actions bot added the needs-rebase branch needs a rebase label Aug 14, 2024
Copy link

Please rebase pull request.

@github-actions github-actions bot removed the needs-rebase branch needs a rebase label Aug 14, 2024
gniranjan and others added 20 commits August 14, 2024 11:16
#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.
@@ -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"
Copy link
Contributor

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
Copy link
Contributor

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,
Copy link
Contributor

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])
Copy link
Contributor

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)
Copy link
Contributor

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.

@github-actions github-actions bot added the needs-rebase branch needs a rebase label Aug 22, 2024
Copy link

Please rebase pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase branch needs a rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants