Skip to content

💣 Bug: Update interface always be called if a plugin using util.helm #896

@aFlyBird0

Description

@aFlyBird0

What Happened?

When I was testing the Jenkins family of plugins, I found that every time I executed the apply command dtm would indicate that the resource had drifted, and then execute the Update operation.

image

The line starting with the - sign is the one returned by the Read interface.
The line starting with + is the original resource in the state file, which is updated by the Create or Update interface.

To rule out a problem with the jenkins plugin, let's look at the code of the argocd plugin.

image

image

image

You can see that Read and Update call different resource fetch interfaces. This causes the state file to store "static state" after each call to Update, while the latest resource fetched by the Read interface call is "all state". This will cause the resource to drift and trigger Update each time apply is called.

Most of the plugins that use helm to install tools have this problem.

How to Reproduce?

Execute apply multiple times on a plugin that uses helm to install tools (e.g. argocd).

Anything else

No response

DevStream Version

latest

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions