azure-sdk-for-go: Getting the next page of the activity logs fails with invalid semicolon separator in query
Bug Report
- import path of package in question:
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor - SDK version: latest (github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0)
- output of
go version:
go version go1.22.0 linux/amd64
- What happened?
When fetching the activity logs in some subscriptions, the code errors out with the following message:
invalid semicolon separator in query
Our code (minimized) looks like this:
query := fmt.Sprintf("eventTimestamp ge '%s' and eventTimestamp le '%s'", startTime.Format(time.RFC3339Nano), endTime.Format(time.RFC3339Nano))
pager := clientFactory.NewActivityLogsClient().NewListPager(query, nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
return nil, fmt.Errorf("failed to advance page: %w", err) << this is where it fails
}
}
- What did you expect or want to happen?
Get the logs, as in other subs.
- How can we reproduce it?
idk, check if you can fetch activity logs on all subs.
Additional info
a screenshot from debugging:
A similar error happens when using a semicolon in a query, see: https://github.com/golang/go/issues/50034
my guess is: the content of the *NextLink can’t be parsed in some / all cases.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 28 (8 by maintainers)
i got the link from debugging with delve:
it seems like a new issue arose yesterday: the data model changed yesterday at around 10 pm CET.
Instead of the semicolon error, the lib now can’t unmarshal the data in the response.
Will update this comment, once I found out more.
UPDATE:
In constants.go the EventLevel is defined as a string and has some consts defined:
seems like the API returns a number instead of one of the expected strings.
The service shouldn’t be returning
EventLevelby its ordinal value. We’re following up on this.For the semicolons in the query params, we’ll have this fixed in
azcore@v1.10.0which will be released soon.what region are you in? can you share some more details? the fix was deployed world wide. please send me an email and ill try to assist. orens@microsoft.com
@osalzberg The issue still persists. When will this be resolved?
a fix should be deployed in the next 1-2 days
I found the same issue. When will it be fixed?
+1 I am also getting the same error as of yesterday.
Edit: Seems like a high severity breakage. I have production applications that rely on being able to consume and process monitor events for customers.