Giter Site home page Giter Site logo

Comments (12)

hierynomus avatar hierynomus commented on June 30, 2024

Why are you caching the remote file in your step/deployed? You shouldn't do that...

from overthere.

bmoussaud avatar bmoussaud commented on June 30, 2024

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.

hierynomus avatar hierynomus commented on June 30, 2024

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.

bmoussaud avatar bmoussaud commented on June 30, 2024

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.

vpartington avatar vpartington commented on June 30, 2024

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.

vpartington avatar vpartington commented on June 30, 2024

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.

bmoussaud avatar bmoussaud commented on June 30, 2024

@vpartington: protected transient C connection;

from overthere.

vpartington avatar vpartington commented on June 30, 2024

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.

bmoussaud avatar bmoussaud commented on June 30, 2024

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.

vpartington avatar vpartington commented on June 30, 2024

OK. So then you'll need to save just the path for later reference.

from overthere.

bmoussaud avatar bmoussaud commented on June 30, 2024

please look at https://github.com/xebialabs/pocs/tree/master/liferay-plugin before asking me to do differently

from overthere.

vpartington avatar vpartington commented on June 30, 2024

Will not implement because it adds unnecessary complexity.

from overthere.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.