Skip to content

Conversation

@dantedelucia
Copy link
Collaborator

No description provided.

@linear
Copy link

linear bot commented Sep 29, 2025

@dantedelucia dantedelucia force-pushed the kit-562-1-day-add-support-for-detecting-changes-in-underlying-assets branch from 81024f9 to 84ed7bd Compare September 29, 2025 22:18
Copy link
Contributor

@alexanderguy alexanderguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this up. A couple of notes, and this general comment:

Please just use the boilerplate that Pulumi provides, to establish the baseline diff functionality. Don't modify it, refactor it, or add any extra spin on it. Just import it as close to verbatim as possible, with the correct license attribution in place.

The object of this exercise is to get /exactly/ what we had before, with the addition of checking hashes of the files.

No more, no less.

From my bird's eye view the logic should just be:

  • If the files that create uses change, then we should signal to pulumi that we need to delete before replace (see DiffResponse).
  • If the update files change, we need to signal that there's a difference and let Pulumi do its thing.
  • If the delete files change, we don't care: nothing will happen until the point in the time the delete happens.

newProps := resource.NewPropertyMap(newInput)

// Remove fields we want to ignore from the diff
delete(newProps, "connection")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we be ignoring these? They weren't ignored by the previous boilerplate. What happens if I change the connection information?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left over from my previous hand rolled approach using cmp to avoid panics.

return fmt.Errorf("command is empty")
}

state.Command = def
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we doing this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left over from early attempt to keep track of the previous command run to determine if an update occurred.

Add Pulumi compatible defaultDiff()
Add Payload hashes to state
Add last Command to state
@dantedelucia dantedelucia force-pushed the kit-562-1-day-add-support-for-detecting-changes-in-underlying-assets branch from 84ed7bd to 1e19ea7 Compare September 30, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants