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

kiota plugin generate creates an empty folder called output when the output folder is set to something else. #5242

Open
darrelmiller opened this issue Aug 26, 2024 · 9 comments
Labels
Milestone

Comments

@darrelmiller
Copy link
Member

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Nuget tool

Client library/SDK language

None

Describe the bug

When creating a plugin and choosing a different folder for output, the generate command causes a folder called output to still be created.

Expected behavior

No output folder.

How to reproduce

kiota plugin add --pn openaiplug  --type APIPlugin -o testplugin -d "https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml"

kiota plugin generate --pn openaiplug 

Open API description file

No response

Kiota Version

1.18.0-preview.202408220001+9b943845ea8e90b3d5d7d4ee30b4fee0f9d36ab1

Latest Kiota version known to work for scenario above?(Not required)

No response

Known Workarounds

No response

Configuration

No response

Debug output

Click to expand log ```
</details>


### Other information

_No response_
@darrelmiller darrelmiller added type:bug A broken experience status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Aug 26, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Aug 26, 2024
@baywet
Copy link
Member

baywet commented Aug 26, 2024

@darrelmiller this is expected. It's because we are operating on multiple clients/plugins and we need somewhere to place the logs.
(there are logs like parsing the workspace configuration that are not related to any given plugin/client)
We could decide to place this somewhere else, like in the .kiota directory, but then we should decide where to place it for other commands.

Also while looking into that, I noticed kiota was emitting the wrong hints afterwards. This has been addressed by #5245

@baywet baywet added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Aug 26, 2024
@baywet baywet added this to the Backlog milestone Aug 26, 2024
@darrelmiller
Copy link
Member Author

I think we need to consider putting those files in the .kiota file. I found it quite intrusive when trying to organize the project with Kiota/TypeSpec/TTK all working together.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Aug 26, 2024
@baywet
Copy link
Member

baywet commented Aug 26, 2024

And then would you expect a second log file: one for each client essentially?

@baywet baywet added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs: Attention 👋 labels Aug 26, 2024
@baywet baywet moved this from Needs Triage 🔍 to Waits for author 🔁 in Kiota Aug 26, 2024
@darrelmiller
Copy link
Member Author

I think I would expect just one log file for kiota.
I'm not sure what the value of a client specific log is.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Aug 26, 2024
@baywet
Copy link
Member

baywet commented Aug 26, 2024

so should we say we always log under .kiota in the workspace experience? CC @maisarissi

@sebastienlevert
Copy link
Contributor

I vote yes for logs. Less intrusive and easier to locate across all clients generated! Maybe a .kiota/logs folder? Are we generating a single file for all generated artifacts or a log file per artifact?

@baywet
Copy link
Member

baywet commented Aug 27, 2024

right now the experience is a bit inconsistent:

  • any command that impacts a single client/plugin: next to the client/plugins
  • any other command (including search, show, etc...): output folder

@maisarissi
Copy link
Contributor

I'm ok with one log file and I don't see scenarios where having specific logs per client/plugin generation would benefit the user more than 1 log across all generation.
So, in the future we want TTK to use the .kiota as part of their app creation when creating a API plugin, so their users can benefit from Kiota features like editing existing plugins, regeneration, etc.
Should the logs be part of the .kiota too?

@baywet
Copy link
Member

baywet commented Sep 3, 2024

We could have a structure like this one in the workspace experience:

  • commands that impact clients/plugins .kiota/logs/CLientName.log
  • every other command .kiota/logs/main.log (assuming nobody names a client "main")

if that works for you, can you update the specs please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Waits for author 🔁
Development

No branches or pull requests

7 participants
@darrelmiller @sebastienlevert @baywet @maisarissi and others