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

attestation: fixing the segment attestationProvider to be attestationProviders which matches the API #16355

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

tombuildsstuff
Copy link
Contributor

@tombuildsstuff tombuildsstuff commented Oct 12, 2021

Using the API Version in the Portal (2020-10-01):

API Version 2020-10-01

Using API Version 2020-10-01 and a valid AttestationProvider with this endpoint returns an error that the attestationProvider resource type cannot be found:

$ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01"
Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2020-10-01'."}})

Updating this to attestationProviders fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider):

$ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01"
Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}})

API Version 2021-06-01-preview

Using API Version 2021-06-01-preview and a valid AttestationProvider with this endpoint returns an error that the attestationProvider resource type cannot be found:

$ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview"
Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2021-06-01-preview'."}})

Updating this to attestationProviders fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider):

$ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview"
Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}})

…ionProvider` which matches the API

Using the API Version in the Portal (2020-10-01):

Using API Version 2020-10-01 and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found:

```
$ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01"
Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2020-10-01'."}})
```

Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider):

```
$ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01"
Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}})
```

---

Using API Version 2021-06-01-preview and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found:

```
$ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview"
Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2021-06-01-preview'."}})
```

Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider):

```
$ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview"
Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}})
```
@openapi-workflow-bot
Copy link

Hi, @tombuildsstuff Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. vsswagger@microsoft.com

    @openapi-workflow-bot
    Copy link

    [Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks.

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Oct 12, 2021

    Swagger Validation Report

    ️❌BreakingChange: 4 Errors, 0 Warnings failed [Detail]
    Rule Message
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProvider/{providerName}/privateEndpointConnections' removed or restructured?
    Old: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L270:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProvider/{providerName}/privateEndpointConnections' removed or restructured?
    Old: Microsoft.Attestation/stable/2020-10-01/attestation.json#L270:5
    1038 - AddedPath The new version is adding a path that was not found in the old version.
    New: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L270:5
    1038 - AddedPath The new version is adding a path that was not found in the old version.
    New: Microsoft.Attestation/stable/2020-10-01/attestation.json#L270:5
    ️⚠️LintDiff: 0 Warnings warning [Detail]
    The following errors/warnings exist before current PR submission:

    Only 30 items are listed, please refer to log for more details.

    Rule Message
    R4009 - RequiredReadOnlySystemData The response of operation:'PrivateEndpointConnections_Get' is defined without 'systemData'. Consider adding the systemData to the response.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L316
    R4009 - RequiredReadOnlySystemData The response of operation:'PrivateEndpointConnections_Create' is defined without 'systemData'. Consider adding the systemData to the response.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L359
    R4009 - RequiredReadOnlySystemData The response of operation:'PrivateEndpointConnections_Get' is defined without 'systemData'. Consider adding the systemData to the response.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L316
    R4009 - RequiredReadOnlySystemData The response of operation:'PrivateEndpointConnections_Create' is defined without 'systemData'. Consider adding the systemData to the response.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L359
    R4018 - OperationsApiResponseSchema The response schema of operations API '/providers/Microsoft.Attestation/operations' does not match the ARM specification. Please standardize the schema.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L30
    R4018 - OperationsApiResponseSchema The response schema of operations API '/providers/Microsoft.Attestation/operations' does not match the ARM specification. Please standardize the schema.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L30
    R4036 - ImplementPrivateEndpointAPIs The private endpoint API: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateLinkResources is missing.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L29
    R4037 - MissingTypeObject The schema 'OperationList' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L612
    R4037 - MissingTypeObject The schema 'AttestationProvider' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L665
    R4037 - MissingTypeObject The schema 'CloudError' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L721
    R4037 - MissingTypeObject The schema 'CloudErrorBody' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L730
    R4037 - MissingTypeObject The schema 'AttestationProviderListResult' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L744
    R4037 - MissingTypeObject The schema 'AttestationServicePatchParams' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L761
    R4037 - MissingTypeObject The schema 'AttestationServiceCreationParams' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L774
    R4037 - MissingTypeObject The schema 'AttestationServiceCreationSpecificParams' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L799
    R4037 - MissingTypeObject The schema 'OperationList' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L654
    R4037 - MissingTypeObject The schema 'AttestationProvider' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L707
    R4037 - MissingTypeObject The schema 'CloudError' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L767
    R4037 - MissingTypeObject The schema 'CloudErrorBody' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L776
    R4037 - MissingTypeObject The schema 'AttestationProviderListResult' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L790
    R4037 - MissingTypeObject The schema 'AttestationServicePatchParams' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L807
    R4037 - MissingTypeObject The schema 'AttestationServiceCreationParams' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L834
    R4037 - MissingTypeObject The schema 'AttestationServiceCreationSpecificParams' is considered an object but without a 'type:object', please add the missing 'type:object'.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L859
    ⚠️ R2001 - AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L793
    ⚠️ R2001 - AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L818
    ⚠️ R2001 - AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L853
    ⚠️ R2007 - LongRunningOperationsWithLongRunningExtension The operation 'AttestationProviders_Delete' returns 202 status code, which indicates a long running operation, please enable 'x-ms-long-running-operation.
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L222
    ⚠️ R2007 - LongRunningOperationsWithLongRunningExtension The operation 'AttestationProviders_Delete' returns 202 status code, which indicates a long running operation, please enable 'x-ms-long-running-operation.
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L222
    ⚠️ R2017 - PutRequestResponseScheme A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'AttestationProviders_Create' Request Model: 'AttestationServiceCreationParams' Response Model: 'AttestationProvider'
    Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L108
    ⚠️ R2017 - PutRequestResponseScheme A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'AttestationProviders_Create' Request Model: 'AttestationServiceCreationParams' Response Model: 'AttestationProvider'
    Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L108
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️Cross-Version Breaking Changes succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️️✔️[Staging] SDK Track2 Validation succeeded [Detail] [Expand]
    Validation passes for SDKTrack2Validation

    ️️✔️[Staging] PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️[Staging] SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    ️️✔️[Staging] Lint(RPaaS) succeeded [Detail] [Expand]
    Validation passes for Lint(RPaaS).
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Oct 12, 2021

    Swagger Generation Artifacts

    ️️✔️[Staging] ApiDocPreview succeeded [Detail] [Expand]
     Please click here to preview with your @microsoft account. 
    ️❌[Staging] SDK Breaking Change Tracking failed [Detail]

    Breaking Changes Tracking

    azure-sdk-for-python-track2 - track2_azure-mgmt-attestation - Approved - 1.0.0
    ️✔️azure-sdk-for-go - attestation/mgmt/2020-10-01/attestation - v58.1.0
    ️✔️azure-sdk-for-go - attestation/mgmt/2018-09-01/attestation - v58.1.0
    ️️✔️ azure-sdk-for-net succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from 9903ac0. SDK Automation 14.0.0
      warn	Skip initScript due to not configured
      command	sudo apt-get install -y dotnet-sdk-5.0
      command	autorest --version=V2 --csharp --reflect-api-versions --license-header=MICROSOFT_MIT_NO_VERSION --use=@microsoft.azure/autorest.csharp@2.3.82 --csharp-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-net/sdk ../azure-rest-api-specs/specification/attestation/resource-manager/readme.md
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
    • ️✔️Microsoft.Azure.Management.Attestation [View full logs]  [Release SDK Changes]
    ️⚠️ azure-sdk-for-python-track2 warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 9903ac0. SDK Automation 14.0.0
      command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
      cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
    • ️✔️track2_azure-mgmt-attestation [View full logs]  [Release SDK Changes] Breaking Change Detected
      info	[Changelog] **Features**
      info	[Changelog]
      info	[Changelog]   - Model OperationList has a new parameter system_data
      info	[Changelog]   - Model AttestationProvider has a new parameter system_data
      info	[Changelog]   - Model AttestationProvider has a new parameter private_endpoint_connections
      info	[Changelog]   - Model AttestationProviderListResult has a new parameter system_data
      info	[Changelog]   - Added operation group PrivateEndpointConnectionsOperations
      info	[Changelog]
      info	[Changelog] **Breaking changes**
      info	[Changelog]
      info	[Changelog]   - Model AttestationServiceCreationSpecificParams no longer has parameter attestation_policy
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from 9903ac0. SDK Automation 14.0.0
      command	sh ./eng/initScript.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
      command	generator automation ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    • ️✔️attestation/mgmt/2020-10-01/attestation [View full logs]  [Release SDK Changes]
      info	[Changelog] ### Breaking Changes
      info	[Changelog]
      info	[Changelog] ### New Content
      info	[Changelog]
      info	[Changelog] - New const `Failed`
      info	[Changelog] - New const `Deleting`
      info	[Changelog] - New const `Rejected`
      info	[Changelog] - New const `Succeeded`
      info	[Changelog] - New const `Pending`
      info	[Changelog] - New const `Creating`
      info	[Changelog] - New const `Approved`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.Create(context.Context, string, string, string, PrivateEndpointConnection) (PrivateEndpointConnection, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.DeleteResponder(*http.Response) (autorest.Response, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.CreateSender(*http.Request) (*http.Response, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.ListResponder(*http.Response) (PrivateEndpointConnectionListResult, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.Get(context.Context, string, string, string) (PrivateEndpointConnection, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.List(context.Context, string, string) (PrivateEndpointConnectionListResult, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.CreateResponder(*http.Response) (PrivateEndpointConnection, error)`
      info	[Changelog] - New function `PrivateEndpointConnection.MarshalJSON() ([]byte, error)`
      info	[Changelog] - New function `NewPrivateEndpointConnectionsClientWithBaseURI(string, string) PrivateEndpointConnectionsClient`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.GetPreparer(context.Context, string, string, string) (*http.Request, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.CreatePreparer(context.Context, string, string, string, PrivateEndpointConnection) (*http.Request, error)`
      info	[Changelog] - New function `PrivateEndpoint.MarshalJSON() ([]byte, error)`
      info	[Changelog] - New function `PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.DeleteSender(*http.Request) (*http.Response, error)`
      info	[Changelog] - New function `NewPrivateEndpointConnectionsClient(string) PrivateEndpointConnectionsClient`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.GetSender(*http.Request) (*http.Response, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.ListPreparer(context.Context, string, string) (*http.Request, error)`
      info	[Changelog] - New function `StatusResult.MarshalJSON() ([]byte, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.Delete(context.Context, string, string, string) (autorest.Response, error)`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.ListSender(*http.Request) (*http.Response, error)`
      info	[Changelog] - New function `PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.DeletePreparer(context.Context, string, string, string) (*http.Request, error)`
      info	[Changelog] - New function `*PrivateEndpointConnection.UnmarshalJSON([]byte) error`
      info	[Changelog] - New function `PrivateEndpointConnectionsClient.GetResponder(*http.Response) (PrivateEndpointConnection, error)`
      info	[Changelog] - New struct `PrivateEndpoint`
      info	[Changelog] - New struct `PrivateEndpointConnection`
      info	[Changelog] - New struct `PrivateEndpointConnectionListResult`
      info	[Changelog] - New struct `PrivateEndpointConnectionProperties`
      info	[Changelog] - New struct `PrivateEndpointConnectionsClient`
      info	[Changelog] - New struct `PrivateLinkServiceConnectionState`
      info	[Changelog] - New field `PrivateEndpointConnections` in struct `StatusResult`
      info	[Changelog]
      info	[Changelog] Total 0 breaking change(s), 44 additive change(s).
      info	[Changelog]
    • ️✔️attestation/mgmt/2018-09-01/attestation [View full logs
      info	[Changelog] No exported changes
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from 9903ac0. SDK Automation 14.0.0
      warn	Skip initScript due to not configured
      command	autorest --version=V2 --typescript --license-header=MICROSOFT_MIT_NO_VERSION --use=@microsoft.azure/autorest.typescript@4.7.0 --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js/azure-sdk-for-js ../../azure-rest-api-specs/specification/attestation/resource-manager/readme.md
    • ️✔️@azure/arm-attestation [View full logs]  [Release SDK Changes]
      cmderr	[npmPack] loaded rollup.config.js with warnings
      cmderr	[npmPack] (!) Unused external imports
      cmderr	[npmPack] default imported from external module 'rollup' but never used
      cmderr	[npmPack] ./esm/attestationManagementClient.js → ./dist/arm-attestation.js...
      cmderr	[npmPack] created ./dist/arm-attestation.js in 250ms
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 9903ac0. SDK Automation 14.0.0
      command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
      command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
      cmderr	[generate.py] 2021-11-10 03:33:03 INFO [VERSION][Found] current version "com.azure.resourcemanager:azure-resourcemanager-attestation;1.0.0-beta.1;1.0.0-beta.2"
      cmderr	[generate.py] 2021-11-10 03:33:03 INFO [VERSION][Not Found] cannot find stable version, current version "1.0.0-beta.2"
      cmderr	[generate.py] 2021-11-10 03:33:03 INFO autorest --version=3.6.0 --use=@autorest/java@4.0.39 --java.azure-libraries-for-java-folder=/home/vsts/work/1/s/azure-sdk-for-java --java.output-folder=/home/vsts/work/1/s/azure-sdk-for-java/sdk/attestation/azure-resourcemanager-attestation --java.namespace=com.azure.resourcemanager.attestation   --java --pipeline.modelerfour.additional-checks=false --pipeline.modelerfour.lenient-model-deduplication=true --azure-arm --verbose --sdk-integration --generate-samples --fluent=lite --java.fluent=lite --java.license-header=MICROSOFT_MIT_SMALL  ../azure-rest-api-specs/specification/attestation/resource-manager/readme.md
      cmderr	[generate.py] 2021-11-10 03:33:33 INFO [CI][Skip] ci.yml already has module azure-resourcemanager-attestation
      cmderr	[generate.py] 2021-11-10 03:33:33 INFO [POM][Process] dealing with pom.xml
      cmderr	[generate.py] 2021-11-10 03:33:33 INFO [POM][Skip] pom already has module azure-resourcemanager-attestation
      cmderr	[generate.py] 2021-11-10 03:33:33 INFO [POM][Success] Write to pom.xml
      cmderr	[generate.py] 2021-11-10 03:33:33 INFO [POM][Process] dealing with root pom
      cmderr	[generate.py] 2021-11-10 03:33:33 INFO [POM][Skip] pom already has module sdk/attestation
      cmderr	[generate.py] 2021-11-10 03:33:33 INFO [POM][Success] Write to root pom
    • ️✔️azure-resourcemanager-attestation [View full logs]  [Release SDK Changes]
      cmderr	[Inst] 2021-11-10 03:35:38 DEBUG Got artifact_id: azure-resourcemanager-attestation
      cmderr	[Inst] 2021-11-10 03:35:38 DEBUG Got artifact: pom.xml
      cmderr	[Inst] 2021-11-10 03:35:38 DEBUG Got artifact: azure-resourcemanager-attestation-1.0.0-beta.2-sources.jar
      cmderr	[Inst] 2021-11-10 03:35:38 DEBUG Got artifact: azure-resourcemanager-attestation-1.0.0-beta.2.jar
      cmderr	[Inst] 2021-11-10 03:35:38 DEBUG Match jar package: azure-resourcemanager-attestation-1.0.0-beta.2.jar
      cmderr	[Inst] 2021-11-10 03:35:38 DEBUG output: {"full": "```sh\ncurl -L \"https://portal.azure-devex-tools.com/api/sdk-dl-pub?p=Azure/16355/azure-sdk-for-java/azure-resourcemanager-attestation/azure-resourcemanager-attestation-1.0.0-beta.2.jar\" -o azure-resourcemanager-attestation-1.0.0-beta.2.jar\nmvn install:install-file -DgroupId=com.azure.resourcemanager -DartifactId=azure-resourcemanager-attestation -Dversion=1.0.0-beta.0 -Dfile=azure-resourcemanager-attestation-1.0.0-beta.2.jar -Dpackaging=jar -DgeneratePom=true
      ```"}
    ️⚠️ azure-resource-manager-schemas warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 9903ac0. Schema Automation 14.0.0
      command	.sdkauto/initScript.sh ../azure-resource-manager-schemas_tmp/initInput.json ../azure-resource-manager-schemas_tmp/initOutput.json
      cmderr	[initScript.sh] WARN old lockfile
      cmderr	[initScript.sh] npm WARN old lockfile The package-lock.json file was created with an old version of npm,
      cmderr	[initScript.sh] npm WARN old lockfile so supplemental metadata must be fetched from the registry.
      cmderr	[initScript.sh] npm WARN old lockfile
      cmderr	[initScript.sh] npm WARN old lockfile This is a one-time fix-up, please be patient...
      cmderr	[initScript.sh] npm WARN old lockfile
      warn	File azure-resource-manager-schemas_tmp/initOutput.json not found to read
      command	.sdkauto/generateScript.sh ../azure-resource-manager-schemas_tmp/generateInput.json ../azure-resource-manager-schemas_tmp/generateOutput.json
      cmderr	[generateScript.sh] (node:2464) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected end of JSON input
      cmderr	[generateScript.sh]     at JSON.parse (<anonymous>)
      cmderr	[generateScript.sh]     at Object.readJsonFile (/home/vsts/work/1/s/azure-resource-manager-schemas/generator/utils.ts:176:17)
      cmderr	[generateScript.sh]     at getCurrentTemplateRefs (/home/vsts/work/1/s/azure-resource-manager-schemas/generator/generate.ts:293:21)
      cmderr	[generateScript.sh]     at /home/vsts/work/1/s/azure-resource-manager-schemas/generator/generate.ts:300:29
      cmderr	[generateScript.sh] (Use `node --trace-warnings ...` to show where the warning was created)
      cmderr	[generateScript.sh] (node:2464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
      cmderr	[generateScript.sh] (node:2464) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
      warn	No file changes detected after generation
    • ️✔️attestation [View full logs
    Posted by Swagger Pipeline | How to fix these errors?

    @ghost ghost added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Oct 12, 2021
    @ghost
    Copy link

    ghost commented Oct 12, 2021

    Thank you for your contribution tombuildsstuff! We will review the pull request and get back to you soon.

    @tombuildsstuff tombuildsstuff changed the title attestation: fixing the segment attestationProvider to be attestationProvider which matches the API attestation: fixing the segment attestationProvider to be attestationProviders which matches the API Oct 12, 2021
    @openapi-workflow-bot
    Copy link

    Hi @tombuildsstuff, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
    Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.

    @openapi-workflow-bot
    Copy link

    NewApiVersionRequired reason:

    A service’s API is a contract with customers and is represented by using the api-version query parameter. Changes such as adding an optional property to a request/response or introducing a new operation is a change to the service’s contract and therefore requires a new api-version value. This is critically important for documentation, client libraries, and customer support.

    EXAMPLE: if a customer calls a service in the public cloud using api-version=2020-07-27, the new property or operation may exist but if they call the service in a government cloud, air-gapped cloud, or Azure Stack Hub cloud using the same api-version, the property or operation may not exist. Because there is no clear relationship between the service api-version and the new property/operation, customers can’t trust the documentation and Azure customer have difficulty helping customers diagnose issues. In addition, each client library version documents the service version it supports. When an optional property or new operation is added to a service and its Swagger, new client libraries must be produced to expose this functionality to customers. Without updating the api-version, it is unclear to customers which version of a client library supports these new features.

    @tombuildsstuff
    Copy link
    Contributor Author

    Per the original description whilst this is a breaking change, the Swagger currently doesn't work - as such this isn't a breaking change as these endpoints are documented incorrectly

    @tombuildsstuff
    Copy link
    Contributor Author

    ping @msyyc

    @msyyc
    Copy link
    Member

    msyyc commented Oct 21, 2021

    Hi @tombuildsstuff Please notice the bot advice. You need to pass the following CI and then I could merge it
    image

    @tombuildsstuff
    Copy link
    Contributor Author

    @msyyc as above:

    Per the original description whilst this is a breaking change, the Swagger currently doesn't work - as such this isn't a breaking change as these endpoints are documented incorrectly

    So this is a false positive

    @msyyc
    Copy link
    Member

    msyyc commented Oct 25, 2021

    Hi @tombuildsstuff I get it but you should still follow the workflow. Otherwise merge is blocked.

    @tombuildsstuff
    Copy link
    Contributor Author

    @msyyc since the endpoints referenced here don't exist in the RP (and so these are incorrectly defined / have never worked) - which is what this PR is trying to fix - how do you propose fixing that in a backwards-compatible manner?

    Screenshot 2021-10-26 at 09 27 37

    @msyyc
    Copy link
    Member

    msyyc commented Nov 9, 2021

    Hi @tombuildsstuff Please follow the bot advice to ask for approval from @JeffreyRichter

    @tombuildsstuff
    Copy link
    Contributor Author

    @msyyc unfortunately I can't do that:

    Screenshot 2021-11-09 at 06 02 58

    @JeffreyRichter any chance you could take a look at this one? The endpoint defined in the Swagger is incorrect/doesn't exist in ARM (see the payloads in the description above) - so this PR isn't a breaking change insofar as the endpoints defined in the Swagger have never worked

    @JeffreyRichter JeffreyRichter added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Nov 9, 2021
    @JeffreyRichter
    Copy link
    Member

    Since the swagger never worked correctly, I approved this "breaking change".

    @msyyc msyyc merged commit 9903ac0 into Azure:main Nov 10, 2021
    @tombuildsstuff tombuildsstuff deleted the b/attestation-provider-segment branch November 10, 2021 07:02
    LeiWang3 pushed a commit to LeiWang3/azure-rest-api-specs that referenced this pull request Mar 31, 2022
    …ionProvider` which matches the API (Azure#16355)
    
    Using the API Version in the Portal (2020-10-01):
    
    Using API Version 2020-10-01 and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found:
    
    ```
    $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01"
    Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2020-10-01'."}})
    ```
    
    Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider):
    
    ```
    $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01"
    Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}})
    ```
    
    ---
    
    Using API Version 2021-06-01-preview and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found:
    
    ```
    $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview"
    Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2021-06-01-preview'."}})
    ```
    
    Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider):
    
    ```
    $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview"
    Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}})
    ```
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 Approved-SdkBreakingChange-Python customer-reported Issues that are reported by GitHub users external to the Azure organization.
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants