Closed floriankrb closed 1 year ago
@floriankrb, we were in the process of revising the deployment process. We usually always deploy in the same target, meaning that (in my case), the overwrite option is always true. Do you have a case where you want this to fail if the files are already present? We should discuss to merge this with https://github.com/ecmwf/pyflow/pull/15
Currently, when deploying a suite I have many warnings about files being overwritten. I am ignoring them because I consider that overwriting a file with identical content is ok. In such case, I wouldn't even consider it as overwriting and I would rather not have any message.
But if I was overwriting files with different content, I would like :
Exactly. I don't think the warning is a good idea as it would be already too late if you care, the files would have been overwritten already. So I suggest the following:
What about this?
In any case, if the content of the file is the same, don't write any message, and don't fail.
As for choosing a default value, this is a separate decision, defaulting to False is safer but more annoying I suppose.
Sounds good. It would be interesting as we would then see what files are impacted by the change using overwrite=True. The thing is that I can't find a case where you wouldn't want to overwrite, unless you want to deploy each time in a clean target, but it's not really important to enforce that. That's why I believe it should be set to true by default.
Here is the pull request updated rebase on the correct feature branch.
I will let you change the default to overwrite=False it you think it is appropriate.
All committers have signed the CLA.