Comments (12)
Why are you caching the remote file in your step/deployed? You shouldn't do that...
from overthere.
because before deploying it I need to upload the file on the remote host that will process the file, so I change the referenced file (LocalFile) by the new one, an SshSftpFile.
from overthere.
But how is that repeatable then? You shouldn't keep the reference to the remote as a field. If the step needs to re-execute, it needs to re-upload.
from overthere.
What should be repeatable? I change the reference from the localfile to the SSHFile to avoid to move the file back to the deployit server, and preferably to move it directly to remote host.
from overthere.
The SshSftpFile is not serializable because it contains the SshConnection which is not serializable. The same connection will not be there when the server is restarted.
from overthere.
The step should be repeatable because it might fail and then need to be reexecuted. The remote file could be deleted in the meantime. Especially if the server has crashed in the meantime.
from overthere.
@vpartington: protected transient C connection;
from overthere.
Apart from the fact that this will cause NPE's all over the place unless we check whether connection is null everywhere, this will not work because we need the connection to access the file. Without a connection, the file is meaningless.
If you want to get at a file at a later stage, save the path and the connection details and then access it again. Jeroen's scenario has the advantage of not requiring that and being repeatable.
from overthere.
In my use case, the file isn't stored in the temp directory but in an explicit path.
Le 18 nov. 2011 à 13:45, Vincent Partington a écrit :
Apart from the fact that this will cause NPE's all over the place unless we check whether connection is null everywhere, this will not work because we need the connection to access the file. Without a connection, the file is meaningless.
If you want to get at a file at a later stage, save the path and the connection details and then access it again. Jeroen's scenario has the advantage of not requiring that and being repeatable.
Reply to this email directly or view it on GitHub:
#24 (comment)
from overthere.
OK. So then you'll need to save just the path for later reference.
from overthere.
please look at https://github.com/xebialabs/pocs/tree/master/liferay-plugin before asking me to do differently
from overthere.
Will not implement because it adds unnecessary complexity.
from overthere.
Related Issues (20)
- com.hierynomus.smbj.Session.connectShare() can return a closed Share HOT 1
- No exception for no write permission HOT 2
- Intermittent Connection timeout on WinRM connections HOT 1
- overthere not connecting to STIG applied windows host HOT 3
- Unknown connection protocol ssh HOT 9
- Overethere does not work with spring boot application HOT 4
- Failed to obtain huawei switch configuration file using SFTP protocol HOT 1
- Access denied error
- WinRM Error: Unexpected HTTP response on some windows machines HOT 1
- Kerberos authentication problems due to changes in Apache HTTPClient 4.4.1
- Why WINRS (Native) is not supported inside unix box? HOT 1
- STATUS_INTERNAL_ERROR (0xc00000e5): QueryInfo failed for SMB2FileId HOT 1
- Unable to access the file, which is the AWS EC2 windows Machine jcifs.util.transport.TransportException: Connection timeout
- Read .ssh/config ?
- Execute Remote Process and exit without getting Attached to the process HOT 1
- CmdLine.build
- Strange behavior on long running commands HOT 1
- WinRM Error: java.net.SocketTimeoutException: connect timed out
- Incorrect ordering of StdErr and StdOut Output of powershell scripts
- how to switch root and use exec function HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from overthere.