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

[homebrew] regression test failure with node 17.7.0 #4462

Closed
2 tasks done
chenrui333 opened this issue Mar 10, 2022 · 2 comments · Fixed by #4463
Closed
2 tasks done

[homebrew] regression test failure with node 17.7.0 #4462

chenrui333 opened this issue Mar 10, 2022 · 2 comments · Fixed by #4463
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@chenrui333
Copy link

Before filling a bug

  • have you checked the faq for known issues.
  • have you checked existing issues

Describe the bug

When homebrew was trying to regression test the node 17.7.0 upgrade, we found there is some issue of generating the code with the new node.

$ brew test autorest
==> Testing autorest
==> /opt/homebrew/Cellar/autorest/3.5.1_1/bin/autorest --input-file=petstore.yaml --typescript --debug --verbose --output-folder=petstor
Last 15 lines from /Users/rui/Library/Logs/Homebrew/autorest/test.01.autorest:
--typescript
--debug --verbose
--output-folder=petstore

SourceMapConsumer.initialize is a no-op when running in node.js
AutoRest code generation utility [cli version: 3.5.1; node: v17.7.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info    | AutoRest core version selected from configuration: ^3.7.0.
Failure:
Error: Unable to find a valid AutoRest core package '@autorest/core' @ '^3.7.0'.
Error: Unable to find a valid AutoRest core package '@autorest/core' @ '^3.7.0'.

But we were just got updated the test recently.

Expected behavior
The build should pass with the latest node v17.7.0

Additional context

Somehow I can do the run debug run just fine

local debug run
$ autorest --input-file=petstore.yaml --typescript --debug --verbose --output-folder=petstore
SourceMapConsumer.initialize is a no-op when running in node.js
AutoRest code generation utility [cli version: 3.5.1; node: v17.7.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info    | AutoRest core version selected from configuration: ^3.7.0.
debug   | [0.34 s] Network Enabled: true
debug   | [0.38 s] The most recent installed version is 3.7.6
debug   | [0.38 s] Starting @autorest/core from /Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core
SourceMapConsumer.initialize is a no-op when running in node.js
info    |    Loading AutoRest core      '/Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist' (3.7.6)
verbose | [0.46 s] No configuration found at 'file:///Users/rui/Downloads/brew/autorest/'.
verbose | [0.47 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/default-configuration.md'
verbose | [0.48 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/inspect.md'
verbose | [0.48 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/directives.md'
verbose | [0.49 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/pipeline.md'
verbose | [0.49 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/loader-openapi.md'
verbose | [0.49 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/miscellaneous.md'
verbose | [0.50 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-powershell.md'
verbose | [0.50 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-azureresourceschema.md'
verbose | [0.51 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-csharp.md'
verbose | [0.51 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-go.md'
verbose | [0.52 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-java.md'
verbose | [0.53 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-nodejs.md'
verbose | [0.53 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-php.md'
verbose | [0.54 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-python.md'
verbose | [0.54 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-ruby.md'
verbose | [0.55 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-typescript.md'
verbose | [0.55 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-validators.md'
verbose | [0.56 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-az.md'
verbose | [0.57 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-terraform.md'
verbose | [0.57 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/plugin-azure-functions.md'
verbose | [0.58 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/graphs.md'
verbose | [0.59 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestcore@3.7.6/nodemodules/@autorest/core/dist/resources/help-configuration.md'
info    |    Loading AutoRest extension '@autorest/typescript' (latest->6.0.0-beta.16)
verbose | [0.64 s]    Including extension configuration file 'file:///Users/rui/.autorest/@autoresttypescript@6.0.0-beta.16/nodemodules/@autorest/typescript/README.md'
verbose | [0.64 s]    Including configuration file 'file:///Users/rui/.autorest/@autoresttypescript@6.0.0-beta.16/nodemodules/@autorest/typescript/README.md'
info    |    Loading AutoRest extension '@autorest/modelerfour' (4.21.4->4.21.4)
verbose | [0.67 s]    Including extension configuration file 'file:///Users/rui/.autorest/@autorestmodelerfour@4.21.4/nodemodules/@autorest/modelerfour/readme.md'
verbose | [0.67 s]    Including configuration file 'file:///Users/rui/.autorest/@autorestmodelerfour@4.21.4/nodemodules/@autorest/modelerfour/readme.md'
debug   | [1.13 s] swagger-document/loader-swagger - START inputs = 0
debug   | [1.13 s] openapi-document/loader-openapi - START inputs = 0
debug   | [1.13 s] pipeline-emitter - START inputs = 0
debug   | [1.13 s] configuration-emitter - START inputs = 0
debug   | [1.13 s] pipeline-emitter - END [0.01 s][75 MB]
debug   | [1.13 s] configuration-emitter - END [0.01 s][75 MB]
verbose | [1.13 s] Reading OpenAPI 3.0 file file:///Users/rui/Downloads/brew/autorest/petstore.yaml
debug   | [1.13 s] swagger-document/loader-swagger - END [0.01 s][75 MB]
debug   | [1.13 s] openapi-document/loader-openapi - END [0.02 s][76 MB]
debug   | [1.13 s] swagger-document/individual/transform - SKIPPING
debug   | [1.13 s] swagger-document/individual/schema-validator-swagger - SKIPPING
debug   | [1.13 s] swagger-document/identity - SKIPPING
debug   | [1.13 s] swagger-document/individual/identity - SKIPPING
debug   | [1.13 s] openapi-document/openapi-document-converter - SKIPPING
debug   | [1.13 s] openapi-document/individual/transform - START inputs = 1
debug   | [1.13 s] openapi-document/individual/transform - END [0 s][77 MB]
debug   | [1.14 s] openapi-document/individual/schema-validator-openapi - START inputs = 1
debug   | [1.19 s] openapi-document/individual/schema-validator-openapi - END [0.05 s][89 MB]
debug   | [1.19 s] openapi-document/individual/identity - START inputs = 1
debug   | [1.19 s] openapi-document/individual/identity - END [0 s][77 MB]
debug   | [1.19 s] openapi-document/transform - START inputs = 1
debug   | [1.19 s] openapi-document/transform - END [0 s][77 MB]
debug   | [1.19 s] openapi-document/semantic-validator - START inputs = 1
debug   | [1.19 s] openapi-document/semantic-validator - END [0 s][77 MB]
debug   | [1.19 s] openapi-document/allof-cleaner - START inputs = 1
debug   | [1.19 s] openapi-document/allof-cleaner - END [0 s][77 MB]
debug   | [1.19 s] openapi-document/tree-shaker - START inputs = 1
debug   | [1.19 s] openapi-document/tree-shaker - END [0 s][78 MB]
debug   | [1.19 s] openapi-document/multi-api-merger - START inputs = 1
debug   | [1.20 s] openapi-document/multi-api-merger - END [0 s][81 MB]
debug   | [1.20 s] openapi-document/components-cleaner - START inputs = 1
debug   | [1.20 s] openapi-document/components-cleaner - END [0 s][82 MB]
debug   | [1.20 s] openapi-document/component-modifiers - START inputs = 1
debug   | [1.20 s] openapi-document/component-modifiers - END [0 s][83 MB]
debug   | [1.20 s] openapi-document/api-version-parameter-handler - START inputs = 1
debug   | [1.20 s] openapi-document/api-version-parameter-handler - END [0 s][83 MB]
debug   | [1.20 s] openapi-document/profile-filter - START inputs = 1
debug   | [1.20 s] openapi-document/profile-filter - END [0 s][83 MB]
debug   | [1.20 s] openapi-document/model-deduplicator - START inputs = 1
debug   | [1.20 s] openapi-document/emitter - START inputs = 1
debug   | [1.20 s] openapi-document/model-deduplicator - END [0 s][83 MB]
debug   | [1.20 s] openapi-document/emitter - END [0 s][83 MB]
debug   | [1.20 s] openapi-document/enum-deduplicator - START inputs = 1
debug   | [1.21 s] openapi-document/enum-deduplicator - END [0 s][87 MB]
debug   | [1.21 s] openapi-document/subset-reducer - START inputs = 1
debug   | [1.21 s] openapi-document/subset-reducer - END [0 s][87 MB]
debug   | [1.21 s] openapi-document/multi-api/reset-identity - START inputs = 1
debug   | [1.21 s] openapi-document/multi-api/reset-identity - END [0 s][87 MB]
debug   | [1.21 s] openapi-document/multi-api/identity - START inputs = 1
debug   | [1.21 s] openapi-document/multi-api/identity - END [0 s][87 MB]
debug   | [1.21 s] openapi-document/multi-api/emitter - START inputs = 1
debug   | [1.21 s] prechecker - START inputs = 1
debug   | [1.21 s] openapi-document/multi-api/emitter - END [0 s][88 MB]
warning | PreCheck/SchemaMissingType | The schema 'Pet' with an undefined type and declared properties is a bit ambiguous. This has been auto-corrected to 'type:object'
warning | PreCheck/SchemaMissingType | The schema 'Error' with an undefined type and declared properties is a bit ambiguous. This has been auto-corrected to 'type:object'
warning | PreCheck/CheckDuplicateSchemas | Checking for duplicate schemas, this could take a (long) while.  Run with --verbose for more detail.
verbose | [1.22 s] Found and removed 0 duplicate schema
debug   | [1.28 s] prechecker - END [0.07 s][88 MB]
debug   | [1.28 s] modelerfour - START inputs = 2
verbose | [1.29 s]   ModelerFour/api-version-mode:client
verbose | [1.29 s]   ModelerFour/api-version-parameter:constant
verbose | [1.29 s]   ModelerFour/use-model-namespace:false
debug   | [1.31 s] modelerfour - END [0.02 s][78 MB]
debug   | [1.31 s] modelerfour/new-transform - START inputs = 2
debug   | [1.31 s] modelerfour/new-transform - END [0 s][78 MB]
debug   | [1.31 s] modelerfour/flattener - START inputs = 2
debug   | [1.32 s] modelerfour/flattener - END [0 s][79 MB]
debug   | [1.32 s] modelerfour/flattener/new-transform - START inputs = 2
debug   | [1.32 s] modelerfour/flattener/new-transform - END [0 s][79 MB]
debug   | [1.32 s] modelerfour/grouper - START inputs = 2
debug   | [1.33 s] modelerfour/grouper - END [0 s][80 MB]
debug   | [1.33 s] modelerfour/grouper/new-transform - START inputs = 2
debug   | [1.33 s] modelerfour/grouper/new-transform - END [0 s][80 MB]
debug   | [1.33 s] modelerfour/pre-namer - START inputs = 2
debug   | [1.34 s] modelerfour/pre-namer - END [0.01 s][81 MB]
debug   | [1.34 s] modelerfour/pre-namer/new-transform - START inputs = 2
debug   | [1.34 s] modelerfour/pre-namer/new-transform - END [0 s][81 MB]
debug   | [1.34 s] modelerfour/checker - START inputs = 4
debug   | [1.35 s] modelerfour/checker - END [0 s][82 MB]
debug   | [1.35 s] modelerfour/identity - START inputs = 2
debug   | [1.35 s] modelerfour/identity - END [0 s][82 MB]
debug   | [1.35 s] typescript - START inputs = 2
debug   | [1.35 s] modelerfour/emitter - START inputs = 2
debug   | [1.35 s] modelerfour/notags/emitter - START inputs = 2
debug   | [1.35 s] modelerfour/emitter - END [0 s][82 MB]
debug   | [1.35 s] modelerfour/notags/emitter - END [0 s][82 MB]
info    | Autorest.Typescript took 462ms
debug   | [1.83 s] typescript - END [0.47 s][83 MB]
debug   | [1.83 s] typescript/emitter - START inputs = 10
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/api-extractor.json
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/package.json
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/README.md
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/rollup.config.js
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/tsconfig.json
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/src/index.ts
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/src/swaggerPetstore.ts
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/src/models/index.ts
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/src/models/mappers.ts
debug   | [1.83 s] Emitting 'typescript-files' at file:///Users/rui/Downloads/brew/autorest/petstore/src/models/parameters.ts
debug   | [1.83 s] typescript/emitter - END [0 s][83 MB]
debug   | [1.83 s] Clearing Folders.
debug   | [1.83 s] Writing Outputs.
info    | Generation Complete
debug   | [1.83 s] Shutting Down.
debug   | [1.83 s] Exiting.

Based on the error message, it is related to #4409

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 10, 2022
@timotheeguerin
Copy link
Member

timotheeguerin commented Mar 10, 2022

Seems to be failing when trying to retrieve the list of versions available for install when you don't have anything installed. Autorest calls to yarn info versions to get that list. Adding some logging reveal yarn is having trouble making network calls

{"type":"info","data":"There appears to be trouble with your network connection. Retrying..."}
{"type":"info","data":"There appears to be trouble with your network connection. Retrying..."}
{"type":"info","data":"There appears to be trouble with your network connection. Retrying..."}
{"type":"info","data":"There appears to be trouble with your network connection. Retrying..."}

You can repro with just this.

yarn info @autorest/core@^3.7.0 versions 

There also seems to be some issue with pnpm installing dependencies. Can't install dependencies in autorest repo.

That make this 2 things:

  1. Main issue is a yarn problem and not sure we can do anything about it
  2. The error right now is not great and hide the real problem so that should be improved.

@timotheeguerin
Copy link
Member

Think that might be the underlying issue nodejs/node#42279. Does seems to be an issue with urls built incorrectly
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants