Issue 849: Failure opening .sky file saying audit log entry has been modified

Status:resolved
Assigned To:Brendan MacLean
Type:Defect
Area:Skyline
Priority:2
Milestone:21.2
Opened:2021-11-30 by Brendan MacLean
Changed:2021-12-02 by Nick Shulman
Resolved:2021-12-02 by Nick Shulman
Resolution:Fixed
Closed:
2021-11-30 Brendan MacLean
Title»Failure opening .sky file saying audit log entry has been modified
Assigned To»Nick Shulman
Notify»ritach
Type»Defect
Area»Skyline
Priority»2
Milestone»21.2
I don't think I touched anything about this Skyline document attached, but I got an error about audit log entries having been modified.

I created the attached .sky.zip file manually with 7zip.
 
 DIA-TTOF-tutorial.sky.zip

2021-11-30 Nick Shulman
It looks like this audit log was created while running a Functional test.

When a functional test is running, AuditLogEntry.ConvertPathsToFileNames is true.
Because of this, "LogMessage.ParsePath" behaves differently.
The audit log contains this:
      <all_info>
        <type>contains</type>
        <name>{0:BuildPeptideSearchLibrarySettings}{2:PropertySeparator}{0:BuildPeptideSearchLibrarySettings_SearchFileNames}</name>
        <name>"{4:D:\Downloads\Tutorials\DIA-TTOF\DIA-TTOF\DDA_search\interact.pep.xml}"</name>
        <en_expanded>Build Spectral Library &gt; Search files : contains "interact.pep.xml"</en_expanded>
      </all_info>
If this audit log had been saved in regular Skyline, then that "en_expanded" would have been different, since it would have included the full path:
        <en_expanded>Build Spectral Library &gt; Search files : contains "D:\Downloads\Tutorials\DIA-TTOF\DIA-TTOF\DDA_search\interact.pep.xml"</en_expanded>

I am not sure exactly why this causes the hash to be incorrect. As far as I can tell, Skyline is not recomputing the text in that "en_expanded" tag, so I believe the hash was incorrect when the log file was written. We certainly don't want Skyline to be recomputing the english text before verifying the hash values, since that would mean that the hash values would become invalid if we ever changed any of the strings in "PropertyNames.resx" etc.

There are a lot of things that could potentially be fixed here.

2021-11-30 Brendan MacLean
I feel like I have run into this before. Can we still fix this case not to have this error? We used to be able to open .sky files produced by tests.

2021-12-02 Nick Shulman
resolve as Fixed
Statusopen»resolved
Assigned ToNick Shulman»Brendan MacLean
This has been fixed in master in PR 1867.
I imagine that we do not need to back port this to the 21.2 branch since this bug has been around for years and I don't think a user can actually run into it.