Skip to content

Conversation

@nghialv
Copy link
Member

@nghialv nghialv commented Jul 7, 2021

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Fix wrong drift result that caused in v0.10.3

oldManifests,
newManifests,
diff.WithEquateEmpty(),
diff.WithIgnoreAddingMapKeys(),
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need this option because plan-preview is comparing between 2 commits, not using the live state.

result, err := provider.DiffList(liveManifests, headManifests,
result, err := provider.DiffList(
headManifests,
liveManifests,
Copy link
Member Author

Choose a reason for hiding this comment

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

The bug was caused by this order change in the last refactoring.

@nakabonne
Copy link
Member

Again, the build failed due to npm
/trigger build

@nakabonne
Copy link
Member

/trigger build

@pipecd-bot
Copy link
Collaborator

TRIGGER

@nakabonne: Your requested build has been scheduled in response to this comment.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 32.21%. This pull request decreases coverage by -0.01%.

File Function Base Head Diff
pkg/app/piped/cloudprovider/kubernetes/diff.go groupManifests 92.00% 88.00% -4.00%

b.WriteString(fmt.Sprintf("Diff between the running resources and the definitions in Git at commit %q:\n", commit))
b.WriteString("--- Git\n+++ Cluster\n\n")
b.WriteString(fmt.Sprintf("Diff between the defined state in Git at commit %s and actual state in cluster:\n\n", commit))
b.WriteString("--- Expected\n+++ Actual\n\n")
Copy link
Member

Choose a reason for hiding this comment

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

Easier to understand!

@nakabonne
Copy link
Member

Nice
/lgtm

@pipecd-bot pipecd-bot added the lgtm label Jul 7, 2021
@khanhtc1202
Copy link
Member

Nice catch
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by khanhtc1202.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants