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

Initial network error fixes and suppressions #3051

Merged
merged 4 commits into from
May 16, 2018

Conversation

EvgenyAgafonchikov
Copy link
Contributor

@EvgenyAgafonchikov EvgenyAgafonchikov commented May 10, 2018

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(17 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(86 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

Copy link
Contributor

@dsgouda dsgouda left a comment

Choose a reason for hiding this comment

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

Looks good apart from the suppressions

## Suppression
``` yaml
directive:
- suppress: RequiredPropertiesMissingInResourceModel
Copy link
Contributor

Choose a reason for hiding this comment

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

@EvgenyAgafonchikov were these suppressions approved? Please forward the email thread so we can verify

Copy link
Contributor

Choose a reason for hiding this comment

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

Approval received

@MikhailTryakhov MikhailTryakhov changed the title [WIP] Initial network error fixes and suppressions Initial network error fixes and suppressions May 10, 2018
## Suppression
``` yaml
directive:
- suppress: RequiredPropertiesMissingInResourceModel
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we fix it for APIs going forward? So can we suppress it for existing API-versions. And then going forward, new API-versions reference the "resource" model where "id" property is marked as read-only. Would it cause any issues on SDK generation side? @dsgouda ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add these suppressions to the specific APis or api-versions and not for the entire thing.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ravbhatnagar reworked. Please review

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm... theoretically, yes. Any property not marked as readonly could be "set" by a user facing sdk. In this case it would include id as well. If existing APIs have some way of detecting an incorrectly set "id" and throw an appropriate error we should be OK. If not, I am not sure what the implications could be.
@fearthecowboy any thoughts here?

Copy link
Member

Choose a reason for hiding this comment

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

The constructors for model types would likely change ... so it'd be a binary breaking change.

other than that, the worst that would happen is that someone would change a value, and the server give them an error for trying.

Copy link
Contributor

Choose a reason for hiding this comment

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

So lack of readonly property won't raise serious problems. No breaking changes would be done. Everyone happy?!!

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC

  • We want to enable these suppressions only for the older API versions, maybe we can enable suppressions only for api tags prior to a certain tag, please consult on the offline thread for this since I am not the expert here
  • All new API versions MUST adhere to these rules
  • If we merely decide to enable suppressions and not change the spec/api for older versions then yes, there will be no breaking changes introduced, however, newer api versions will definitely cause breaking changes to the subsequently generated sdks.
    Hope this makes sense

Copy link
Member

Choose a reason for hiding this comment

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

Yes, put the directive section with the suppress items in the tag'd sections for that specific API version. Then it will only apply on that version.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dsgouda why do we need these suppressions for older api only? As I understand there is no chance we'll make ids readonly so we'll need to have these exceptions in all the versions... am I missing something?

Copy link
Contributor

@ravbhatnagar ravbhatnagar left a comment

Choose a reason for hiding this comment

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

Added a couple of notes. please take a look

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(13 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@@ -410,6 +410,96 @@ input-file:
- Microsoft.Network/preview/2015-05-01-preview/network.json
```

## Suppression
``` yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

@MikhailTryakhov For conditional suppressions, you simply add conditions like so

yaml $(tag) == 'package-2015-06 || $(tag) == 'package-2015-05-preview` 

and so on until all the tags are included in the condition.
@fearthecowboy does that sound right?

Copy link
Contributor

Choose a reason for hiding this comment

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

@dsgouda is this to restrict version where we apply this exception?
as I understood @ravbhatnagar approved this to apply on all the versions cause we must change it in older version and don't plan to change in future (huge breaking change)

Copy link
Contributor

@dsgouda dsgouda left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the descriptive reasons for suppressions

@dsgouda
Copy link
Contributor

dsgouda commented May 15, 2018

@EvgenyAgafonchikov please update the branch and we should be good to merge

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(13 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@AutorestCI
Copy link

AutorestCI commented May 16, 2018

Automation for azure-libraries-for-java

A PR has been created for you:
AutorestCI/azure-libraries-for-java#161

@AutorestCI
Copy link

AutorestCI commented May 16, 2018

Automation for azure-sdk-for-node

A PR has been created for you:
Azure/azure-sdk-for-node#2859

@AutorestCI
Copy link

AutorestCI commented May 16, 2018

Automation for azure-sdk-for-python

Encountered a Subprocess error: (azure-sdk-for-python)

Command: ['/usr/local/bin/autorest', '/tmp/tmpvc2h6ik7/rest/specification/network/resource-manager/readme.md', '--multiapi', '--python', '--python-mode=update', '--python-sdks-folder=/tmp/tmpvc2h6ik7/sdk', '--use=@microsoft.azure/autorest.python@~3.0', '--version=preview']
Finished with return code 1
and output:

AutoRest code generation utility [version: 2.0.4262; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/root/.autorest/@microsoft.azure_autorest-core@2.0.4278/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4278)
   Loading AutoRest extension '@microsoft.azure/autorest.python' (~3.0->3.0.51)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.44->2.3.44)
Processing batch task - {"tag":"package-2018-02"} .
Processing batch task - {"tag":"package-2018-01"} .
Shutting Down
Process() cancelled due to exception : Connection is closed.
Failure during batch task - {"tag":"package-2018-01"} -- Error: Connection is closed..
  Error: Connection is closed.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

File: specification/azsadmin/resource-manager/network/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(1 total)

File: specification/cognitiveservices/data-plane/VisualSearch/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(0 total)

File: specification/eventgrid/data-plane/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(0 total)

File: specification/eventgrid/resource-manager/readme.md

⚠️0 new Warnings.(1 total)
0 new Errors.(1 total)

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(12 total)

File: specification/servicebus/resource-manager/readme.md

⚠️0 new Warnings.(31 total)
0 new Errors.(0 total)

File: specification/storage/resource-manager/readme.md

⚠️0 new Warnings.(3 total)
0 new Errors.(0 total)

File: specification/web/resource-manager/readme.md

⚠️0 new Warnings.(154 total)
0 new Errors.(22 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/automation/resource-manager/readme.md

⚠️0 new Warnings.(135 total)
0 new Errors.(0 total)

File: specification/azsadmin/resource-manager/network/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(0 total)

File: specification/cognitiveservices/data-plane/VisualSearch/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(0 total)

File: specification/eventgrid/data-plane/readme.md

⚠️0 new Warnings.(1 total)
0 new Errors.(0 total)

File: specification/eventgrid/resource-manager/readme.md

⚠️0 new Warnings.(1 total)
0 new Errors.(0 total)

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

File: specification/servicebus/resource-manager/readme.md

⚠️0 new Warnings.(8 total)
0 new Errors.(0 total)

File: specification/storage/resource-manager/readme.md

⚠️4 new Warnings.(4 total)
Code Id Source Message
PageableOperation R2029 Link Based on the response model schema, operation 'BlobContainers_List' might be pageable. Consider adding the x-ms-pageable extension.
PutRequestResponseScheme R2017 Link 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: 'StorageAccounts_Create' Request Model: 'StorageAccountCreateParameters' Response Model: 'StorageAccount'
OperationIdNounConflictingModelNames R2063 Link OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'UsageModel'. Consider using the plural form of 'Usage' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
DescriptionAndTitleMissing R4000 Link 'Resource' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
0 new Errors.(0 total)

File: specification/web/resource-manager/readme.md

⚠️0 new Warnings.(640 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@AutorestCI
Copy link

AutorestCI commented May 16, 2018

Automation for azure-sdk-for-go

Nothing to generate for azure-sdk-for-go

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(13 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@EvgenyAgafonchikov
Copy link
Contributor Author

Thanks everyone for productive interaction.
@dsgouda, it looks like Mikhail already updated the branch. Please note that I've also cherry-picked one more commit from there to fix more issues in May branch.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(13 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(5 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@MikhailTryakhov MikhailTryakhov added Network DoNotMerge <valid label in PR review process> use to hold merge after approval labels May 16, 2018
@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(5 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@MikhailTryakhov MikhailTryakhov removed the DoNotMerge <valid label in PR review process> use to hold merge after approval label May 16, 2018
@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(5 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

1 similar comment
@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(0 total)
0 new Errors.(5 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns.

File: specification/network/resource-manager/readme.md

⚠️0 new Warnings.(88 total)
0 new Errors.(0 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@MikhailTryakhov
Copy link
Contributor

@dsgouda could you please merge?

@dsgouda dsgouda merged commit 6f5c90a into Azure:Network-2018-05-01 May 16, 2018
dsgouda pushed a commit that referenced this pull request May 17, 2018
* Added 2018-05-01 version. Common fixes (#3025)

* Created May folder. Updated version for exampls, commands

* Updated package to May version

* Returned NW examples

* Fixed API version; Fixed NetworkWatcher examples

* Fixed VPN Gateway/Connection examples

* Add changes from PR#2975
https://github.com/Azure/azure-rest-api-specs/pull/2975/files

* Adding optional traffic analytics config fields to network watcher config object for enhancing the Network Watcher cmdlets (#3023)

* Adding optional traffic analytics parameters with existing network watched flowlog configuration

* Updating the version

* Updating latest versoin in readme.md

* #AppGw Fundamentals Clean Up (#3046)

* Network 2018 05 01 (#3068)

* Adding optional traffic analytics parameters with existing network watched flowlog configuration

* Updating the version

* Updating latest versoin in readme.md

* Adding optional traffic analytics parameters with flowlog parameters

* Reverting old chnages

* Expose new SKUs for VMSS VPN and ER gateways (#3069)

Expose new SKUs for VMSS VPN and ER gateways

* Initial network error fixes and suppressions (#3051)

* Initial network error fixes and suppressions

* reworked exception to specified code blocks only

* Added express route fixes
@EvgenyAgafonchikov EvgenyAgafonchikov deleted the add-suppression branch May 15, 2019 07:19
konrad-jamrozik pushed a commit to dhung-msft/azure-rest-api-specs that referenced this pull request Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants