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

@microsoft/kiota-bundle versioning #1440

Closed
hognevevle opened this issue Oct 25, 2024 · 4 comments · Fixed by #1445
Closed

@microsoft/kiota-bundle versioning #1440

hognevevle opened this issue Oct 25, 2024 · 4 comments · Fixed by #1445
Assignees
Labels
bug Something isn't working priority:p1 High priority/Major issue but not blocking or Big percentage of customers affected.Bug SLA <=7days type:bug A broken experience type:regression A bug from previous release WIP

Comments

@hognevevle
Copy link

hognevevle commented Oct 25, 2024

Hello,

I'm a bit confused about the current @microsoft/kiota-bundle versioning.

Currently, kiota info -l typescript instructs me to install version 1.0.0-preview.11 of @microsoft/kiota-bundle.

kiota info -l typescript
The language TypeScript is currently in Preview maturity level.
After generating code for this language, you need to install the following packages:
Package Name                           Version           Type          
@microsoft/kiota-authentication-azure  1.0.0-preview.63  Authentication
@microsoft/kiota-bundle                1.0.0-preview.11  Bundle
[...]

The bundle package, however, has dependencies on * for all the different kiota-* packages.

"dependencies": {
"@microsoft/kiota-abstractions": "*",
"@microsoft/kiota-http-fetchlibrary": "*",
"@microsoft/kiota-serialization-form": "*",
"@microsoft/kiota-serialization-json": "*",
"@microsoft/kiota-serialization-multipart": "*",
"@microsoft/kiota-serialization-text": "*"

This means that all of them will be installed with the latest version.

✗ yarn add @microsoft/[email protected]
➤ YN0000: · Yarn 4.3.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @microsoft/kiota-bundle@npm:1.0.0-preview.11, @microsoft/kiota-abstractions@npm:1.0.0-preview.70, @microsoft/kiota-http-fetchlibrary@npm:1.0.0-preview.70, @microsoft/kiota-serialization-form@npm:1.0.0-preview.70, @microsoft/kiota-serialization-json@npm:1.0.0-preview.70, and 5 more.
➤ YN0000: └ Completed in 2s 965ms

Is this the intended behaviour? How can I tell if those (.70) are the correct versions compatible with the code generated by kiota?

@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Oct 25, 2024
@andrueastman
Copy link
Member

Thanks for raising this @hognevevle

Apologies for the confusion here. At the moment, running kiota info -l typescript will show the dependency list at the time of the release of the kiota version you are using (which would get outdated if a new version was released later on). This information are the versions compatible/validated with the kiota generator version you are using. On the next release of the Kiota this information should be updated to higher versions of the dependencies validated against the generator.

To also alleviate confusion here, going forward, versions for the Typescript libraries will be aligned to the same version as we also do for other languages like C#,java and python(see example release here). So, if you use the bundle version 1.0.0-preview.63 the other libraries e.g. serialization that are compatible with the version will be of the same version 1.0.0-preview.63.

Let us know if you have further questions.

@andrueastman andrueastman moved this from Needs Triage 🔍 to Waits for author 🔁 in Kiota Oct 25, 2024
@andrueastman andrueastman added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question labels Oct 25, 2024
@hognevevle
Copy link
Author

hognevevle commented Oct 25, 2024

Thanks for the clarification, @andrueastman !

I might be missing something, but won't the dependencies on * from the bundle package still cause problems here? I.e. whenever you install the bundle package (be it version preview.10 or preview.70), you will always get the latest version of the dependencies. Wouldn't it make sense for the bundle package to depend on specific versions as well? Or is this something you already plan on doing?

@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 Oct 25, 2024
@baywet
Copy link
Member

baywet commented Oct 25, 2024

@hognevevle I do think you're correct since if you run the following

npm init -y
npm i @microsoft/kiota-bundle -S
cat node_modules/@microsoft/kiota-bundle/package.json

you get (for the dependencies section)

 "dependencies": {
                "@microsoft/kiota-abstractions": "*",
                "@microsoft/kiota-http-fetchlibrary": "*",
                "@microsoft/kiota-serialization-form": "*",
                "@microsoft/kiota-serialization-json": "*",
                "@microsoft/kiota-serialization-multipart": "*",
                "@microsoft/kiota-serialization-text": "*"
        },

I think we've operated under an assumption that lerna would replace the versions for us, which is not happening right now.
This can have serious side effects, and needs to be investigated. All the packages beyond kiota-abstractions are most likely impacted since this is how they refer to abstractions.

Solving this might also have a positive impact on #1369

@baywet baywet added bug Something isn't working type:bug A broken experience type:regression A bug from previous release priority:p1 High priority/Major issue but not blocking or Big percentage of customers affected.Bug SLA <=7days and removed Needs: Attention 👋 type:question An issue that's a question labels Oct 25, 2024
@baywet baywet moved this from Waits for author 🔁 to Todo 📃 in Kiota Oct 25, 2024
@andrueastman
Copy link
Member

Thanks for the clarification here. In that case, I believe we can set a version in the projects and release please will update the dependencies by updating the versions once we use the node-workspace plugin.

https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md#node-workspace

@andrueastman andrueastman self-assigned this Oct 28, 2024
@andrueastman andrueastman moved this from Todo 📃 to In Review 💭 in Kiota Oct 28, 2024
@github-project-automation github-project-automation bot moved this from In Review 💭 to Done ✔️ in Kiota Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p1 High priority/Major issue but not blocking or Big percentage of customers affected.Bug SLA <=7days type:bug A broken experience type:regression A bug from previous release WIP
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants