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

chore: move to mlog.New and drop klog and logr as direct deps #722

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

enj
Copy link
Member

@enj enj commented Jan 26, 2023

Signed-off-by: Monis Khan [email protected]

@enj enj requested a review from aramase as a code owner January 26, 2023 19:24
@enj enj force-pushed the enj/i/mlog_migrate branch 2 times, most recently from 64b73de to 9153af3 Compare January 27, 2023 17:15
Comment on lines +27 to +30
"github.com/Azure/azure-workload-identity/pkg/cmd/podidentity/k8s"
"github.com/Azure/azure-workload-identity/pkg/cmd/serviceaccount/options"
"github.com/Azure/azure-workload-identity/pkg/kuberneteshelper"
"github.com/Azure/azure-workload-identity/pkg/webhook"
Copy link
Member

Choose a reason for hiding this comment

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

For the files in this repo, we have mostly been grouping stdlib, internal and then external. I see we are swapping internal and external order here. Is that the general practice? If yes, we might need to do this across all files in a follow-up.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have this mostly automated:

goimports does stdlib, 3rd-party, and then local.

I have goland set to run goimports -local github.com/Azure/azure-workload-identity -w <filename> on save.

// LocalPrefix is a comma-separated string of import path prefixes, which, if
// set, instructs Process to sort the import paths with the given prefixes
// into another group after 3rd-party packages.
var LocalPrefix string

Copy link
Member Author

Choose a reason for hiding this comment

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

Opened #724 to track.

@aramase
Copy link
Member

aramase commented Jan 27, 2023

confirmed proxy logs are emitted

2023-01-27T18:23:35.9005309Z Jan 27 18:23:35.897: INFO: azwi-proxy logs: {"level":"info","timestamp":"2023-01-27T18:23:32.994369Z","logger":"proxy","caller":"/workspace/pkg/proxy/proxy.go:97$proxy.(*proxy).Run","message":"starting the proxy server","port":8080,"userAgent":"azure-workload-identity/proxy/85e41dc (linux/amd64) 85e41dc/2023-01-27-18:14"}
2023-01-27T18:23:35.9007012Z {"level":"info","timestamp":"2023-01-27T18:23:32.998010Z","logger":"proxy","caller":"/workspace/pkg/proxy/proxy.go:178$proxy.(*proxy).readyzHandler","message":"received readyz request","method":"GET","uri":"/readyz"}
2023-01-27T18:23:35.9009127Z {"level":"info","timestamp":"2023-01-27T18:23:34.080259Z","logger":"proxy","caller":"/workspace/pkg/proxy/proxy.go:107$proxy.(*proxy).msiHandler","message":"received token request","method":"GET","uri":"/metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01"}
2023-01-27T18:23:35.9011257Z {"level":"info","timestamp":"2023-01-27T18:23:34.080455Z","logger":"proxy","caller":"/workspace/pkg/proxy/proxy.go:114$proxy.(*proxy).msiHandler","message":"client_id not found in request, defaulting to AZURE_CLIENT_ID","method":"GET","uri":"/metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01"}
2023-01-27T18:23:35.9013290Z {"level":"info","timestamp":"2023-01-27T18:23:34.128309Z","logger":"proxy","caller":"/workspace/pkg/proxy/proxy.go:107$proxy.(*proxy).msiHandler","message":"received token request","method":"GET","uri":"/metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01"}
2023-01-27T18:23:35.9015290Z {"level":"info","timestamp":"2023-01-27T18:23:34.128361Z","logger":"proxy","caller":"/workspace/pkg/proxy/proxy.go:114$proxy.(*proxy).msiHandler","message":"client_id not found in request, defaulting to AZURE_CLIENT_ID","method":"GET","uri":"/metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01"}
2023-01-27T18:23:35.9017335Z {"level":"info","timestamp":"2023-01-27T18:23:34.470240Z","logger":"proxy","caller":"/workspace/pkg/proxy/proxy.go:134$proxy.(*proxy).msiHandler","message":"successfully acquired token","method":"GET","uri":"/metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01"}
2023-01-27T18:23:35.9019268Z {"level":"info","timestamp":"2023-01-27T18:23:34.490915Z","logger":"proxy","caller":"/workspace/pkg/proxy/proxy.go:134$proxy.(*proxy).msiHandler","message":"successfully acquired token","method":"GET","uri":"/metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01"}

ref: https://dev.azure.com/AzureContainerUpstream/4f73f325-4d98-44a9-9037-53152d86be43/_apis/build/builds/76116/logs/66

@enj enj merged commit 9ba3fff into Azure:main Jan 27, 2023
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.

None yet

2 participants