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

odo doesn't properly re-sync all files if a new deployment is created on 'odo push' #3847

Closed
johnmcollier opened this issue Aug 27, 2020 · 2 comments
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).

Comments

@johnmcollier
Copy link
Member

johnmcollier commented Aug 27, 2020

/kind bug
/area devfile

I'm seeing an issue on master with odo push when we re-sync the files of a project after a component restart (such as from changing the env in the devfile). The push will succeed and it will say the source code synced fine, but if I exec into the container (or look at its logs), I'll see that only the devfile (and whatever files were changed locally or created as part of the build), were synced, and the rest of the source code was not synced

Files synced on first odo push (full logs: first-push.txt):

I0826 21:22:20.287844   92492 adapter.go:211] Copying files /Users/johncollier/ododev/brokesync/nodejs/.gitignore
/Users/johncollier/ododev/brokesync/nodejs/LICENSE /Users/johncollier/ododev/brokesync/nodejs/README.md 
/Users/johncollier/ododev/brokesync/nodejs/devfile.yaml /Users/johncollier/ododev/brokesync/nodejs/package-lock.json
/Users/johncollier/ododev/brokesync/nodejs/package.json /Users/johncollier/ododev/brokesync/nodejs/server.js 
/Users/johncollier/ododev/brokesync/nodejs/test /Users/johncollier/ododev/brokesync/nodejs/test/test.js to pod

Files synced on odo push with redeploy (full logs: push-redeploy.txt):

I0826 21:29:25.688476   93487 adapter.go:211] Copying files /Users/johncollier/ododev/brokesync/nodejs/devfile.yaml 
to pod

If I use the -f flag on odo push, sync is still broken. Additionally, the issue can be seen if you do odo delete, followed by odo push again.

It seems we're not properly detecting the scenarios where we need to bypass the odo-file-index.json file and do a full sync (such as component redeploy, or force push)

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. labels Aug 27, 2020
@johnmcollier
Copy link
Member Author

Marking this as high priority since sync is pretty much broken if a container needs to be recreated, and that this is a regression from v1.2.5 (which properly detected when/when not to do a full sync)

/priority high

@openshift-ci-robot openshift-ci-robot added the priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). label Aug 27, 2020
@johnmcollier
Copy link
Member Author

Closing as a dupe of #3838

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
None yet
Development

No branches or pull requests

2 participants