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

Versions set for operations but not models with custom profile #10636

Closed
Phkrauss opened this issue Apr 2, 2020 · 1 comment
Closed

Versions set for operations but not models with custom profile #10636

Phkrauss opened this issue Apr 2, 2020 · 1 comment
Labels
Compute Mgmt This issue is related to a management-plane library.

Comments

@Phkrauss
Copy link

Phkrauss commented Apr 2, 2020

  • Package Name: azure-mgmt-compute
  • Package Version: 9.0.0
  • Operating System: mac os Mojave 10.14.6
  • Python Version: 3.6.7

Describe the bug
This may or may not be a bug, but i noticed while creating custom profiles or passing specific api versions to the client, the operations versions change but not the models.

To Reproduce
Steps to reproduce the behavior:

  1. create a custom profile like so:
profile = ProfileDefinition(
                {
                    "azure.mgmt.compute.ComputeManagementClient": {
                        None: "2018-06-01",
                        "disks": "2018-04-01",
                        "resource_skus": "2017-09-01",
                    }
                },
                label="azure.mgmt.compute.ComputeManagementClient" + " latest",
            )
  1. pass the profile to ComputeManagementClient along with other required fields.
  2. inspect the client and validate the profile is present:
>>> conn.azure_sdk_client.profile.get_profile_dict()
{'azure.mgmt.compute.ComputeManagementClient': {None: '2018-06-01', 'disks': '2018-04-01', 'resource_skus': '2017-09-01'}}
  1. check the operations:
>>> conn.azure_sdk_client.operations
<azure.mgmt.compute.v2018_06_01.operations._operations.Operations object at 0x10416ea20>
  1. but now check the models:
>>> conn.azure_sdk_client.models()
<module 'azure.mgmt.compute.v2019_07_01.models' from 'path in site-packages'

**Expected behavior**
I simply expected that the model versions would use the same as the operations, especially since they are all stored in the same version dir.

**Screenshots**
N/A

**Additional context**
To be fair I have not ran into any problems as of yet, though i find this concerning. if the latest default version (which is what the model seems to use) is applicable to all versions it seems misleading to store a copy in each version then pull from the latest. I would also be further concerned that if the models did differ the older operations would not align properly with the expected models.
@lmazuel lmazuel added Compute Mgmt This issue is related to a management-plane library. labels Apr 2, 2020
@RodgeFu
Copy link
Member

RodgeFu commented Apr 7, 2020

seems dup of #10635 , close this one

@RodgeFu RodgeFu closed this as completed Apr 7, 2020
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Aug 31, 2020
update readme for sdk generation (Azure#10636)

* update readme for sdks

* update the remaining readme.md

* fix space
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Sep 9, 2020
update readme for sdk generation (Azure#10636)

* update readme for sdks

* update the remaining readme.md

* fix space
LianwMS pushed a commit that referenced this issue Sep 11, 2020
* Generated from 48189ac1b2aa70373ffc8758d37a84a0d20f0cb2

update readme for sdk generation (#10636)

* update readme for sdks

* update the remaining readme.md

* fix space

* release-mgmt-containerservice

Co-authored-by: SDK Automation <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Compute Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

No branches or pull requests

3 participants