Skip to content

Generating the API fails #563

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

Closed
qmfrederik opened this issue Feb 17, 2021 · 8 comments
Closed

Generating the API fails #563

qmfrederik opened this issue Feb 17, 2021 · 8 comments
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@qmfrederik
Copy link
Contributor

I'm trying to re-generate the API, so that this client includes kubernetes-client/gen#180

I have the git repositories checked out at ~/git/gen and ~/git/csharp.

Running this command:

vagrant@ubuntu-focal:~/git/csharp/src/KubernetesClient$ ../../../gen/openapi/csharp.sh generated/ ../../csharp.settings 

eventually fails like this:

[INFO] AutoRest code generation utility [cli version: 3.0.6339; node: v14.15.5, max-memory: 8192 MB]
[INFO] (C) 2018 Microsoft Corporation.
[INFO] https://aka.ms/autorest
[INFO] Network Enabled: true
[INFO] NOTE: AutoRest core version selected from configuration: ~3.0.6298.
[INFO] Starting @autorest/core from /tmp/.autorest/@[email protected]
[INFO]    Loading AutoRest core      '/tmp/.autorest/@[email protected]/node_modules/@autorest/core/dist' (3.0.6373)
[INFO] No configuration found at 'file:///'.
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/inspect.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/directives.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/pipeline.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/loader-openapi.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/miscellaneous.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/patches.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-powershell.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-azureresourceschema.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-csharp.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-go.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-java.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-nodejs.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-php.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-python.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-ruby.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-typescript.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-validators.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-az.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-trenton.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-azure-functions.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/graphs.md'
[INFO]    Including configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/core/resources/help-configuration.md'
[INFO]    Loading AutoRest extension '@autorest/csharp' (latest->3.0.0-beta.20210211.1)
[INFO]    Including extension configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/csharp/readme.md'
[INFO]    Loading AutoRest extension '@autorest/modelerfour' (4.15.456->4.15.456)
[INFO]    Including extension configuration file 'file:///tmp/.autorest/@[email protected]/node_modules/@autorest/modelerfour/readme.md'
[INFO] Error: write EPIPE
[INFO]     at afterWriteDispatched (internal/stream_base_commons.js:156:25)
[INFO]     at writeGeneric (internal/stream_base_commons.js:147:3)
[INFO]     at Socket._writeGeneric (net.js:785:11)
[INFO]     at Socket._write (net.js:797:8)
[INFO]     at writeOrBuffer (internal/streams/writable.js:358:12)
[INFO]     at Socket.Writable.write (internal/streams/writable.js:303:10)
[INFO]     at Writable.write [as _write] (/tmp/.autorest/@[email protected]/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:3179:31)
[INFO]     at writeOrBuffer (internal/streams/writable.js:358:12)
[INFO]     at Writable.write (internal/streams/writable.js:303:10)
[INFO]     at StreamMessageWriter.exports.modules.../../../common/temp/node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/messageWriter.js.StreamMessageWriter.write (/tmp/.autorest/@[email protected]/node_modules/@autorest/core/dist/vendors-common_temp_node_modules_pnpm_azure-tools_extension_3_1_272_node_modules_azure-tools_-78c196.js:86023:27)
[INFO]     at /tmp/.autorest/@[email protected]/node_modules/@autorest/core/dist/vendors-common_temp_node_modules_pnpm_azure-tools_extension_3_1_272_node_modules_azure-tools_-78c196.js:85544:35      
[INFO]     at new Promise (<anonymous>)
[INFO]     at Object.sendRequest (/tmp/.autorest/@[email protected]/node_modules/@autorest/core/dist/vendors-common_temp_node_modules_pnpm_azure-tools_extension_3_1_272_node_modules_azure-tools_-78c196.js:85534:26)
[INFO]     at Object.GetPluginNames (/tmp/.autorest/@[email protected]/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:3226:29)
[INFO]     at AutoRestExtension.GetPluginNames (/tmp/.autorest/@[email protected]/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:3283:31)
[INFO]     at Function.FromChildProcess (/tmp/.autorest/@[email protected]/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:3277:41)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.848 s
[INFO] Finished at: 2021-02-17T22:23:29Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1.1:exec (generate) on project client-csharp: Result of /bin/sh -c cd / && node --max-old-space-size=8192 /usr/bin/autorest --input-file=/output_dir/swagger.json --csharp --namespace=k8s --package-version=0.0.1 --output-folder=/output_dir --add-credentials --debug --verbose execution is: '1'. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

thoughts?

@qmfrederik
Copy link
Contributor Author

/cc @tg123

@tg123
Copy link
Member

tg123 commented Feb 17, 2021

this is due to autorest core 3.0 and now it is default version
I am debugging autorestcore3 since last month but did not get a chance to fix it

let me get it done this weekend

@brendandburns
Copy link
Contributor

@tg123 I think that AutoRest 3 introduces breaking changes in the generated code.

We should decide what to do. Now that the openapi generator supports dotnet-core, I'm probably in favor of switching to openapi-generator, since we'll introduce breaking changes no matter what, but it's going to be a big-ish project.

@tg123
Copy link
Member

tg123 commented Feb 18, 2021

@tg123 I think that AutoRest 3 introduces breaking changes in the generated code.

We should decide what to do. Now that the openapi generator supports dotnet-core, I'm probably in favor of switching to openapi-generator, since we'll introduce breaking changes no matter what, but it's going to be a big-ish project.

i am investing 2 things by far

  • autorest3
  • write our own based on our gen project

happy to know openapi generator, will also take it into rearch

@tg123
Copy link
Member

tg123 commented Mar 14, 2021

status update:
seems autorest2 will be the generator for next api version
should work on a roadmap for end users to migrate to 2.x, the new generator.

openapi generator: introduces too much breaking changes, still trying to fix all of them.
autorest3: still stuck with o2 to o3

also trying private fork of autorest2 to do some fixes to extend autorest2's lifespan

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 12, 2021
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 12, 2021
@brendandburns
Copy link
Contributor

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Jul 14, 2021
@tg123 tg123 closed this as completed Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

5 participants