odo watch with file modifications using vim editor pushes temporary file created

Created on 28 Sep 2018  路  15Comments  路  Source: openshift/odo

Steps to reproduce:

  1. Create a component using local source
  2. Start watch
  3. Edit a file in watched source using vim editor

Observation:
Any edit to any file generates a file of name similar to 4913(https://groups.google.com/forum/#!topic/vim_dev/sppdpElxY44) which is a temporary file and that triggers a push

Command extract

[redhat@localhost odo]$ odo watch nodejs --ignores "tests" --ignores ".*\\.git.*" --ignores "server.js" -v 4
I0928 19:38:50.377675   18042 occlient.go:259] Trying to connect to server 127.0.0.1:8443
I0928 19:38:50.377906   18042 occlient.go:265] Server https://127.0.0.1:8443 is up
I0928 19:38:50.385721   18042 occlient.go:242] isLoggedIn err:  <nil> 
 output: "developer"
I0928 19:38:50.408033   18042 occlient.go:1692] Getting DeploymentConfig: nodejs-odo-houndrust
I0928 19:38:50.419005   18042 component.go:358] Source for component nodejs is file:///home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex (local)
I0928 19:38:50.419139   18042 watch.go:114] starting WatchAndPush, path: /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex, component: nodejs, ignores [tests .*\.git.* server.js]
I0928 19:38:50.419565   18042 watch.go:77] ignoring watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.git
I0928 19:38:50.421208   18042 watch.go:77] ignoring watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/tests
I0928 19:38:50.421440   18042 watch.go:97] adding watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex
I0928 19:38:50.421495   18042 watch.go:97] adding watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/helm
I0928 19:38:50.421544   18042 watch.go:97] adding watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/helm/nodejs
I0928 19:38:50.421595   18042 watch.go:97] adding watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/helm/nodejs/templates
I0928 19:38:50.421645   18042 watch.go:97] adding watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/openshift
I0928 19:38:50.421704   18042 watch.go:97] adding watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/openshift/pipeline
I0928 19:38:50.421752   18042 watch.go:97] adding watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/openshift/templates
I0928 19:38:50.421803   18042 watch.go:97] adding watch on path /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/views
Waiting for something to change in /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex
I0928 19:38:58.835038   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swx": REMOVE
I0928 19:38:58.835205   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swx with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:38:58.835229   18042 watch.go:182] error removing watch for /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swx: can't remove non-existent inotify watch for: /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swx
I0928 19:38:58.835245   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp": REMOVE
I0928 19:38:58.835312   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:38:58.835328   18042 watch.go:182] error removing watch for /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp: can't remove non-existent inotify watch for: /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp
I0928 19:38:58.835340   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp": CREATE
I0928 19:38:58.835424   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:38:58.835531   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp": WRITE
I0928 19:38:58.835599   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:38:58.835673   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp": CHMOD
I0928 19:38:58.835739   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:10.725707   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp": WRITE
I0928 19:39:10.725983   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:21.538012   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/4913": REMOVE
I0928 19:39:21.538303   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/4913 with [tests .*\.git.* server.js]
.matched false, err: <nil>
I0928 19:39:21.538363   18042 watch.go:182] error removing watch for /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/4913: can't remove non-existent inotify watch for: /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/4913
I0928 19:39:21.538402   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js": RENAME
I0928 19:39:21.538721   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:21.539111   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js~": CREATE
I0928 19:39:21.539444   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js~ with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:21.539757   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js": CREATE
I0928 19:39:21.540014   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:21.540494   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js": WRITE
I0928 19:39:21.540862   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:21.541367   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js": CHMOD
I0928 19:39:21.541780   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:21.542128   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js": CHMOD
I0928 19:39:21.542491   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:21.546770   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js~": REMOVE
I0928 19:39:21.547653   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js~ with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:21.547796   18042 watch.go:182] error removing watch for /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js~: can't remove non-existent inotify watch for: /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/server.js~
I0928 19:39:21.547864   18042 watch.go:138] filesystem watch event: "/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp": REMOVE
I0928 19:39:21.548301   18042 watch.go:170] Matching /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp with [tests .*\.git.* server.js]
.matched true, err: <nil>
I0928 19:39:21.548353   18042 watch.go:182] error removing watch for /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp: can't remove non-existent inotify watch for: /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/.server.js.swp
File /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/4913 changed
Pushing files...
I0928 19:39:23.421965   18042 watch.go:231] Copying files [/home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex/4913] to pod
I0928 19:39:23.432529   18042 occlient.go:1099] Waiting for deploymentconfig=nodejs-odo-houndrust pod
I0928 19:39:23.443001   18042 occlient.go:1114] Status of nodejs-odo-houndrust-1-98kmm pod is Running
I0928 19:39:23.443123   18042 occlient.go:1117] Pod nodejs-odo-houndrust-1-98kmm is running.
I0928 19:39:23.443272   18042 component.go:226] Copying to pod nodejs-odo-houndrust-1-98kmm
Please wait, building component....
---> Installing application source ...
---> Installing all dependencies
npm WARN saveError ENOENT: no such file or directory, open '/opt/app-root/src/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/opt/app-root/src/package.json'
npm WARN src No description
npm WARN src No repository field.
npm WARN src No README data
npm WARN src No license field.

