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

V1 Resource version listed does not compile #2920

Open
hisuwh opened this issue Nov 30, 2023 · 7 comments
Open

V1 Resource version listed does not compile #2920

hisuwh opened this issue Nov 30, 2023 · 7 comments
Labels
awaiting-feedback kind/bug Some behavior is incorrect or out of spec

Comments

@hisuwh
Copy link

hisuwh commented Nov 30, 2023

What happened?

I have upgraded @pulumi/azure-native to v2 to fix a memory usage issue I was experiencing with Typescript.
This is changing my WebApp site config:

image

This is scary, I'm not sure what the consequences of this are and at the very least I have no visibility of the config being applied.

I have tried switching back to the previous resource versions according to this: https://www.pulumi.com/registry/packages/azure-native/from-v1-to-v2/top-level-resource-versions/

import * as web from "@pulumi/azure-native/web/v20201201";

let appServicePlan?: web.AppServicePlan;
let webApp: web.WebApp;
let stagingSlot?: web.WebAppSlot;

However, this version does not compile with these errors:

Namespace '"C:/<my-app>/node_modules/@pulumi/azure-native/web/v20201201/index"' has no exported member 'AppServicePlan'.
Namespace '"C:/<my-app>/node_modules/@pulumi/azure-native/web/v20201201/index"' has no exported member 'WebApp'.
Namespace '"C:/<my-app>/node_modules/@pulumi/azure-native/web/v20201201/index"' has no exported member 'WebAppSlot'.
Namespace '"C:/<my-app>/node_modules/@pulumi/azure-native/web/v20201201/index"' has no exported member 'WebAppArgs'.

Example

import * as web from "@pulumi/azure-native/web/v20201201";

let appServicePlan?: web.AppServicePlan;
let webApp: web.WebApp;
let stagingSlot?: web.WebAppSlot;

Output of pulumi about

$ pulumi about
CLI
Version      3.79.0
Go Version   go1.21.0
Go Compiler  gc

Plugins
NAME    VERSION
nodejs  unknown

Host
OS       Microsoft Windows 11 Pro
Version  10.0.22621 Build 22621
Arch     x86_64

This project is written in nodejs: executable='C:\Program Files\nodejs\node.exe' version='v18.18.1'

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@hisuwh hisuwh added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Nov 30, 2023
@mjeffryes
Copy link
Contributor

Hi @hisuwh, I can understand why that diff would seem scary, but it looks like just the outputs are changing; it's probably not due to the different versions of WebApp in v2. If you want to share the full diff and some of the code that creates the siteConfig, we might be able to make a suggestion to avoid the noise in the diff.

You are right about the versions in table in the documentation not being available. You can get the 20201001 version of WebApp in v2 which should be compatible, but again that's probably not the source of the diff you're seeing.

@mjeffryes mjeffryes added awaiting-feedback and removed needs-triage Needs attention from the triage team labels Dec 1, 2023
@hisuwh
Copy link
Author

hisuwh commented Dec 3, 2023

looks like just the outputs are changing

The thing that scares me is the type is changing. It might not be clear from the cropped screenshot but the siteConfig for an Azure web app used to be a rich object with the properties shown in red - plus many more.

Now it seems to be just a string - so how I can be sure that it is going to apply the same values (albeit the diff on config was pretty hard to interpret before).

You are right about the versions in table in the documentation not being available

They do seem to be available just incomplete.

@mjeffryes
Copy link
Contributor

Again, I think we'll need to seem more of the diff and code to give you a complete answer, but it looks like what you're seeing is the type of the output is changing, not the input to the config.

@hisuwh
Copy link
Author

hisuwh commented Dec 5, 2023

image

image

The typings haven't changed that I can see

@hisuwh
Copy link
Author

hisuwh commented Dec 13, 2023

@mjeffryes does the code and config above give you more information?

@hisuwh
Copy link
Author

hisuwh commented Dec 14, 2023

I have just stood up a brand new stack to verify this does the right thing - which it does seem to do.

However, I still think this is a problem that I now can no longer see the diff of my Azure App config. It was unreadable before but this seems a step in the wrong direction.

@mikhailshilkov mikhailshilkov added needs-triage Needs attention from the triage team and removed awaiting-feedback labels May 8, 2024
@danielrbradley
Copy link
Member

danielrbradley commented May 14, 2024

Just circling back round on this @hisuwh ... so the actual change went through fine and the rich type is still there?

It looks like the only remaining issue is that the diff was more noisy that it should be for this resource - is that correct?

Unfortunately it's still very hard to understand what's going on from the screenshots posted. What would be most beneficial here would be:

  1. The source code of a small pulumi program which creates the single resource in V1
  2. A copy of the code when upgraded to v2
  3. The full CLI output you see when performing plumi preview --diff to show the full rich diff.

@danielrbradley danielrbradley added awaiting-feedback and removed needs-triage Needs attention from the triage team labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

4 participants