[Dpg] update to use global autorest version#24970
Merged
Conversation
BigCat20196
approved these changes
Jun 24, 2022
iscai-msft
added a commit
to iscai-msft/azure-sdk-for-python
that referenced
this pull request
Jun 27, 2022
…into merge_patch * 'main' of https://github.com/Azure/azure-sdk-for-python: (155 commits) {machine learning} || Fix a bug in the code (Azure#24922) [CLU] support for AAD + docs (Azure#24960) Update dpg version (Azure#24986) [Botservice]fix model (Azure#24971) [perf] Add pipeline template and storage pipelines (Azure#24894) [Storage] Remove client-side encryption code from shared (Azure#24931) [EventHubs&ServiceBus] update docker images to internal (Azure#24966) Sync eng/common directory with azure-sdk-tools for PR 3481 (Azure#24964) [Dpg] update to use global autorest version (Azure#24970) [CLU] release updates + fix tests (Azure#24963) [Test Proxy] Add method to reset setting customizations (Azure#24952) [Storage] Add proxy-supporting test classes (Azure#24937) [Confidential Ledger] Enable live testing (Azure#24912) fix type of _SansIOHTTPPolicyRunner (Azure#24932) Adding SIP routing functionality to PhoneNumbers SDK (Azure#22805) [DPG] update quick-start-tool (Azure#24942) [formrecognizer] Enable copy model tests (Azure#24917) [CLU] remove maxpagesize (Azure#24949) Use westus3 for translation live tests (Azure#24947) [Storage] Make lease duration tests less flakey (Azure#24930) ...
NiveditJain
reviewed
Jul 15, 2022
| _TEMPLATE_TESTS = Path(__file__).resolve().parent / "template_tests" | ||
| _TEMPLATE_SAMPLES = Path(__file__).resolve().parent / "template_samples" | ||
| _TEMPLATE_CI = Path(__file__).resolve().parent / "template_ci" | ||
| _CONFIG_FILE = Path(__file__).resolve() / "../../../swagger_to_sdk_config_dpg.json" |
There was a problem hiding this comment.
I think, line 17, should be ,
_CONFIG_FILE = Path(__file__).resolve().parent / "../../../swagger_to_sdk_config_dpg.json"
parent should be appended. Why? because without adding .parent this points to file main.py, not a folder.
Error Recieved:
Input
python ./scripts/quickstart_tooling_dpg/main.py --output-folder ./sdk/loadtestservice/azure-developer-loadtest --input-file /mnt/c/Users/niveditjain/Desktop/loadtesting.json --security-scope https://loadtest.azure-dev.com/.default --package-name azure-developer-loadtestservice --package-pprint-name "Azure Developer LoadTestService" --client-name LoadTestClient
Output:
INFO:__main__:Build start: azure-developer-loadtestservice
INFO:__main__:Building swagger readme
Traceback (most recent call last):
File "./scripts/quickstart_tooling_dpg/main.py", line 186, in <module>
main(**parameters)
File "./scripts/quickstart_tooling_dpg/main.py", line 126, in main
build_package(**kwargs)
File "./scripts/quickstart_tooling_dpg/main.py", line 105, in build_package
autorest_cmd = f'autorest {swagger_readme} {get_autorest_version()} '
File "./scripts/quickstart_tooling_dpg/main.py", line 80, in get_autorest_version
with open(_CONFIG_FILE, 'r') as file_in:
NotADirectoryError: [Errno 20] Not a directory: '/mnt/c/Users/niveditjain/Desktop/azure-sdk/scripts/quickstart_tooling_dpg/main.py/../../../swagger_to_sdk_config_dpg.json'
Error was resolved by rewriting the line 17 as,
_CONFIG_FILE = Path(__file__).resolve().parent / "../../swagger_to_sdk_config_dpg.json"
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#24939