up to date in 0.051s
---> Building in production mode
npm ERR! path /opt/app-root/src/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/opt/app-root/src/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app-root/src/.npm/_logs/2018-09-28T14_09_24_394Z-debug.log
I0928 19:39:24.402134   18042 watch.go:241] Error from PushLocal: unable to execute assemble script: error while streaming command: command terminated with exit code 254
Waiting for something to change in /home/redhat/git-srcs/src/github.com/redhat-developer/nodejs-ex
kinbug prioritLow

All 15 comments

It also fails for gedit

[mrinaldas@localhost odo]$ ./odo watch nodejs --ignore "tests" --ignore ".\.git." --ignore "server.js" --ignore ".server.js.swp" --ignore ".server.js.swx"    -v 4
I0928 20:09:33.491354   29020 occlient.go:259] Trying to connect to server 127.0.0.1:8443
I0928 20:09:33.491614   29020 occlient.go:265] Server https://127.0.0.1:8443 is up
I0928 20:09:33.503015   29020 occlient.go:242] isLoggedIn err:  <nil> 
 output: "developer"
I0928 20:09:33.503229   29020 occlient.go:1692] Getting DeploymentConfig: nodejs-app
I0928 20:09:33.510723   29020 component.go:358] Source for component nodejs is file:///home/mrinaldas/nodejs-ex (local)
I0928 20:09:33.510747   29020 watch.go:114] starting WatchAndPush, path: /home/mrinaldas/nodejs-ex, component: nodejs, ignores [tests .\.git. server.js .server.js.swp .server.js.swx]
I0928 20:09:33.511072   29020 watch.go:77] ignoring watch on path /home/mrinaldas/nodejs-ex/.git/branches
I0928 20:09:33.511136   29020 watch.go:77] ignoring watch on path /home/mrinaldas/nodejs-ex/.git/hooks
I0928 20:09:33.511480   29020 watch.go:77] ignoring watch on path /home/mrinaldas/nodejs-ex/.git/info
I0928 20:09:33.511681   29020 watch.go:77] ignoring watch on path /home/mrinaldas/nodejs-ex/.git/logs
I0928 20:09:33.511768   29020 watch.go:77] ignoring watch on path /home/mrinaldas/nodejs-ex/.git/objects
I0928 20:09:33.511857   29020 watch.go:77] ignoring watch on path /home/mrinaldas/nodejs-ex/.git/refs
I0928 20:09:33.512790   29020 watch.go:77] ignoring watch on path /home/mrinaldas/nodejs-ex/tests
I0928 20:09:33.512898   29020 watch.go:97] adding watch on path /home/mrinaldas/nodejs-ex
I0928 20:09:33.512985   29020 watch.go:97] adding watch on path /home/mrinaldas/nodejs-ex/.git
I0928 20:09:33.513052   29020 watch.go:97] adding watch on path /home/mrinaldas/nodejs-ex/helm
I0928 20:09:33.513131   29020 watch.go:97] adding watch on path /home/mrinaldas/nodejs-ex/helm/nodejs
I0928 20:09:33.513633   29020 watch.go:97] adding watch on path /home/mrinaldas/nodejs-ex/helm/nodejs/templates
I0928 20:09:33.513771   29020 watch.go:97] adding watch on path /home/mrinaldas/nodejs-ex/openshift
I0928 20:09:33.514023   29020 watch.go:97] adding watch on path /home/mrinaldas/nodejs-ex/openshift/pipeline
I0928 20:09:33.514168   29020 watch.go:97] adding watch on path /home/mrinaldas/nodejs-ex/openshift/templates
I0928 20:09:33.514216   29020 watch.go:97] adding watch on path /home/mrinaldas/nodejs-ex/views
Waiting for something to change in /home/mrinaldas/nodejs-ex
I0928 20:10:01.045668   29020 watch.go:138] filesystem watch event: "/home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ": CREATE
I0928 20:10:01.045821   29020 watch.go:176] Matching /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ with [tests .\.git. server.js .server.js.swp .server.js.swx]
.matched false, err: <nil>
I0928 20:10:01.045940   29020 watch.go:55] adding watch on path /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ
I0928 20:10:01.045972   29020 watch.go:138] filesystem watch event: "/home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ": CHMOD
I0928 20:10:01.046070   29020 watch.go:176] Matching /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ with [tests .\.git. server.js .server.js.swp .server.js.swx]
.matched false, err: <nil>
I0928 20:10:01.046218   29020 watch.go:55] adding watch on path /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ
I0928 20:10:01.046299   29020 watch.go:138] filesystem watch event: "/home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ": CHMOD
I0928 20:10:01.046811   29020 watch.go:176] Matching /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ with [tests .\.git. server.js .server.js.swp .server.js.swx]
.matched false, err: <nil>
I0928 20:10:01.047351   29020 watch.go:55] adding watch on path /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ
I0928 20:10:01.053943   29020 watch.go:138] filesystem watch event: "/home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ": WRITE
I0928 20:10:01.054059   29020 watch.go:176] Matching /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ with [tests .\.git. server.js .server.js.swp .server.js.swx]
.matched false, err: <nil>
I0928 20:10:01.054146   29020 watch.go:55] adding watch on path /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ
I0928 20:10:01.054170   29020 watch.go:138] filesystem watch event: "/home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ": WRITE
I0928 20:10:01.054229   29020 watch.go:176] Matching /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ with [tests .\.git. server.js .server.js.swp .server.js.swx]
.matched false, err: <nil>
I0928 20:10:01.054285   29020 watch.go:55] adding watch on path /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ
I0928 20:10:01.056687   29020 watch.go:138] filesystem watch event: "/home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ": RENAME
I0928 20:10:01.056796   29020 watch.go:176] Matching /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ with [tests .\.git. server.js .server.js.swp .server.js.swx]
.matched false, err: <nil>
I0928 20:10:01.056827   29020 watch.go:138] filesystem watch event: "/home/mrinaldas/nodejs-ex/server.js": CREATE
I0928 20:10:01.056889   29020 watch.go:176] Matching /home/mrinaldas/nodejs-ex/server.js with [tests .\.git. server.js .server.js.swp .server.js.swx]
.matched true, err: <nil>
I0928 20:10:01.057008   29020 watch.go:138] filesystem watch event: "/home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ": RENAME
I0928 20:10:01.057116   29020 watch.go:176] Matching /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ with [tests .\.git. server.js .server.js.swp .server.js.swx]
.matched false, err: <nil>
File /home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ changed
Pushing files...
I0928 20:10:02.514545   29020 watch.go:237] Copying files [/home/mrinaldas/nodejs-ex/.goutputstream-0QI2PZ] to pod
I0928 20:10:02.552443   29020 occlient.go:1099] Waiting for deploymentconfig=nodejs-app pod
I0928 20:10:02.562116   29020 occlient.go:1114] Status of nodejs-app-1-csnk7 pod is Running
I0928 20:10:02.562163   29020 occlient.go:1117] Pod nodejs-app-1-csnk7 is running.
I0928 20:10:02.562236   29020 component.go:226] Copying to pod nodejs-app-1-csnk7
Please wait, building component....
---> Installing application source ...
---> Installing all dependencies
up to date in 0.413s
---> Building in production mode
---> Pruning the development dependencies
up to date in 0.422s
/opt/app-root/src/.npm is not a mountpoint
---> Cleaning the npm cache /opt/app-root/src/.npm
/tmp is not a mountpoint
---> Cleaning the /tmp/npm-*
run: stopped
run: started
Waiting for something to change in /home/mrinaldas/nodejs-ex

The key question is, how do we differentiate between these temporary/buffer files and the user intentionally created files and avoid these redundant pushes to remote pod... Is it safe to suggest user to rely on either of the following:

  • --ignore flag of the watch command
  • editor specific config file to avoid creation of these temp/buffer files and include them in a doc ?
  • explicitly encode the possible extensions of the buffer files internally in --ignore and append it to the user passed list on passing a specific flag --include-default-ignores or some such?

Neither the filesystem notifier nor the os.stat command provide any differentiation of these

@kadel @jorgemoralespou @cdrage @mik-dass WDYT?

I would think we need a .odoignore file, where we can add ignore pattern, and have a .odoignore in .kube for global configuration, just like git do.

The previous commands that you mention would modify these files, so a user can safely edit/add/remove patterns to the list, and those added internally by the tool could be easily seen/managed by the used.

https://github.com/github/gitignore may be a good start too.

But there may be some false positives / use cases where the user would or wouldn't want to ignore a file..

https://github.com/github/gitignore may be a good start too.

But there may be some false positives / use cases where the user would or wouldn't want to ignore a file..

@cdrage Yeah a $HOME/.kube/.odoignore might be a better one as @jorgemoralespou suggests...

@jorgemoralespou, so to summarize my understanding:

  1. A default .odoignore file will be created in $HOME/.kube/ with default ignores list
  2. User will be allowed to view/add/remove/update contents of this file via new commands
    -- Can they be odo ignore add ..., odo ignore remove ..., odo ignore list ?
  3. User can optionally also specify the list of files to ignore for the current run of watch
    and additionally also ignore the default list of files to be ignored using a new flag which looks something like --include-default-ignores

Are these correct assumptions @jorgemoralespou ?

@anmolbabu

A default .odoignore file will be created in $HOME/.kube/ with default ignores list

Yes. Something similar to git, that has configuration per-repository and globally (--local or --global when setting config options)

User will be allowed to view/add/remove/update contents of this file via new commands
-- Can they be odo ignore add ..., odo ignore remove ..., odo ignore list ?

No, they can't be these. ignore is specific configuration to the watch command. It is configuration, and possibly we can treat it like git does.

    --global              use global config file
    --local               use repository config file

Although we don't yet have a local config file.

User can optionally also specify the list of files to ignore for the current run of watch
and additionally also ignore the default list of files to be ignored using a new flag which looks
something like --include-default-ignores

I would think that, if the configuration is saved (global or local) then that one is used, or else the configuration needs to be specified via command line flag (and the latter would have preference).

@jorgemoralespou

@anmolbabu

A default .odoignore file will be created in $HOME/.kube/ with default ignores list

Yes. Something similar to git, that has configuration per-repository and globally (--local or --global when setting config options)

I am not very sure if I understand, what you mean by per-repository configuration, is it like every watched source repository can also be expected to have .odoignore file ? If yes, can we expect it to be in the source root itself and with same name -- .odoignore ?

User will be allowed to view/add/remove/update contents of this file via new commands
-- Can they be odo ignore add ..., odo ignore remove ..., odo ignore list ?

No, they can't be these. ignore is specific configuration to the watch command. It is configuration, and possibly we can treat it like git does.

    --global              use global config file
    --local               use repository config file

Ok, so git uses something like git config --global user.name "John Doe" for example.
And we have the following commands for odo specific configuration:

  1. odo utils config set ...ex: odo utils config set UpdateNotification false
  2. odo utils config view
    So we add --global and --local(to differentiate .kube/odoignore vs watched_src/odoignore) to the existing config commands as above and differentiate b/w config to odo config file vs odoignore files by may be an additional config type say for example the command can look like:
    odo utils config add --global watch.ignore ".git" for example..
    Ok looks good to me...

Although we don't yet have a local config file.

Not sure I understand this part completely bcoz we currently have $HOME/.kube/odo(default but configurable by setting and env vvar) where we maintain basic config like request timeout period, whether to notify when a odo update is available.. (along with some app and component details currently)

User can optionally also specify the list of files to ignore for the current run of watch
and additionally also ignore the default list of files to be ignored using a new flag which looks
something like --include-default-ignores

I would think that, if the configuration is saved (global or local) then that one is used, or else the configuration needs to be specified via command line flag (and the latter would have preference).

Looks good to me :+1:

Although we don't yet have a local config file.

Not sure I understand this part completely bcoz we currently have $HOME/.kube/odo(default but configurable by setting and env vvar) where we maintain basic config like request timeout period, whether to notify when a odo update is available.. (along with some app and component details currently)

>

@jorgemoralespou is talking about config file that would be specific to given component.

Yes,
This is something we will most likely need, the sooner, the better.
@kadel do you know if there's an issue for define .odo config file/directory format/structure local to the repo and global?

@kadel do you know if there's an issue for define .odo config file/directory format/structure local to the repo and global?

There is no issue yet :-(

@kadel created as https://github.com/redhat-developer/odo/issues/800

This issue should lead to the proposal document.

800 will just allow users to save ignores to the file.

But the problem won't go away. If a new temporary file gets created and quickly deleted (within the delay interval) it will still trigger "empty" push.
Shouldn't the watch be smart and ignore files, that are created and then deleted within the delay interval?

I'm going to close this.
If the user wants to ignore editor temporary files he/she can run odo watch --ignore ".*\.swp".
There is no reliable way where we can detect and ignore those files automatically.
With #800 there will be an option for users to save ignores to the configuration file.

odo watch currently doesn't' fail if there is a file that was deleted before odo watch tries to copy files to the pod. And there is a ticket for further improvement - https://github.com/redhat-developer/odo/issues/989

@kadel, IMHO if you're closing this issue you should probably create a task to have default file/folder filters defined in config, as the #800 only provides a mechanism to configure this, but not the filters to be set.

The one you mention should be the first to be there, but also .git and many more.

@jorgemoralespou good point. I've created https://github.com/redhat-developer/odo/issues/1011

Was this page helpful?
0 / 5 - 0 ratings