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

Fix #3838: Component is left in broken state after redeployment of the pod #3859

Merged
merged 3 commits into from
Sep 1, 2020

Conversation

jgwest
Copy link
Contributor

@jgwest jgwest commented Aug 28, 2020

What type of PR is this?
/kind bug

What does does this PR do / why we need it:

See #3838 (comment)

Which issue(s) this PR fixes:

Fixes #3838

PR acceptance criteria:

How to test changes / Special notes to the reviewer:

See #3838 for test reproduction steps.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 28, 2020
@openshift-ci-robot
Copy link
Collaborator

Hi @jgwest. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. Required by Prow. label Aug 28, 2020
@codecov
Copy link

codecov bot commented Aug 28, 2020

Codecov Report

Merging #3859 into master will increase coverage by 0.22%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3859      +/-   ##
==========================================
+ Coverage   44.19%   44.41%   +0.22%     
==========================================
  Files         141      142       +1     
  Lines       13600    13769     +169     
==========================================
+ Hits         6010     6116     +106     
- Misses       7007     7067      +60     
- Partials      583      586       +3     
Impacted Files Coverage Δ
pkg/sync/adapter.go 75.93% <0.00%> (-2.36%) ⬇️
pkg/odo/cli/env/env.go 18.51% <0.00%> (-18.52%) ⬇️
pkg/preference/preference.go 59.47% <0.00%> (-2.11%) ⬇️
...g/devfile/adapters/kubernetes/component/adapter.go 34.28% <0.00%> (-0.45%) ⬇️
pkg/testingutil/pods.go 0.00% <0.00%> (ø)
pkg/testingutil/devfile.go 0.00% <0.00%> (ø)
pkg/odo/cli/storage/create.go 0.00% <0.00%> (ø)
pkg/devfile/adapters/common/types.go 50.00% <0.00%> (ø)
pkg/devfile/adapters/common/command_simple.go 81.25% <0.00%> (ø)
pkg/devfile/adapters/common/command_supervisor.go 0.00% <0.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1dfc312...c31e79b. Read the comment docs.

@johnmcollier
Copy link
Member

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. Required by Prow. labels Aug 28, 2020

// 3) Ensure the build passes, indicating that all files were correctly synced to the new pod
output = helper.CmdShouldPass("odo", commands...)
Expect(output).To(ContainSubstring("BUILD SUCCESS"))
Copy link
Contributor

@mik-dass mik-dass Aug 28, 2020

Choose a reason for hiding this comment

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

Should we also check that all the files are present in the pod after the successful push?

Copy link
Member

@johnmcollier johnmcollier Aug 28, 2020

Choose a reason for hiding this comment

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

@mik-dass Agreed, can't hurt to check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@kadel
Copy link
Member

kadel commented Aug 28, 2020

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kadel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Aug 28, 2020
Comment on lines 621 to 624
equal := reflect.DeepEqual(localFiles, remoteFiles)
if !equal {
fmt.Fprintf(GinkgoWriter, "Files mismatched between local and remote. local: {%v} remote: {%v}", localFiles, remoteFiles)
Fail("Mismatching files between local and remote")
Copy link
Contributor

Choose a reason for hiding this comment

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

We can directly use Expect(ACTUAL).Should(Equal(EXPECTED)). According to https://onsi.github.io/gomega/, it uses reflect.DeepEqual() underneath.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@jgwest
Copy link
Contributor Author

jgwest commented Aug 31, 2020

/retest

Copy link
Member

@cdrage cdrage left a comment

Choose a reason for hiding this comment

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

Code looks great! Thank you!

/lgtm

@@ -108,7 +108,16 @@ func (a Adapter) SyncFiles(syncParameters common.SyncParameters) (isPushRequired
}
}

// run the indexer and find the modified/added/deleted/renamed files
// If the pod changed, reset the index, which will cause the indexer to walk the directory
Copy link
Member

Choose a reason for hiding this comment

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

Big 👍

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Aug 31, 2020
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

7 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

19 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit a7408ed into redhat-developer:master Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

component is left in broken state after redeployment of the pod
8 participants