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

[AutoPR] policyinsights/resource-manager #2122

Merged
merged 5 commits into from
May 4, 2018

Conversation

AutorestCI
Copy link
Contributor

Created to accumulate context: policyinsights/resource-manager

…hange modelAsString for x-ms-enum to true (#2107)

* Generated from 648b3651cc044b52ce58431a57ba3b7f7392fc2d

Reorganize files; change modelAsString for x-ms-enum to true

Reorganize files (remove resource type based subfolders; rename conflicting example files to have resource type name; change swagger spec files and MD file based on new file locations and names); change modelAsString for x-ms-enum to true based on API review board recommendation

* Generated from 14bce7a312971c5831a8e2bd1f70d167bd42d96d

Dummy change to kick the CI again
@codecov-io
Copy link

codecov-io commented Mar 7, 2018

Codecov Report

Merging #2122 into master will increase coverage by 0.79%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2122      +/-   ##
==========================================
+ Coverage   54.37%   55.16%   +0.79%     
==========================================
  Files        5979     6450     +471     
  Lines      135524   146041   +10517     
==========================================
+ Hits        73686    80560    +6874     
- Misses      61838    65481    +3643
Impacted Files Coverage Δ
azure-mgmt-policyinsights/azure/__init__.py 100% <100%> (ø)
azure-mgmt-policyinsights/azure/mgmt/__init__.py 100% <100%> (ø)
...mgmt/containerregistry/v2017_10_01/models/actor.py 66.66% <0%> (-13.34%) ⬇️
...ure/mgmt/sql/operations/capabilities_operations.py 33.33% <0%> (-11.83%) ⬇️
...sql/azure/mgmt/sql/models/location_capabilities.py 43.75% <0%> (-11.81%) ⬇️
...egistry/v2017_03_01/models/operation_definition.py 57.14% <0%> (-9.53%) ⬇️
...egistry/v2017_10_01/models/operation_definition.py 57.14% <0%> (-9.53%) ⬇️
...gmt/containerregistry/v2017_10_01/models/source.py 57.14% <0%> (-9.53%) ⬇️
...gmt/eventgrid/operations/topic_types_operations.py 35.35% <0%> (-8.94%) ⬇️
...us/azure/mgmt/servicebus/models/sql_rule_action.py 66.66% <0%> (-8.34%) ⬇️
... and 683 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 729444a...49d8eff. Read the comment docs.

@bulentelmaci
Copy link

@lmazuel For the first PR we had in swagger repo (Azure/azure-rest-api-specs#2523), an automatic PR was created here #2026. At the time there was an issue with folders and so we had decided to close it. swagger repo PR was merged with changes but looks like no new PR was created here at the time. Now we are releasing swagger specs for our new non-preview release as part of Azure/azure-rest-api-specs#2929 which looks like triggered this PR. Two issues I'm trying to wrap my head around: 1. I see that the files generated are for our preview specs. What will happen now? 2. Build CI seems to have failed though Details link take me to 404. What is the issue?

Could you help? I'm looking at releasing Phyton SDK for our RP, either for our preview API version, or ideally for the new API version.

@AutorestCI
Copy link
Contributor Author

AutorestCI commented Apr 25, 2018

(message created by the CI based on PR content)

Installation instruction

Package azure-mgmt-policyinsights

You can install the package azure-mgmt-policyinsights of this PR using the following command:
pip install "git+https://github.com/Azure/azure-sdk-for-python@restapi_auto_policyinsights/resource-manager#egg=azure-mgmt-policyinsights&subdirectory=azure-mgmt-policyinsights"

You can build a wheel to distribute for test using the following command:
pip wheel --no-deps "git+https://github.com/Azure/azure-sdk-for-python@restapi_auto_policyinsights/resource-manager#egg=azure-mgmt-policyinsights&subdirectory=azure-mgmt-policyinsights"

If you have a local clone of this repository, you can also do:

  • git checkout restapi_auto_policyinsights/resource-manager
  • pip install -e ./azure-mgmt-policyinsights

Or build a wheel file to distribute for testing:

  • git checkout restapi_auto_policyinsights/resource-manager
  • pip wheel --no-deps ./azure-mgmt-policyinsights

Direct download

Your files can be directly downloaded here:

@lmazuel
Copy link
Member

lmazuel commented Apr 25, 2018

@bulentelmaci :

@bulentelmaci
Copy link

@lmazuel Thank you! So this PR (which reflects the state of things in specs master) will be merged when I test the package and make sure it is OK. Is there any other steps required? And 2452 will be merged when 2929 is merged?

@lmazuel
Copy link
Member

lmazuel commented Apr 25, 2018

Correct, 2452 will be merged automatically when 2929 will be merged. If you just want to test the GA version, you can add test to PR 2452, they will eventually come here.
When this PR 2122 represents exactly what you want to release, we merge and delete the branch. Next time you touch the Swagger, the branch will be re-created from "master" with a new diff, and so on.

Merge remote-tracking branch 'upstream/master'
@bulentelmaci
Copy link

@lmazuel As soon as I'm done testing this, I will let you know (by Monday I think). Is there anything else needed that I should do before this PR is approved and merged?

When merged, I assume customers can install it from this GitHub? When would it go online in PyPI and when would it be part of azure package?

Copy link
Member

@lmazuel lmazuel left a comment

Choose a reason for hiding this comment

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

@bulentelmaci request changes to be sure you see my comment.


def __init__(self, **kwargs):
super(PolicyEventsQueryResults, self).__init__(**kwargs)
self.odatacontext = kwargs.get('odatacontext', None)
Copy link
Member

Choose a reason for hiding this comment

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

@bulentelmaci Do you need odatacontext and odatacount here? If not, this API should be declared as producing a list (that's the case, you produce a list of PolicyEvent). This makes better SDK, and it's just adding a x-ms-pageable extension in the Swagger.
Don't be fooled by the name of the extension, this does NOT require the call to be pageable. This is an odd choose to say "the result is a list". Pageable a sub-set of "result is a list".

Choose a reason for hiding this comment

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

@lmazuel Swagger folks suggested the use of x-ms-pageable as well but then we decided not to since we don't support (or no near plans to support) paging. The generated API still produces list. From what I understand from https://github.com/Azure/autorest/blob/master/docs/extensions/readme.md#x-ms-pageable, this was specifically designed to model next links and have SDKs generated that follow the pattern. For us that is not needed.

Yes, we need odata count and context. OData client generated clients choke without them.

@lmazuel
Copy link
Member

lmazuel commented May 2, 2018

@bulentelmaci For your general questions, merge and PyPI are the same thing, I only merge when it's ready to be on PyPI. So customers will be able to install from Github or PyPI.

@bulentelmaci
Copy link

@lmazuel I tested the generated Python package and did not see any issues. Can we merge/publish this then?

@lmazuel lmazuel merged commit 9ca4234 into master May 4, 2018
@lmazuel lmazuel deleted the restapi_auto_policyinsights/resource-manager branch May 4, 2018 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants