fix(builder): don't count Docker's init or the Steam client's own files as lost saves
Every container the node-agent starts gets /usr/sbin/docker-init, and SteamCMD rewrites its own config.vdf on every run. Counted as files written outside the volumes, they made every build look like it loses saves. A folder whose only changes were logs no longer counts either, and a folder followed by a same-named file (worlds, worlds.bak) is no longer taken for a file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
87dfca1285
commit
0a80a6ebc5
4 files changed
+71
-43
No files matched your search
@@ -113,15 +113,30 @@ A /home/steam/.config/example
|
||||
A /home/steam/.config/example/worlds
|
||||
A /home/steam/.config/example/worlds/world1.db
|
||||
A /home/steam/.config/example/worlds/world1.fwl
|
||||
A /home/steam/.config/example/worlds.bak
|
||||
A /home/steam/.config/example/Player.log
|
||||
C /home/steam/logs
|
||||
A /home/steam/logs/server.log
|
||||
C /home/steam/Steam
|
||||
C /home/steam/Steam/config
|
||||
C /home/steam/Steam/config/config.vdf
|
||||
C /home/steam/steamcmd/linux64/steamclient.so
|
||||
C /etc
|
||||
C /etc/hostname
|
||||
C /usr
|
||||
C /usr/sbin
|
||||
A /usr/sbin/docker-init
|
||||
C /var
|
||||
C /var/log
|
||||
A /var/log/x
|
||||
A /tmp/x.sock
|
||||
A /server/should-not-count.sav
|
||||
D /home/steam/old.txt
|
||||
A /home/steam/server.pid`
|
||||
got := outsideFiles(diff, map[string]string{"/server": "v", "/data": "v"})
|
||||
want := []string{"A /home/steam/.config/example/worlds/world1.db", "A /home/steam/.config/example/worlds/world1.fwl"}
|
||||
// Folders whose only changes aren't the game's (logs, Docker's init) don't count either
|
||||
want := []string{"A /home/steam/.config/example/worlds.bak", "A /home/steam/.config/example/worlds/world1.db",
|
||||
"A /home/steam/.config/example/worlds/world1.fwl"}
|
||||
if strings.Join(got, "|") != strings.Join(want, "|") {
|
||||
t.Errorf("got %q\nwant %q", got, want)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user