Added code for a timestamp in log_vc_info to append to uncommitted.diff - #7358
Added code for a timestamp in log_vc_info to append to uncommitted.diff#7358Scott-Owen-James wants to merge 6 commits into
Conversation
…ted.diff reinstall
|
|
||
| diff_file = Path( | ||
| diff_location, | ||
| 'uncommitted-' + str(log_num) + '.diff' |
There was a problem hiding this comment.
If I reinstall the same workflow three times, I end up with the following files:
$ tree ~/cylc-run/<workflow>/log/
├── install
│ ├── 01-install.log
│ ├── 02-reinstall.log
│ ├── 03-reinstall.log
│ └── 04-reinstall.log
└── version
├── n -> /.../uncommitted-4.diff
├── uncommitted-1.diff
├── uncommitted-2.diff
├── uncommitted-3.diff
├── uncommitted-4.diff
└── vcs.json
For consistency, we may as well make that 01-uncommitted.diff, etc, so that folks can associate the (re)install log with the uncommitted file.
Also, why is the symlink to the latest uncommitted file called n?
There was a problem hiding this comment.
The format for the files was a change requested by @MetRonnie : #7358 (comment), as for the latest symlink being n, I assumed standard practice as we used an n to refer to the latest in different locations.
There was a problem hiding this comment.
The format for the files was a change requested by @MetRonnie
Ronnie suggested a two digit number, though I'm not sure what the motivation was for putting it after the name rather then before.
as for the latest symlink being n ...
- In the run dir we have the
runNsymlink which points at the most recent run (e.g, run1, run23, run34, etc). - In
log/scheduler/we have thelogsymlink which points at the most recent log file. - In
log/job/<cycle>/<task>we have theNNsymlink which points at the most recent submission (e.g, 01, 23, 34, etc).
Given that we previously had a file called uncommitted.diff (and a lot of the purpose of this symlink is to prevent breaking compatibility with workflows which may load this file), we may as well use the filename here.
There was a problem hiding this comment.
Alright, so change the symlink name to uncommitted.diff. And make the file numbers 2 digits, do you want me to reformat it to the way you'd prefer too or leave it as Ronnie wants it?
There was a problem hiding this comment.
Yes. I would default to following the existing naming pattern, but let's see if Ronnie had a design on this...
There was a problem hiding this comment.
There are two files, uncommitted.diff and vcs.json. My reasoning for putting the number after the name would be so all the uncommitted-NN.diff and vcs-NN.json would be grouped when sorted, if we end up giving vcs.json the same treatment down the line
Added code for a timestamp in log_vc_info to append to uncommitted.diff
closes #7190
Check List
CONTRIBUTING.mdand added my name as a Code Contributor.setup.cfg(andconda-environment.ymlif present).?.?.xbranch.