-
Notifications
You must be signed in to change notification settings - Fork 221
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
Kiota deletes all but the last plugin in the workspace.json when --refresh is used #6033
Comments
Thanks for raising this @garethj-msft Looks like the issue is caused here in the
@baywet Any chance you'd be able to confirm if the expectation here was the plugins would be generated in different output folders? |
This behaviour is kind of expected because we've never designed/tested for that (people putting plugins in the same output directory) I guess the generate command should disable the "CleanOutput" parameter when it detects multiple plugins/clients going to the same output directory. |
Let me try putting them in separate folders and see if anyone really complains hard. |
Thinking about this, since in plugin generation the same files are always generated (openapi file, plugin file, workspace files) which ultimately get overwritten with generation even if Would it make sense to have the "CleanOutput" to be always false in this scenario? In my head it only makes sense to use it in client/SDK generation as a modification in the inputs could result in generation of a different set of files (e.g removing/renaming a path has consequences of files needing removing like models/request builders). |
I think you have a valid point, we could start by disabling it for plugins in the extension, as well ignore it in the CLI. |
@baywet and I had a discussion yesterday and here are some thoughts that came up: Having a clean output to be performed every time for every client/plugin in the For example, why would we do a clean output when generating a client? For regeneration, sure, but why for generation? Also, thinking about this scenario where I do have multiple plugins in the same output directory, by having a separate routine, we would do a clean output (remove all files from the output) and then kiota plugin generate, generating all plugins again their. It shouldn't be an issue to issue the |
What are you generating using Kiota, clients or plugins?
Kiota plugin
In what context or format are you using Kiota?
Windows executable
Client library/SDK language
None
Describe the bug
output files are missing after running
kiota plugin generate --refresh
with multiple plugins in the workspace.json file.This does not repro without the --refresh flag
Expected behavior
Expected
six files present after command completes - 3xOpenAPI, 3xplugin manifest
Actual
two files present after command completes - 1xOpenAPI, 1xplugin manifest
These are for the last plugin in the workspace file.
How to reproduce
workspace.json containing three Copilot plugins, with a shared output directory - this is our Copilot project structure
Open API description file
Not relevant - it's the workspace.json file that is the problem.
Kiota Version
1.22.3
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
Specify an individual output directory for each plugin. This makes the project more cluttered.
Configuration
No response
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: