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
Reduce size of typescript input/output definitions files #8613
Comments
any updates here? |
Moving this one over to |
Cross referencing to #7653 which is related to this - and would address some of the performance impacts related to this. |
I moved this issue to pulumi/pulumi as that's where the TypeScript SDK generation is implemented |
This issue is mentioned in pulumi/pulumi-azure-native#932 which is currently the second highest up-voted issue for azure-native. |
Just to explicitly provide an update for the community members following along, this work is slated for implementation. |
@RobbieMcKinstry I don't want to repeat myself again, but there is still an option to divide |
Thanks for reiterating, @XBeg9. I think you're definitely on to something! Personally, I have to imagine that's a change we'd want to make in the long run, but I'm not on a team with ownership of Azure Native, so my say doesn't matters little compared to the experts :) You're right; virtually nobody needs more than a smattering of resources offered by each cloud provider, and it's odd to make all users pay the same price in terms of memory/disk. Specifically for Azure Native, I see that the issue of splitting packages is already tracked here. It looks like @danielrbradley has already started on some blocking groundwork here. There's also precedent for doing a similar cleaving of the Go SDK that Daniel recently landed. Not what we're discussing here but in the same ballpark. My understanding was the Platform team is using this issue to track the splitting of |
10831: Reduce types output r=RobbieMcKinstry a=RobbieMcKinstry <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description This is a draft PR for #8613. <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes #8613 ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> Co-authored-by: Robbie McKinstry <robbie@pulumi.com> Co-authored-by: Robbie McKinstry <thesnowmancometh@gmail.com>
10831: Reduce types output r=RobbieMcKinstry a=RobbieMcKinstry <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description This is a draft PR for #8613. <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes #8613 ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> Co-authored-by: Robbie McKinstry <robbie@pulumi.com> Co-authored-by: Robbie McKinstry <thesnowmancometh@gmail.com>
👋🏻 Hello! I wanted to follow up with some additional information about the change that landed which closed this issue. BackgroundAs of v3.46.1 (the current release at the time of writing), types for each provider are written to This ChangeThis will change when #10831 is released (next week, barring regressions). Now, each top-level namespace previously in This is all backward-compatible with the current API. And, I believe, it does not currently offer a performance benefit. All of our So, I don't expect this change to improve performance. While I haven't run any benchmarks on it yet, we will be monitoring the performance going forward, including before release. Next StepsIt sucks that this change shouldn't improve performance. This is taken from https://github.com/pulumi/pulumi-aws:/ec2/instance.ts import * as inputs from "../types/input";
// ...
export interface InstanceState {
// ...
capacityReservationSpecification?: pulumi.Input<inputs.ec2.InstanceCapacityReservationSpecification>;
// ...
} In this snippet, we see that our compiler generates code that imports all input types by pulling in the The primary change that #10442 will introduce which will provide a major performance win is that it will change the code to look like this: import { InstanceCapacityReservationSpecification } from "../types/input/ec2";
export interface InstanceState {
capacityReservationSpecification?: pulumi.Input<InstanceCapacityReservationSpecification>;
} (This isn't the exact syntax, it's still WIP). This lets us skip importing the entire list of types from However, implementing this is no small feat. It requires adding a compiler pass to identify which imports are required for each namespace. And the blast radius isn't limited to the I can't make any promises, but I'd like to break ground on #10442 by the end of the month. If I miss that window, however, it's possible the work won't be scheduled since we've budgeted this quarter for Performance Improvements, and it's unclear if there will be future time allocation Q1 2023 for this work. |
I regret to say, we have to reopen this issue. The PR which closed this issue has been reverted due to a bug in TSC. I'm tracking the work needed to get this back into place in a new issue which I'll link below in a few minutes. |
Here's the tracking issue for the related changes. |
Hi! Do you happen to have any updates on this? |
Hi @vtereshyn after backing out my previous PR, we realized we could improve the API when making this change, so we tacked on some extra work to coincide with a repaired version of the original PR. That's all linked in the tracking issue.
|
@RobbieMcKinstry – thank you for the update. I feel this will be a huge step forward and a significant improvement. I am looking forward to seeing that in Q2. |
My pleasure! Always happy to chat! |
Team, looks like typescript definitions embedded in one single package (azure-native) drains tons of resources on the development machine, is it possible to divide the package into multi-package / plugin per namespace? Something like: @pulumi/azure-native-network . Another possible solution would be to not create one giant input types definition file and make it per namespace. Thanks
The text was updated successfully, but these errors were encountered: