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

Beta plugin versions are used over stable versions #414

Closed
danielrbradley opened this issue Nov 29, 2022 · 6 comments · Fixed by #423
Closed

Beta plugin versions are used over stable versions #414

danielrbradley opened this issue Nov 29, 2022 · 6 comments · Fixed by #423
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed resolution/fixed This issue was fixed
Milestone

Comments

@danielrbradley
Copy link
Member

What happened?

When running a program when having the follwing plugins installed:

    resource awsx-1.0.0
    resource awsx-1.0.0-beta.11

The YAML language used the beta package instead of the stable and newer 1.0.0 package.

Steps to reproduce

  1. pulumi plugin install resource awsx 1.0.0-beta.11
  2. pulumi plugin install resource awsx 1.0.0
  3. Attempt to run the following program
resources:
  cluster:
    type: aws:ecs:Cluster
  lb:
    type: awsx:lb:ApplicationLoadBalancer
  service:
    type: awsx:ecs:FargateService
    properties:
      cluster: ${cluster.arn}
      assignPublicIp: true
      desiredCount: 2
      taskDefinitionArgs:
        container:
          image: nginx:latest
          cpu: 512
          memory: 128
          essential: true
          portMappings:
            targetGroup: ${lb.defaultTargetGroup}

Expected Behavior

Should use 1.0.0 and pass correctly

Actual Behavior

Fails with error due to property not existing in beta version

Output of pulumi about

No response

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).

@danielrbradley danielrbradley added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Nov 29, 2022
@aq17 aq17 self-assigned this Nov 29, 2022
@aq17 aq17 removed the needs-triage Needs attention from the triage team label Nov 29, 2022
@aq17
Copy link
Contributor

aq17 commented Nov 29, 2022

Hey @danielrbradley , it looks like this isn't actually a plugin issue. portMappings is an array – changing it to

          portMappings:
            - targetGroup: ${lb.defaultTargetGroup}

seems to work.

@aq17 aq17 added this to the 0.81 milestone Nov 29, 2022
@danielrbradley
Copy link
Member Author

Yes, that does look like a typo there too, although the error I was seeing was actually complaining about assignPublicIp not existing (which was new in 1.0.0)

@aq17
Copy link
Contributor

aq17 commented Nov 30, 2022

Hm I didn't see that error, even after removing 1.0.0 and only having 1.0.0-beta.11 installed

@danielrbradley
Copy link
Member Author

Hmm, perhaps there's some kind of caching going on as that program is correctly invalid for 1.0.0-beta.11 and should fail.

@aq17
Copy link
Contributor

aq17 commented Dec 2, 2022

@danielrbradley apologies but I'm still unable to repro, even when explicitly using the beta version i.e.

resources:
  awsx: 
    type: pulumi:providers:awsx
    defaultProvider: true
    options:
      version: 1.0.0-beta.11

Would be super helpful if we could sync on this next week and try to root cause the issue.

@AaronFriel AaronFriel added the needs-repro Needs repro steps before it can be triaged or fixed label Dec 6, 2022
@AaronFriel AaronFriel modified the milestones: 0.81, 0.82 Dec 6, 2022
@AaronFriel
Copy link
Contributor

I think the bug may be that even though a provider version is selected via $resource.options.version, that version is not utilized during type checking of the program. Instead, a nil version was used to load the package, which could select a version that was incompatible with the program as written.

#423 should solve this, though I'd still be curious to see if we could produce a test case for the incorrect behavior.

@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Dec 7, 2022
@AaronFriel AaronFriel self-assigned this Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants