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

[OpenAI] Refactor project structure #25986

Merged
merged 8 commits into from
Oct 10, 2023
Merged

Conversation

jpalvarezl
Copy link
Member

Refactoring project structure. Originally introduced in this draft PR for Whisper

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 27, 2023

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ The required check named Swagger ModelValidation has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it.

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 27, 2023

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
compared swaggers (via Oad v0.10.4)] new version base version
generated.json 2023-06-01-preview(6925d49) 2023-06-01-preview(main)
generated.json 2023-07-01-preview(6925d49) 2023-07-01-preview(main)
generated.json 2023-08-01-preview(6925d49) 2023-08-01-preview(main)
generated.json 2023-09-01-preview(6925d49) 2023-09-01-preview(main)
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️⚠️LintDiff: 0 Warnings warning [Detail]
compared tags (via openapi-validator v2.1.6) new version base version
release_2023_06_01_preview_autogen release_2023_06_01_preview_autogen(6925d49) release_2023_06_01_preview_autogen(main)
release_2023_07_01_preview_autogen release_2023_07_01_preview_autogen(6925d49) release_2023_07_01_preview_autogen(main)
release_2023_08_01_preview_autogen release_2023_08_01_preview_autogen(6925d49) release_2023_08_01_preview_autogen(main)

The following errors/warnings exist before current PR submission:

Only 30 items are listed, please refer to log for more details.

Rule Message
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L423
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L494
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L706
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L1177
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L423
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L494
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L733
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L1248
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-08-01-preview/generated.json#L523
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-08-01-preview/generated.json#L594
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-08-01-preview/generated.json#L851
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-08-01-preview/generated.json#L1366
⚠️ SecurityDefinitionDescription Security definition should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L46
⚠️ SecurityDefinitionDescription Security definition should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L51
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L64
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L70
⚠️ ParameterDescription Parameter should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L77
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L115
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L121
⚠️ ParameterDescription Parameter should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L128
⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: inference/preview/2023-06-01-preview/generated.json#L165
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L166
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L172
⚠️ ParameterDescription Parameter should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L179
⚠️ LongRunningOperationsOptionsValidator A LRO Post operation with return schema must have 'x-ms-long-running-operation-options' extension enabled.
Location: inference/preview/2023-06-01-preview/generated.json#L215
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L217
⚠️ ParameterDescription Parameter should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L223
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L269
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L275
⚠️ SchemaNamesConvention Schema name should be Pascal case.
Location: inference/preview/2023-06-01-preview/generated.json#L312
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️❌ModelValidation: 4 Errors, 0 Warnings failed [Detail]
Rule Message
OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: file
Url: inference/preview/2023-09-01-preview/generated.json#L1945:39
ExampleUrl: preview/2023-09-01-preview/examples/audio_transcription_object.json
OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: file
Url: inference/preview/2023-09-01-preview/generated.json#L2034:37
ExampleUrl: preview/2023-09-01-preview/examples/audio_translation_object.json
OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: file
Url: inference/preview/2023-09-01-preview/generated.json#L1945:39
ExampleUrl: preview/2023-09-01-preview/examples/audio_transcription_object.json
OBJECT_MISSING_REQUIRED_PROPERTY Missing required property: file
Url: inference/preview/2023-09-01-preview/generated.json#L2034:37
ExampleUrl: preview/2023-09-01-preview/examples/audio_translation_object.json
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️️✔️Automated merging requirements met succeeded [Detail] [Expand]
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 27, 2023

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

Breaking Changes Tracking

️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs]Release - Generate from 1d8c413. SDK Automation 14.0.0
    command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
    warn		specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md skipped due to azure-sdk-for-net-track2 not found in swagger-to-sdk
    command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
  • ️✔️Azure.AI.OpenAI [View full logs]  [Release SDK Changes]
    info	[Changelog]
️⚠️ azure-sdk-for-java warning [Detail]
  • ⚠️Warning [Logs]Release - Generate from 1d8c413. SDK Automation 14.0.0
    command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
    cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.2.1
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.2.1
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    warn		specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md skipped due to azure-sdk-for-java not found in swagger-to-sdk
    command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
    cmderr	[generate.py] npm notice
    cmderr	[generate.py] npm notice New major version of npm available! 8.19.4 -> 10.2.0
    cmderr	[generate.py] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.0>
    cmderr	[generate.py] npm notice Run `npm install -g [email protected]` to update!
    cmderr	[generate.py] npm notice
  • ️✔️azure-ai-openai [View full logs]  [Release SDK Changes]
️❌ azure-sdk-for-js failed [Detail]
  • Pipeline Framework Failed [Logs]Release - Generate from 1d8c413. SDK Automation 14.0.0
    command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
    warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
    warn		specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md skipped due to azure-sdk-for-js not found in swagger-to-sdk
    command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
    cmderr	[automation_generate.sh] [ERROR] Error:
    cmderr	[automation_generate.sh] [ERROR] An error occurred while run build for typespec project: "specification/cognitiveservices/OpenAI.Inference":
    cmderr	[automation_generate.sh] [ERROR] Err: Error: Find unexpected generated file: sdk/openai/openai/sources/generated/src/OpenAIClient.ts. Please confirm whether the output-folder is correct.
    cmderr	[automation_generate.sh] [ERROR] Stderr: "undefined"
    cmderr	[automation_generate.sh] [ERROR] Stdout: "undefined"
    cmderr	[automation_generate.sh] [ERROR] ErrorStack: "Error: Find unexpected generated file: sdk/openai/openai/sources/generated/src/OpenAIClient.ts. Please confirm whether the output-folder is correct.
    cmderr	[automation_generate.sh] [ERROR]     at Object.<anonymous> (/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/dist/utils/git.js:24:23)
    cmderr	[automation_generate.sh] [ERROR]     at Generator.next (<anonymous>)
    cmderr	[automation_generate.sh] [ERROR]     at fulfilled (/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/node_modules/tslib/tslib.js:112:62)"
    the given reference name 'refs/heads/sdkAuto/' is not valid
    Error: the given reference name 'refs/heads/sdkAuto/' is not valid
  • error	Fatal error: the given reference name 'refs/heads/sdkAuto/' is not valid
    error	The following packages are still pending:
    error
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 27, 2023

Generated ApiView

Language Package Name ApiView Link
Java azure-ai-openai There is no API change compared with the previous version
.Net Azure.AI.OpenAI There is no API change compared with the previous version

@lmazuel lmazuel merged commit 1d8c413 into main Oct 10, 2023
@lmazuel lmazuel deleted the jpalvarezl/proj_structure_refactor branch October 10, 2023 16:34
@openapi-pipeline-app
Copy link

Swagger pipeline restarted successfully, please wait for status update in this comment.

jnlycklama pushed a commit that referenced this pull request Nov 8, 2023
* Somehow after compiling the examples are gone

* Renamed model files

* Re-structured project

* Added fix for example directory

* Corrected example

* Corrected documentation issue

* Added new word to custom-word list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants