Ignition touching project files every five minutes on Windows

Hello IA,

I'd like to raise an issue here, as I do see a potential problem when using Source Control for our projects.

In my experience Ignition is touching project files every five minutes, which modifies the actor, timestamp, and lastModificationSignature values found in each resource.json for code.py, config.json and props.json files.

I've installed 8.1.20 on both macOS via Homebrew and on Windows via scoop, and 8.1.21 via the ZIP file; both Gateways running on Windows appear to be affected by the same problem.

Steps to reproduce:

  1. Install Ignition 8.1.20 or 8.1.21
  2. Clone an Ignition project into %IGNITION_DIR%\data\projects
  3. Leave untouched and within five minutes you'll see resource.json files have been modified
  4. Run git restore . (assuming you're using git) and wait five minutes to see those files modified by external
  5. Rinse and repeat

If I don't restore them (git restore .), the files are no longer modified; this appears to only happen once. But if I restore the files to their original state, every five minutes the resource.json files are modified.

Since I do want to keep my projects under source control, having an external actor modifying files is not desirable.

Please fix this.

Thanks,
CĂ©sar

Whatever you are doing is leaving invalid checksums in resource.json. You will need to recompute them externally to avoid changes. Or commit the computations Ignition does for you after it notices.

{ That there is computed meta-data in those files is a fundamentally broken design that IA is kinda' stuck with for now. The computed meta-data should have been in separate files so they could be filtered by .gitignore. Net result is: }

Don't hold your breath waiting for this to be fixed.

Edit: You might also be suffering from line-ending conflicts....

1 Like

See also this topic:

1 Like

That is half of the issue.

While git and macOS use LF, Windows uses CRLF.

I guess I could add resource.json to .gitignore and get rid of this issue. But still, what is Ignition running every five minutes?

Oh, well!

Hopefully someone from IA might like to add something.

Thanks, @pturmel.

IA staff have explicitly called out ignoring resource.json as a bad practice:

Did you read through this:

3 Likes

To directly answer:
Every five minutes (by default) Ignition scans the projects directory for any modifications to files. Without that, pushing changes via Git simply wouldn't work at all.

Soon :tm: we're planning to add a system.project.scan method (and a corresponding SDK hook) to make things a little more flexible for advanced users.

1 Like

Do you have the same issue if you force git autocrlf for cross platform project in each environments?

See: git - How to change line-ending settings - Stack Overflow

In my setup, I already had a .gitattributes global file. So I just had to add the following:

Before:

*.md    diff=markdown
*.py    diff=python

After:

*		text=auto

*.json	text eol=lf
*.md    text diff=markdown eol=lf
*.py    text diff=python eol=lf

I had already set autocrlf to true on my .gitconfig global settings. But @Craig.Lovold's suggestion is what solved this issue.

Thanks everyone for your suggestions!

1 Like