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

ActivityLogs client needs API version update #14704

Closed
drewandersonnz opened this issue May 25, 2021 · 5 comments
Closed

ActivityLogs client needs API version update #14704

drewandersonnz opened this issue May 25, 2021 · 5 comments
Labels
feature-request This issue requires a new behavior in the product in order be resolved. Monitor Monitor, Monitor Ingestion, Monitor Query Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@drewandersonnz
Copy link

drewandersonnz commented May 25, 2021

Bug Report

Please update ActivityLogs client API version to 2017-03-01-preview matching that used by https://portal.azure.com/

As per an error from the API: The supported api-versions are '2014-04-01,2014-11-01,2015-04-01,2016-09-01-preview,2017-03-01-preview'.

This could be by adding a new implementation version of the ActivityLogs section which targets the newer API version, leaving all other implementations the same. Example:

# example new implementation version
./preview/monitor/mgmt/2021-06-01-preview/insights/activitylogs.go:96:	const APIVersion = "2017-03-01-preview"

All current implementation versions of the ActivityLog client use an older 2015-04-01 API version, even though other API versions are available

$ grep -inr apiversion `find ./ | grep insights/activitylogs.go` | sort
./preview/monitor/mgmt/2017-05-01-preview/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2018-03-01/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2018-09-01/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2018-11-01-preview/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2019-03-01/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2019-06-01/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2019-11-01-preview/insights/activitylogs.go:103:	const APIVersion = "2015-04-01"

As the activitylogs.go is in ./preview of the SDK, and there are -preview implementations in the SDK, there should be no problem providing a version which uses a -preview version of the API.

As per a recent ICM (242085637) there is a known issue where the 2015-04-01 API version is missing objects in the response which are present in the API version 2017-03-01-preview used by https://portal.azure.com. This is not a data format issue, instead the API is missing whole root level objects.

Full reproduction steps can be found in the above ICM.

The az cli tool also uses the 2015-04-01 API version and also exhibits this missing object problem.

It is possible to retrieve the ActivityLogs objects via a similar command line request as this:

# objects missing: 2015-04-01
az rest --method get --url ${AzureActivityLogsBaseUrl}?api-version=2015-04-01\&%24filter=xyzfilter

# objects found: 2017-03-01-preview
az rest --method get --url ${AzureActivityLogsBaseUrl}?api-version=2017-03-01-preview\&%24filter=xyzfilter

# fake API version to test failure, API version chosen from implementation version (./preview/monitor/mgmt/2019-11-01-preview/insights/activitylogs.go): 2019-11-01-preview 
az rest --method get --url ${AzureActivityLogsBaseUrl}?api-version=2019-11-01-preview\&%24filter=xyzfilter
# Not Found({"error":{"code":"InvalidResourceType","message":"The resource type 'eventtypes' could not be found in the namespace 'microsoft.insights' for api version '2019-11-01-preview'. The supported api-versions are '2014-04-01,2014-11-01,2015-04-01,2016-09-01-preview,2017-03-01-preview'."}})

# note the different API versions used

Required information requested by the github Bug Template:

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 25, 2021
drewandersonnz added a commit to drewandersonnz/ARO-RP that referenced this issue May 27, 2021
from:
github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights

to work around Azure/azure-sdk-for-go#14704
while we wait on a permanent fix
@ArcturusZhang
Copy link
Member

Hi @drewandersonnz thanks for this issue!

This is how our SDK generator and swaggers work:
The SDK is generated from a thing what we called it a readme tag, you can find it here. A readme tag combines some swagger files together and the code generator generates the SDK code using those swaggers. This is why you see one SDK package can contain different "actual" api-versions. The date-like string in the package path of a Go SDK package is not the api-version in this case.

There is a new release of monitor in progress now, you can check it out here: Azure/azure-rest-api-specs#14542 (review)
Please feel free to leave comments there about the desired api-version

@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 28, 2021
@ArcturusZhang ArcturusZhang added feature-request This issue requires a new behavior in the product in order be resolved. Service Attention Workflow: This issue is responsible by Azure service team. labels May 28, 2021
@ghost
Copy link

ghost commented Jun 2, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzMonEssential.

Issue Details

Bug Report

Please update ActivityLogs client API version to 2017-03-01-preview matching that used by https://portal.azure.com/

As per an error from the API: The supported api-versions are '2014-04-01,2014-11-01,2015-04-01,2016-09-01-preview,2017-03-01-preview'.

This could be by adding a new implementation version of the ActivityLogs section which targets the newer API version, leaving all other implementations the same. Example:

# example new implementation version
./preview/monitor/mgmt/2021-06-01-preview/insights/activitylogs.go:96:	const APIVersion = "2017-03-01-preview"

All current implementation versions of the ActivityLog client use an older 2015-04-01 API version, even though other API versions are available

$ grep -inr apiversion `find ./ | grep insights/activitylogs.go` | sort
./preview/monitor/mgmt/2017-05-01-preview/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2018-03-01/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2018-09-01/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2018-11-01-preview/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2019-03-01/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2019-06-01/insights/activitylogs.go:96:	const APIVersion = "2015-04-01"
./preview/monitor/mgmt/2019-11-01-preview/insights/activitylogs.go:103:	const APIVersion = "2015-04-01"

As the activitylogs.go is in ./preview of the SDK, and there are -preview implementations in the SDK, there should be no problem providing a version which uses a -preview version of the API.

As per a recent ICM (242085637) there is a known issue where the 2015-04-01 API version is missing objects in the response which are present in the API version 2017-03-01-preview used by https://portal.azure.com. This is not a data format issue, instead the API is missing whole root level objects.

Full reproduction steps can be found in the above ICM.

The az cli tool also uses the 2015-04-01 API version and also exhibits this missing object problem.

It is possible to retrieve the ActivityLogs objects via a similar command line request as this:

# objects missing: 2015-04-01
az rest --method get --url ${AzureActivityLogsBaseUrl}?api-version=2015-04-01\&%24filter=xyzfilter

# objects found: 2017-03-01-preview
az rest --method get --url ${AzureActivityLogsBaseUrl}?api-version=2017-03-01-preview\&%24filter=xyzfilter

# fake API version to test failure, API version chosen from implementation version (./preview/monitor/mgmt/2019-11-01-preview/insights/activitylogs.go): 2019-11-01-preview 
az rest --method get --url ${AzureActivityLogsBaseUrl}?api-version=2019-11-01-preview\&%24filter=xyzfilter
# Not Found({"error":{"code":"InvalidResourceType","message":"The resource type 'eventtypes' could not be found in the namespace 'microsoft.insights' for api version '2019-11-01-preview'. The supported api-versions are '2014-04-01,2014-11-01,2015-04-01,2016-09-01-preview,2017-03-01-preview'."}})

# note the different API versions used

Required information requested by the github Bug Template:

Author: drewandersonnz
Assignees: -
Labels:

Monitor - ActivityLogs, Service Attention, feature-request

Milestone: -

@asheniam
Copy link

asheniam commented Jun 2, 2021

There are known set of issues with the backend system for the api-version = 2017-03-01-preview in Activity Logs REST API. The team is working to resolve the backend issues first before publishing this api-version more broadly. At this time, this engineering work is very significant and multiple months. Currently, we are targeting releasing the new backend system in the Fall timeframe.

@asheniam asheniam closed this as completed Jun 2, 2021
@dany74q
Copy link

dany74q commented May 11, 2022

@asheniam @AzMonEssential - Small bump - we could really use the more advanced filtering offered in 2017-03-01-preview (a-la filtering by operation type);
I haven't seen a new api version published, do you happen to know if the problems you'd mentioned were fixed in the same API version, and / or if there's an updated ETA for the new version ?

Thanks a ton !

@nkiest
Copy link

nkiest commented Jun 6, 2022

We are now targeting late 2022 for update API.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
@scottaddie scottaddie added Monitor Monitor, Monitor Ingestion, Monitor Query and removed Monitor - ActivityLogs labels Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request This issue requires a new behavior in the product in order be resolved. Monitor Monitor, Monitor Ingestion, Monitor Query Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

6 participants