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

Network should ignore changes to options["com.docker.network.driver.overlay.vxlanid_list"] by default #1284

Open
cowwoc opened this issue Nov 23, 2024 · 4 comments
Labels
awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. kind/bug Some behavior is incorrect or out of spec

Comments

@cowwoc
Copy link

cowwoc commented Nov 23, 2024

Describe what happened

When deploying a Network, changing nothing, then running pulumi up again, pulumi sees a diff:

- com.docker.network.driver.overlay.vxlanid_list: "4098" where 4098 could be any number.

Sample program

const internalNetwork = new Network(name, {
	name,
	driver: "overlay",
	options: {"encrypted": "true"}
});

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

CLI
Version      3.141.0
Go Version   go1.23.3
Go Compiler  gc

Plugins
KIND      NAME          VERSION
resource  command       1.0.1
resource  digitalocean  4.35.0
resource  docker        4.5.7
language  nodejs        unknown
resource  tls           5.0.9

Host
OS       Microsoft Windows 10 Pro
Version  10.0.19045 Build 19045
Arch     x86_64

This project is written in nodejs: executable='C:\Users\Gili\scoop\apps\nodejs\current\node.exe' version='v23.3.0'

Backend
Name           pulumi.com
URL            https://app.pulumi.com/cowwoc
User           cowwoc
Organizations  cowwoc, licensed
Token type     personal

Pulumi locates its logs in C:\Users\Gili\AppData\Local\Temp by default

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

@cowwoc cowwoc added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Nov 23, 2024
@cowwoc cowwoc changed the title Networks should ignore changes to "com.docker.network.driver.overlay.vxlanid_list" by default Network should ignore changes to "options['com.docker.network.driver.overlay.vxlanid_list']" by default Nov 23, 2024
@cowwoc
Copy link
Author

cowwoc commented Nov 23, 2024

Speaking of which, I can't figure out a way to add this property to ignoreChanges no matter what I do. I tried following https://www.pulumi.com/docs/iac/concepts/miscellaneous/property-paths/ but it did not work. Is there a bug here too?

@cowwoc
Copy link
Author

cowwoc commented Nov 23, 2024

I cramped up logging level to 10 and I see this odd warning message:

I1123 14:58:25.487094 4136 properties_path.go:85] property path '["com.docker.network.driver.overlay.vxlanid_list"]' contains a '.' followed by a '['; this is not strictly legal

It's odd because I don't see a . character followed by a [ so it's not clear what it's referring to.

@cowwoc
Copy link
Author

cowwoc commented Nov 24, 2024

Ah, I think I understand the error message now. The line before the one I quoted above read:

I1123 20:14:39.069626 6300 provider_plugin.go:1009] Provider[docker, 0xc002324540].Diff(urn:pulumi:staging::licensed::digitalocean:index/droplet:Droplet$docker:index/network:Network::network-external-nyc1,83zo4s8pg4p3jrhbyhw0ifloy) success: changes=2 #replaces=[options] #stables=[attachable checkDuplicate driver ingress internal ipamConfigs ipamDriver ipamOptions ipv6 labels name] delbefrepl=true, diffs=#[options], detaileddiff=map[options:kind:UPDATE options.["com.docker.network.driver.overlay.vxlanid_list"]:kind:DELETE_REPLACE]

So now this message makes sense:

I1123 20:14:39.069626 6300 properties_path.go:85] property path '["com.docker.network.driver.overlay.vxlanid_list"]' contains a '.' followed by a '['; this is not strictly legal

It is complaining that options.["com.docker.network.driver.overlay.vxlanid_list"] contains a dot before a bracket. This isn't a property name that I generated, but rather one that pulumi generated itself.

I then tried ignoreChanges: [`options.["com.docker.network.driver.overlay.vxlanid_list"]`] and sure enough it works.

So it sounds like there is a second bug at play here... Pulumi is generating an invalid property path, which makes it impossible for users to ignore the property without digging into these debug logs.

Is this a known bug? Or should I open a second bug report for this?

@cowwoc cowwoc changed the title Network should ignore changes to "options['com.docker.network.driver.overlay.vxlanid_list']" by default Network should ignore changes to options["com.docker.network.driver.overlay.vxlanid_list"] by default Nov 24, 2024
@blampe
Copy link
Contributor

blampe commented Nov 25, 2024

I then tried ignoreChanges: [options.["com.docker.network.driver.overlay.vxlanid_list"]] and sure enough it works.

That's surprising. The correct syntax is options["com.docker.network.driver.overlay.vxlanid_list"], so I wouldn't expect this to do anything.

So it sounds like there is a second bug at play here... Pulumi is generating an invalid property path, which makes it impossible for users to ignore the property without digging into these debug logs.

Tracked in pulumi/pulumi-terraform-bridge#2669.

This issue can track the unexpected diff.

@blampe blampe removed the needs-triage Needs attention from the triage team label Nov 25, 2024
@blampe blampe added the awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants