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

Type generation broken #101

Closed
wolfy1339 opened this issue Nov 9, 2022 · 8 comments · Fixed by #104
Closed

Type generation broken #101

wolfy1339 opened this issue Nov 9, 2022 · 8 comments · Fixed by #104
Labels
released Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR

Comments

@wolfy1339
Copy link
Member

wolfy1339 commented Nov 9, 2022

Due to the update of openapi-typescript in #100, the type generation broke

To remedy this, I propose we dry-run the type generation process whenever there's an update to openapi-typescript

See the logs:

file:///home/runner/work/octokit-next.js/octokit-next.js/node_modules/openapi-typescript/dist/load.js:141
    walk(options.schemas[schemaID].schema, (rawNode, nodePath) => {
                                   ^

TypeError: Cannot read properties of undefined (reading 'schema')
    at load (file:///home/runner/work/octokit-next.js/octokit-next.js/node_modules/openapi-typescript/dist/load.js:141:36)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 0)
    at async load (file:///home/runner/work/octokit-next.js/octokit-next.js/node_modules/openapi-typescript/dist/load.js:187:5)
    at async openapiTS (file:///home/runner/work/octokit-next.js/octokit-next.js/node_modules/openapi-typescript/dist/index.js:37:5)
    at async run (file:///home/runner/work/octokit-next.js/octokit-next.js/scripts/types-openapi/update.js:91:7)

https://github.com/octokit/octokit-next.js/actions/runs/3430908885/jobs/5718425041

@wolfy1339
Copy link
Member Author

There seems to be other users that are having the same issue.
openapi-ts/openapi-typescript#975

@wolfy1339
Copy link
Member Author

wolfy1339 commented Nov 9, 2022

It seems that the OpenAPI Update workflow should already cover this, as it is triggered by renovate branches.

The workflow was skipped: https://github.com/octokit/octokit-next.js/actions/runs/3425540945

There really should be a better way to make sure this doesn't happen again.

@kfcampbell
Copy link
Member

Oh no! I'm sorry, what a hassle.

@wolfy1339
Copy link
Member Author

No worries, it happens to the best of us 😆

On another note, the labels seem out of date in the workflow

@wolfy1339
Copy link
Member Author

This will be fixed in openapi-ts/openapi-typescript#977

@wolfy1339
Copy link
Member Author

I've run into another issue, it doesn't seem to respect "nullable": true anymore

@wolfy1339
Copy link
Member Author

The previous issue, was fixed. openapi-ts/openapi-typescript#983
Current blocker: openapi-ts/openapi-typescript#984

wolfy1339 added a commit that referenced this issue Dec 21, 2022
wolfy1339 added a commit that referenced this issue Mar 30, 2023
wolfy1339 added a commit that referenced this issue Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants