This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270157 - A bunch of problems with remotely changed files discovery (simple remote, SFTP transport)
Summary: A bunch of problems with remotely changed files discovery (simple remote, SFT...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-21 13:58 UTC by Vladimir Kvashin
Modified: 2017-04-20 10:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2017-03-21 13:58:23 UTC
While investigation QA complaints and some other related bugs I found several issues with remotely changed files discovery (i.e. with discovery of the files that were changed remotely while building and thus need to be downloaded back to local machine).

The problems are as follows:
1) When creating a new project from existing source, we get into the same place 3 times simultaneously. One stack is as below
"org.netbeans.api.extexecution.base.BaseExecutionService"
	at org.netbeans.modules.cnd.remote.sync.FileCollector.runNewFilesDiscovery(FileCollector.java:539)
	at org.netbeans.modules.cnd.remote.sync.FtpSyncWorker.shutdown(FtpSyncWorker.java:841)
	at org.netbeans.modules.cnd.remote.sync.RemoteBuildProjectActionHandler$1.executionFinished(RemoteBuildProjectActionHandler.java:188)
	at org.netbeans.modules.cnd.makeproject.api.DefaultProjectActionHandler$1.lambda$executionFinished$1(DefaultProjectActionHandler.java:138)
	at org.netbeans.modules.cnd.makeproject.api.DefaultProjectActionHandler$1$$Lambda$111.787285224.accept
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890)
	at org.netbeans.modules.cnd.makeproject.api.DefaultProjectActionHandler$1.executionFinished(DefaultProjectActionHandler.java:137)
	at org.netbeans.modules.cnd.makeproject.api.DefaultProjectActionHandler$ProcessChangeListener.run(DefaultProjectActionHandler.java:515)
	at org.netbeans.modules.nativeexecution.api.execution.NativeExecutionService$PostRunnable.run(NativeExecutionService.java:433)
	at org.netbeans.api.extexecution.ExecutionService$4.run(ExecutionService.java:229)
	at org.netbeans.api.extexecution.ExecutionService$4.run(ExecutionService.java:221)
	at org.netbeans.api.extexecution.base.BaseExecutionService$2.call(BaseExecutionService.java:299)
	at org.netbeans.api.extexecution.base.BaseExecutionService$2.call(BaseExecutionService.java:198)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
The other two are the same:
"org.netbeans.api.extexecution.base.BaseExecutionService"
	at org.netbeans.modules.cnd.remote.sync.FtpSyncWorker.shutdown(FtpSyncWorker.java:841)
	at org.netbeans.modules.cnd.discovery.projectimport.ExecuteCommand$ProcessChangeListener.run(ExecuteCommand.java:485)
	at org.netbeans.modules.nativeexecution.api.execution.NativeExecutionService$PostRunnable.run(NativeExecutionService.java:433)
	at org.netbeans.api.extexecution.ExecutionService$4.run(ExecutionService.java:229)
	at org.netbeans.api.extexecution.ExecutionService$4.run(ExecutionService.java:221)
	at org.netbeans.api.extexecution.base.BaseExecutionService$2.call(BaseExecutionService.java:299)
	at org.netbeans.api.extexecution.base.BaseExecutionService$2.call(BaseExecutionService.java:198)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)

2) Find command syntax is incorrect. This leads to lots of false positives sometimes.

3) When user checks "Remember choice" ON or OFF, the choice is not tied to the files he/she sees. So once I saw one file, decided that it needs to be downloaded and asked IDE not to ask me and do this automatically - that's OK. But what if next time due to an error in make file all my sources are spoiled on remote side - they all will be automatically downloaded without question. That's wrong.
Comment 1 Vladimir Kvashin 2017-03-21 20:52:23 UTC
4) this remote changes discovery works only for "uncontrolled" files, i.e. for files that were not initially included in project and did not exist locally, but were created during build.
Comment 2 Vladimir Kvashin 2017-03-23 12:37:44 UTC
Fixed by a number of change sets of enum:
014ed7094afd
6efcbcaf4589
a440d562dd08
61a0aacab7d3
929f91021ca5
412276f4a565
68e8026bbf1a
d178ed6eb629
a21dcc38c1a7
86e32e0eda26
2a6618bde1b3
101a24b125a1
f59a9b8cfb69
a746d21a6358
ef99383451da
Comment 3 Quality Engineering 2017-03-24 02:53:15 UTC
Integrated into 'main-silver', will be available in build *201703240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d178ed6eb629
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: Fixed a type in trace while fixing #270157 (A bunch of problems with remotely changed files discovery)
(transplanted from ef99383451da95610749c07bb7d5c1f68243dc6e)
Comment 4 Quality Engineering 2017-04-02 02:38:00 UTC
Integrated into 'main-silver', will be available in build *201704020002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9788511430fb
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: Tests refactoring  (fixing #270157 - A bunch of problems with remotely changed files discovery):
(transplanted from 101a24b125a1269e5fb25a7a31f7a4599a0f6f24)
Comment 5 ilia 2017-04-12 12:50:54 UTC
https://netbeans.org/bugzilla/show_bug.cgi?id=270157 Changesets:
    http://hg.netbeans.org/releases/rev/ef99383451da # Fixed a type in trace while fixing #270157 (A bunch of problems with remotely changed files discovery)
    http://hg.netbeans.org/releases/rev/a746d21a6358 # Fixing problems  #2 and #4 from #270157 (A bunch of problems with remotely changed files discovery):
    http://hg.netbeans.org/releases/rev/f59a9b8cfb69 # Added tests for SFTP mode (fixing #270157 - A bunch of problems with remotely changed files discovery):
    http://hg.netbeans.org/releases/rev/101a24b125a1 # Tests refactoring  (fixing #270157 - A bunch of problems with remotely changed files discovery):
    http://hg.netbeans.org/releases/rev/2a6618bde1b3 # Added tests for SFTP mode as well (fixing #270157 - A bunch of problems with remotely changed files discovery):
    http://hg.netbeans.org/releases/rev/86e32e0eda26 # Tests: added isDebugged() and made build timeout longer in case of debug (fixing #270157 - A bunch of problems with remotely changed files discovery):
    http://hg.netbeans.org/releases/rev/a21dcc38c1a7 # Fixing test failures (fixing #270157 - A bunch of problems with remotely changed files discovery):
    http://hg.netbeans.org/releases/rev/929f91021ca5 # Fixed issue #3 from #270157 ( A bunch of problems with remotely changed files discovery):
    http://hg.netbeans.org/releases/rev/61a0aacab7d3 # Fixed more than 60 build warnings that made nearly impossible to find an error in build (fixing #270157 - A bunch of problems with remotely changed files discovery)
    http://hg.netbeans.org/releases/rev/a440d562dd08 # Better trace (fixing #270157 - A bunch of problems with remotely changed files discovery)
    http://hg.netbeans.org/releases/rev/6efcbcaf4589 # Fixed tests  that were broken after fixing  #270157 - A bunch of problems with remotely changed files discovery
    http://hg.netbeans.org/releases/rev/014ed7094afd # Yet better fix for tests  (fixing  #270157 - A bunch of problems with remotely changed files discovery)
    http://hg.netbeans.org/releases/rev/9fc03ce13911 # i18n (fixing #270157 - A bunch of problems with remotely changed files discovery)
    http://hg.netbeans.org/releases/rev/e00e86aa769d # Fixed build after fixing more than 60 build warnings (fixing #270157 - A bunch of problems with remotely changed files discovery)
    http://hg.netbeans.org/releases/rev/d79b0b171310 # Fixed an NPE (fixing #270157 - A bunch of problems with remotely changed files discovery)
    http://hg.netbeans.org/releases/rev/5a717b3edbd4 # Fixed functional tests after fixing more than 60 build warnings (fixing #270157 - A bunch of problems with remotely changed files discovery). Unfortunately NetBeans menus behaviour differs too much when you make a menu item lazy, so I had to make nearly all items non lazy again.
Comment 6 soldatov 2017-04-20 10:11:12 UTC
Now QA tests works better (NetBeans 8.2 patch 2)